A newer approach.
In the last post, I developed a way to use a python script to control my HUE porch lights (front and back porch) to turn on and off at dawn and dusk using 'sunrise' and 'sunset' calculations for my given latitude and longitude.
I tend to be persistant in my searches for answers and knowledge, and, not surpiisngly, I continued the search for rise/set control of my HUE lights.
Success. After a lot of digging and reading and thinking, I came up with a way to program using the HUE bridge's internal 'Daylight' sensor.
Now, all I need to do is use cURL or the CLIP debugger to program the bridge to turn the lights off/on at dawn and dusk.
The 'Daylight' sensor does what my programming does: calculates sunrise and sunset for a given day and latitude/longitude. A boolean variable is set to true or false depending on the time of day and the rise/set times. 'Daylight' is false for night and true for day. There is an offset option for rise and set. This allows adding or subtracting minutes to the on/off times, for convenience.
This discovery allows me to reduce the workload of the RPi by deferring to the HUE bridge instead.
Comments
Post a Comment