Skip to content

MultiIODevice

I/O devices have a wide variety of capabilities that we’ve tried to boil down to some specifics. The I/O devices that Indigo supports generally have some combination of three types of inputs: analog, binary, and sensor. They may also support some number of binary outputs.

Class Properties

All outputs are modified using commands below.

Property Type Writable Description
analogInputs list of integer No a list of the current analog input values, one per input, in a python list - can be accessed individually using the states below
analogInputCount integer No number of analog inputs this device supports
binaryInputs list of boolean No a list of the current binary input values, one per input - can be accessed individually using the states below
binaryInputCount integer No number of binary inputs this device supports
binaryOutputs list of boolean No a list of the current binary output values, on per output (max 12 total outputs) - can be accessed individually using the states below
binaryOutputCount integer No number of binary outputs this device supports
sensorInputCount integer No number of sensor inputs this device supports
sensorInputs list of integer No a list of the current sensor input values, one per input - can be accessed individually using the states below

Device States

These are the states provided by this device type and accessible through the dev.states dictionary. They are read-only.

State ID Type Property Name Notes
analogInput# integer N/A value of input number represented by the # sign (input 1 would be analogInput1) - there will only be dev.analogInputCount inputs available
analogInputsAll string N/A a comma separated list of all analog input values. Can be accessed as a Python list of integers by using dev.analogInputs.
binaryInput# boolean N/A value of input number represented by the # sign (input 1 would be binaryInput1) - there will only be dev.binaryInputCount inputs available
binaryInputsAll string N/A a comma separated list of all binary input values. Can be accessed as a Python list of booleans by using dev.binaryInputs.
binaryOutput# boolean N/A value of output number represented by the # sign (output 1 would be binaryOutput1) - there will only be dev.binaryOutputCount outputs available
binaryOutputsAll string N/A a comma separated list of all binary output values. Can be accessed as a Python list of booleans by using dev.binaryOutputs.
sensorInput# integer N/A value of input number represented by the # sign (input 1 would be sensorInput1) - there will only be dev.sensorInputCount inputs available
sensorInputsAll string N/A a comma separated list of all binary input values. Can be accessed as a Python list of booleans by using dev.sensorInputs.

Commands (indigo.iodevice.*)

Set Binary Output

Set the state of the specified binary output.

Command Syntax Examples

indigo.iodevice.setBinaryOutput(123, index=2, value=True)

Parameters

Parameter Required Type Description
direct parameter Yes integer id or instance of the device
index Yes integer 0-based index of the output to change - should be less than the binaryOutputCount property of the device
value Yes boolean True to turn the output on, False to turn it off

Examples

# If binary input 3 is true, set binary output 1

# to false (python arrays are 0-based)

myIODevice = indigo.devices[123]
if not myIODevice.binaryInputs[2]:
    indigo.iodevice.setBinaryOutput(myIODevice, index=1, value=False)