This commit is contained in:
joost witteveen 2020-12-21 14:58:43 +01:00
parent 5de9b722d3
commit 25bc91bf3a
1 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,8 @@
Simple python script to set colours of HUE lamps (via the bridge). Simple python script to set colours of HUE lamps (via the bridge).
Author: joost witteveen (joosteto@gmail.com) Author: joost witteveen (joosteto@gmail.com)
##Examples: ## Examples
Get a valid access code from the bridge: Get a valid access code from the bridge:
1) press the button on the bridge 1) press the button on the bridge
@ -9,10 +10,16 @@ Get a valid access code from the bridge:
`python3 hue.py --getuser yourusername` `python3 hue.py --getuser yourusername`
3) The access code will be saved in the file `accesscode`, and used for next commands. 3) The access code will be saved in the file `accesscode`, and used for next commands.
Make all lamps as bright as possible, and green: Make all lamps as bright as possible, and green. Hue ranges from 0 (red) to 6 (red again), Bri(ghtness) from 0 to 1:
`python3 hue.py --hue 2 --bri 1` `python3 hue.py --hue 2 --bri 1`
To make lamp 1 red and lamps 2 and 3 blue:
```
python3 hue.py --lamps 1 --hue 0
python3 hue.py --lamps 1,2 --hue 4
```
Show json response for a '/lights/2' http GET request: Show json response for a '/lights/2' http GET request:
`python3 hue.py --get /lights/2` `python3 hue.py --get /lights/2`