4 ms·
I was about to make something just like your light bulb system for my own home (minus the vacuum part anyway). Any chance that code is open source? Very interes
by jsf01 4y ago
I was about to make something just like your light bulb system for my own home (minus the vacuum part anyway). Any chance that code is open source? Very interested in any other details you’d be willing to share.
- jffry 4y agoIt's not open source, but the good news is it's relatively simple. My bulbs are Hue bulbs which use their bridge/hub, which just plugs into ethernet and provides a REST API. The basic loop, run once per minute is: - Make one API call which returns the id/on/off/brightness of every bulb - For each bulb that is on, set its color temperature (this has to be one API call per bulb because there is no way to bulk update a list of bulbs. Bulbs can be put into at most one "room" and you can bulk set a whole room but not a subset of bulbs in that room) As far as scheduling color temperature goes - I just define a few keyframes based on minutes since midnight local time, and then linearly interpolate to get the color temp. Over 24 hours the steps are so small that the change is basically imperceptible.