Thanks Matt! That worked.
Here's what I have so far. I want to first check the state of my virtual "garage door button lock", then if it's unlocked, "push" the garage door button, wait a tiny bit, then "release" the garage door button. Since messages to/from my EZIO8T are not 100% reliable, I need to force a status update, then check the state of the #8 output. I don't want to trust Indigo's state for #8, I need to make sure it's really off. I'm doing that in a loop, checking and turning off #8, until the EZIO8T reports its output 8 is really off. (garage door button "released").
- Code: Select all
import time
ezio8t = indigo.devices[devID] # "EZi08T"
tLock = indigo.variables[varID].value # "lock"
if tLock == "false":
indigo.iodevice.setBinaryOutput(devID, 7, True) # "EZi08T" output 8 ON
time.sleep(0.5)
while True:
indigo.iodevice.setBinaryOutput(devID, 7, False) # "EZi08T" output 8 OFF
indigo.actionGroup.execute(actionID) # "EZIO8T Outputs Status"
time.sleep(1)
binaryOutput8 = ezio8t.states["binaryOutput8"]
if not binaryOutput8:
break
I'm looking for the cleanest, most reliable way to code this.
And is there Python for forcing the EZIO8T status? So I can eliminate that Action Group?
Thanks!!