Get the current brightness of the device “office lamplinc”:
- Code: Select all
indigohost -e 'return indigo.devices["office lamplinc"].brightness'
Toggle the device “office lamplinc” three times:
- Code: Select all
indigohost -e '
indigo.device.toggle("office lamplinc")
indigo.device.toggle("office lamplinc")
indigo.device.toggle("office lamplinc")
'
Execute an Indigo python file:
- Code: Select all
indigohost -x /SomeFolder/indigo_script.py'
Note there is some overhead each time you call indigohost since it creates a new process and has to establish a connection to the Indigo Server.
Embedded python scripts inside Indigo actions (schedules, triggers, etc.) don't have this overhead because they all share a single indigohost (IPH) process, but because of this the Indigo Server only allows embedded python scripts 10 seconds to execute. If they take more than 10 seconds, then they should be broken out into a .py file which will create a new process (but have the overhead of having to establish a new Indigo Server connection).