Hue Shell Overcome


(Convinced ST will never be unbroken…) #1

I mentioned before that I run most of my Hue scenes from shell scripts. Once created, they are easier to edit, can be run from just about anything using HAM Bridge, and from the desktop.

What I usually do to create these once I have a scene I like is to get the lights’ state from the API and sift through the numbers; copying/pasting into a text file surrounded by the necessary cURL calls to the Hue API. After doing this a half dozen times it was clearly time to automate it. I wrote a cheap and dirty little app that gets the states from the API, parses through all of the cruft that is returned, and outputs a ready to use shell script with the current settings of all of your Hues.

Currently IP address and whitelisted user name are hard coded, but if there is interest, I’ll clean it up and make it available.