Skip to content

Instantly share code, notes, and snippets.

@kirkins
Last active November 18, 2017 23:42
Show Gist options
  • Save kirkins/82ac66c223b8156497c1292a3e7def07 to your computer and use it in GitHub Desktop.
Save kirkins/82ac66c223b8156497c1292a3e7def07 to your computer and use it in GitHub Desktop.
Hue commands for .bashrc
# Add credentials and IP
# Use: hue <light_number/room_number> <brightness>
hue_user=
hue_ip=
hue() {
curl -d "{\"bri\":$2 }" -X PUT $hue_ip/api/$hue_user/lights/$1/state
}
room() {
curl -X PUT -d "{\"bri\": $2}" $hue_ip/api/$hue_user/groups/$1/action
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment