Sunrise and -set rules

Pekka Rintanen shared this idea 5 months ago
Under Consideration

Sun-based rules do not work in Zipabox. I've been using a combination of Apilio and IFTTT, but now the IFTTT webhooks applets became paid. I noticed that you can send webhooks commands directly from Apilio to Zipabox.

I made Apilio Logicblock which triggers action half hour after sunset. Logicblock makes a web request to URL of Zipabox Virtual meter. The URL can be find in the settings of the attribute 'VALUE1' in the device browser. The method of the Webhooks request is POST and content type application/json.


WORK STEPS
- Add new device "Virtual meter" to Zipabox. The URL can be find in the settings of the attribute “VALUE1” in the device browser.
- Set the location of your home location in the Apilio settings so that it is used to calculate sunrise and sunset.
- Create a new condition of type "time event", for example at sunset. As an option, it is possible to set an offset if you want the event to run before or after sunset. Time event will trigger connected Logicblock when it happen.
- Make new Logicblock. Select all conditions that shall be checked when this Logicblock runs. Add webhooks action for positive result. Copy the URL of “VALUE1” to Webhooks and add to end 1 as value. The method is POST.
- Make a new rule to Zipabox. Add operation “=” to “When” block and METER -condition block to it. Copy virtual meter to condition and choose “VALUE1” variable and value 1. Add desired actions to the rule, for example, turning on the lights. Add SET -block as last action and set VALUE1 to 0. All actions are performed WHEN a condition is true.
- That’s it!

Leave a Comment
 
Attach a file