I think this should be easy to do. I assume the relay you want to have Indigo turn on is controllable by Indigo, yes?
And I assume the relay you want to check to see if it is on, can also update a variable in Indigo, yes?
If so, just create a new schedule to turn on your 1st relay as needed. Then in the same Schedule, create a 2nd Action with a delay of :05. For your 2nd Action, use this:Server Actions->Script and File Actions->Execute Script, and check "embedded Python:"
This script should get you close. Not sure I have the logic set up correctly for you needs, but this should be easy to change if necessary.
- Code: Select all
relay = indigo.variables[1290294647] #variable ID of relay device ID to check
if relay.value == "false":
indigo.device.turnOff(629297029) schedule relay deivice ID
So if the variable for your 2nd device is False(off), this will turn your first relay off. If the 2nd relay is True(on), nothing will happen. Again, not sure I have this logic set up as you need but should be trivial to change if necessary. AND, I am NOT a python expert , and no doubt there maybe better, easier ways to do this, but nevertheless this little script should work: