Last active
November 18, 2017 23:42
-
-
Save kirkins/82ac66c223b8156497c1292a3e7def07 to your computer and use it in GitHub Desktop.
Hue commands for .bashrc
This file contains 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
# 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