I have an embedded Python script that refreshes an EZ-io module status, then reads the updated status, then acts based on the status like this:
- Code: Select all
# Refresh the EZ-IO status
indigo.iodevice.statusRequest(EZ-IO-Device)
#
# Need to have a delay here to wait for the status request to complete
indigo.script.sleep(2)
#
# Get Status of EZ-IO Binary Input here and take appropriate action
My two questions:
1. Am I using indigo.script.sleep(2) properly here? Does this just cause this script to sleep, or does it sleep indigo or all scripts?
2. Is there a command which will only refresh the binary input status (vs. both binary and analog status) of the EZ-IO module (you can do this directly in Indigo, but I couldn't figure out if this was possible using a script command. Refreshing just the binary status is quicker.
If anyone can help, it would be much appreciated.