Skip to content

Instantly share code, notes, and snippets.

@alrnz
Last active May 8, 2019 08:52
Show Gist options
  • Save alrnz/91ec18591d8ad5e59467 to your computer and use it in GitHub Desktop.
Save alrnz/91ec18591d8ad5e59467 to your computer and use it in GitHub Desktop.
Control Hue with linux sh-script #Shell #hue
#!/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