Logicblock to turn lights on when arriving at home at night only
Hi! I am trying to configure a logicblock that turns my lights on when arriving home only at night.
For that, I use IFTTT with WeatherUnderground which makes a webrequest to apilio when it’s Sunset. I linked it to the Boolean variable call “Night_Time” with the link related to “Set True”. I’ve also done the same thing with sunrise related to “Set False”
I also use Life360 for the location. So IFTTT makes a webrequest to Apilio when arriving Home. I linked it to the Boolean variable call “At_Home” with the link related to “Set True”
Then, I add my two Boolean variables to the conditions section in Apilio with the required state “True”
I’ve created a logicblocks called “lights_on_dark” linked to conditions: it_at-home, it_night-time.
In IFTTT, I created a Webhooks applet : If Maker Event “lights_on_dark”, then activate a scene in Smartlife app (my lights).
When I click on the evaluation trigger link in Apilio, it works. But in practice, it doesn’t work. Also, the WeatherUnderground states that the Sunrise is at 10:35PM, which is not correct, too late.
Is there a way to make it work? What did I do incorrectly? Can I ask for a specific lapse of time instead of sunrise and sunset ?
Thank you for your help
Sounds all quite good, but you can make it a bit simpler:
- The “Night_Time” Boolean variable is perfect - Instead of the Life360 Applet setting a variable, you can re-configure the applet to call the Logicblock evaluation link (you find it at the bottom of the Logicblock page) - As a consequence, you can delete the “At_Home” variable / remove it from the Logicblock
This should then work as expected.
IFTTT has a “Date / Time” Applet that you can use instead of the WeatherUnderground sunrise/sunset.