Shell scripts to control my Philips Hue (using local HTTP API).
-
Obtain a Hue IP address and username, see this guide on how to obtain a username: Commanding your Philips Hue lights with PowerShell
-
Clone repo
$ git clone git@github.com:dtinth/hue.sh.git ~/Projects/hue.sh
-
Create file
~/.huerc
HUE_API=http://192.168.1.3 HUE_USERNAME=u9lJqgXjhOktRGNOlvujEKXFImE9CZTKybrvfW52
-
Set up PATH to include
~/Projects/hue.sh/bin
$ hue get lights
HTTP/1.1 200 OK
(JSON output)
$ hue put lights/1/state hue:=6510 sat:=48 bri:=254
HTTP/1.1 200 OK
(JSON output)
$ lights status
$ lights on
$ lights off
$ lights normal
$ lights dimmed
$ lights white
$ lights colorloop
$ lights nocolorloop