Applescript functions for controlling Phillips Hue lightbulbs.
Open Hugo.scpt
in the scripts directory and enter your bridge IP and app key on the first and second line.
If you have more than three bulbs, add them by number to the bulbs list in the third line.
property bulbs : {1, 2, 3, 4, 5, 6, 7, 8}
Save and exit hugo.scpt
. Your done with setting up.
Open up the Scripts folder and open sceneEnergize.scpt
as an example.
Adjust the file alias on the first line to correctly point to the hugo.scpt
file (you will need to do this for each script).
Copy the line starting with "set energize...
" and paste it so it is duplicated on the next line.
Edit the new line to look like this (or adjust each parameter as you desire):
set myNewScene to the quoted form of "{\"on\": true,\"bri\": 120,\"hue\": 14000,\"xy\": [0.3151,0.3252],\"sat\": 132,\"ct\": 155,\"transitiontime\": 10}"
Change the setBulb function to call your new scene.
_hugo's setBulb(0, myNewScene)
Run the new script to see your scene!
_hugo's setBulb(0, myNewScene) <-- Change 0 to 1 to control a single bulb
Use the app of your choice to set the lights, then use getState.scpt
to spit out the copy and paste-friendly string for your scenes or bulb settings.
Have a look at the other scripts for other ideas and ways to use Hugo!