3 ms·
Some 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
by mike-cardwell 9y ago
Some 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.