4 ms·
Cron job on my home server starts sending commands over zwave at 6am for about half an hour to slowly increase the brightness of my master bedroom light from 0
by mike-cardwell 9y ago
Cron job on my home server starts sending commands over zwave at 6am for about half an hour to slowly increase the brightness of my master bedroom light from 0% to 100% at 1% increments. So when I get up, it's not pitch black, and I don't go from zero to blinding light in one moment. Probably my favourite thing I've done with home automation so far.
- vonseel 9y agoBuilt into the Hue app, but I bet it was fun to code :)
- mike-cardwell 9y agoSome basic bash scripting and a cron job. Can I control a Hue light bulb with some basic bash scripting and a cron job? Can I do it without calling out to some Internet based web service?
- a254613e 9y agoYes. curl --request PUT --data '{"on":true}' http://<local bridge ip address>/api/<your api key>/lights/<light id>/state https://developers.meethue.com/documentation/getting-started https://developers.meethue.com/documentation/getting-started
- mike-cardwell 9y agoThat's good. Does it generate any Internet traffic it all, or is it entirely local? One thing I noticed from your command: No authentication. Looks like any software on any device on the LAN can control the light. Is that really true?
- wrboyce 9y agoYou were being offered a slightly simplified example, the Hue bridge does indeed require authentication. To answer your other question, the bridge can be accessible via the online “meethue” portal for things like easy remote access but I think this is optional. EDIT: oh, and it’ll generate internet traffic for firmware updates I suppose!
- mike-cardwell 9y agoOk. I'll probably stick with Z-Wave then. Hue doesn't seem to offer anything extra.
- cdcarter 9y agoYes, the Hue hub will expose a local internal REST API where you can easily GET the status of your bulbs and POST updates, and really do anything the Hue app can. You just curl to your hub and everything...works.