After focusing on my Python skills as the source of the issue, I finally tested the system behavior with the following script:
- Code: Select all
indigo.device.turnOn(1017239549) # turn on LED#1
led1 = indigo.devices[1017239549] # dRm kPdW LED#1
#LOG DEVICE STATUS
indigo.device.statusRequest(1017239549)
indigo.script.sleep(15)
if led1.onState:
indigo.server.log("15 secs led1 is on")
else:
indigo.server.log("15 secs led1 is off")
While the script turns on the LED, the value obtained in the event log is F.
What I learned was that changing the delay did not impact the result. What does impact the result is running the script a second time: while running the script a second time does not change the LED status, the value in the LOG is now T. I obtained the same result even when I commented out the sleep line.
Note: I also observed the same behavior with the status request following the sleep step.
Anyone else observe this? - any thoughts on how to deal with it?