Honey, did you remember to turn the lights off?

Honey, did you remember to turn the lights off?


Hi everyone,

I am brand new to apilio and this is my first routine (is that what we call them here?). I created it to let me know if the lights are left on in my wife’s workshop at after 9:30 pm. Sometimes she either forgets to turn off the lights or she thinks she might be going back in there after we get the kids to bed etc., but changes her mind. Either way, this little routine sends me a suggestion to turn the lights off if it’s past 9:30, but leaves them on if I don’t respond within 10 minutes (ostensibly because I know she’s in there and will take care of it herself when she’s done).

What I did:
I created two Boolean variables:

  1. “Its930pm” (toggled to “true” by an IFTTT applet triggered every day at 9:30 to Make a web request via Webhooks)
  2. BacuriLightsOn (toggled to “true” or “false” by corresponding IFTT applets triggered by Smart Life when the lights are turned on and off, respectively)

I also created two corresponding conditions with the exact same names and with required state “True”

Finally, added the logicblock “turn_off_bacuri_lights” using the two conditions with a “action for positive result” to send a web request to IFTTT to turn off the lights (via Smart Life), setting the Execution mode to “suggest” with 10 minute limit.

I tested it last night, making sure that the lights were on at 9:30, and it works perfect, but…

…the “Its930pm” boolean variable stays in the “true” position.

Questions: How can I get the “Its930pm” variable to toggle back to the “false” position after the logicblock executes? Should I create a trigger in IFTTT that runs at, say, 10pm that in turns it back to “false” via Webhooks? Is there some way within apilio to automatically toggle it back based on a time delay? Is there some other, more efficient way of achieving this (or the rest of the routine and components for that matter)?

Thanks in advance for the help


If I need something to return back to false IE motion sensor has been activated I normally use webhooks.
IE I have a light turn off after 5 minutes of it being switched on by motion. So after 5 minutes I send a webhook “lightsoff” I also set a web hook linking back to the motion sensor Boolean to trigger it back to false.

Hope that makes sense


Yes, I think it does. So you are essentially saying to use webhooks to change it back to false after some delay, right?


Yes, that’s correct. I found is useful for motion sensors mainly