Changing Boolean value within Apilio action

Just setting up my first logic blocks and ran into something that seems simple and necessary but the community support I have read so far seems less than ideal.

Like others, I am setting a Boolean for darkness (Sunset to Sunrise) and I have a trigger for Motion on a ring camera that will turn on the lights, then off again in 20 minutes, if is it dark. But I still need to reset the Motion (presence) boolean. As you can’t prove a negative (there is NO motion on the camera) we have to use time, but why can’t I just change the boolean value to FALSE when I execute the turn_on_lights command so it is ready for the next motion (even if it happens during the 20 mins that the lights are on, thus extending/resetting the 20 min window)?

How have others addressed this? I guess can set an IFTTT action with delay after motion is detected so that the first detection runs the logic block and the second, after a minute delay, can reset the boolean but that seems like a lot of extra steps when the boolean is right in front of me during execution. Is that any way to set a boolean value programatically within Apilio? What am I missing?


1 Like

You can set a boolean variable to false with Apilio.

  1. Locate the boolean variable and click on the icon next to set false (or set true). You will get a ‘copied message’ and the URL to set false (or true) will be copied to your clipboard

  1. Now go to your logicblock and add a new ‘Webhoook’ action. Paste the content of your clipboard (URL from previous step) in the Webhook URL field and that’s all you need.


BTW, there is another way to achieve this… in the Condition you have created for the Boolean variable, you can set a timer so the condition turns back to FALSE after some time.

1 Like

Thank you! Both are brilliant but the second option is exactly what I wanted. Had I seen that option it would have been clear – " Timeout: Add a timeout to reset the condition back to false after a while. This is useful for devices such as motion sensors." :face_with_peeking_eye:


BTW, there are many motion sensors which report both motion detected / not detected.

I have four motion sensors in my garage and light is turned on when any sensor detects motion, and turns off when all sensors report no motion.


Thanks for the question and the answer!
I wonder if you really use a boolean for “darkness”? If yes, you might consider the time conditions to further simplify your setup:

1 Like

Just poor explanation. I am using the condition as recommended.