I have 4 Onkyo Receivers to control.
I made the files for indigo to call for each function (on, off, volume, input, etc).
How do i make it so I don't have to write the same file for each device.
onkconf.py
- Code: Select all
#!/usr/bin/env python
# Onkyo Receivers
import eiscp
# Create a receiver object, connecting to the host
club = eiscp.eISCP('192.168.1.202')
bar = eiscp.eISCP('192.168.1.203')
base = eiscp.eISCP('192.168.1.204')
bed = eiscp.eISCP('192.168.1.205')
onkyo_on-device.py
- Code: Select all
#!/usr/bin/env python
import onkconf
import eiscp
# Create a receiver object, connecting to the host
receiver = device
# Turn the receiver on
receiver.command('power=on')
receiver.disconnect()
thats what ive come up with but I dont know what you would call it to look it up.
thanks for looking