Last active
May 8, 2019 08:52
-
-
Save alrnz/91ec18591d8ad5e59467 to your computer and use it in GitHub Desktop.
Control Hue with linux sh-script #Shell #hue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/tclsh | |
# Use with: /path/to/scene.tcl SCENEID-on-0 | |
# Hue Bridge IP | |
set ip "192.168.0.67" | |
# Hue Username created via interface: http://www.developers.meethue.com/documentation/getting-started | |
set user "123abc456def" | |
if { $argc < 1 } { | |
puts "Usage: scene.tcl group state" | |
puts "" | |
puts " scene ID of the scene to start" | |
exit 1 | |
} | |
set scene [lindex $argv 0] | |
set url "http://$ip:80/api/$user/groups/0/action" | |
exec echo "{\"scene\": \"$scene\"}" | /usr/local/addons/cuxd/curl -f -s -T - $url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment