Blame


1 b7340d58 2022-07-18 mischa ### Hue API Scripts
2 b7340d58 2022-07-18 mischa
3 b7340d58 2022-07-18 mischa All the Python scripts are no longer being worked on and has been replaced by a single Perl script.
4 b7340d58 2022-07-18 mischa
5 57321944 2022-07-18 mischa The script is [huectl.pl](https://git.high5.nl/hue/tree/huectl.pl) together with [hue.conf](https://git.high5.nl/hue/tree/hue.conf).
6 b7340d58 2022-07-18 mischa
7 b7340d58 2022-07-18 mischa $ ./huectl.pl
8 b7340d58 2022-07-18 mischa Usage: hue/huectl.pl bridge-name [-t type] [-i id] [-s sensor] [-b percent] [-a action] [-v] [-d] [-p]
9 b7340d58 2022-07-18 mischa Options:
10 b7340d58 2022-07-18 mischa bridge-name as defined in [HOME]./hue.conf or [HOME]./.hue.conf or /etc/hue.conf
11 b7340d58 2022-07-18 mischa -t | --type [ lights | sensors | groups | all | trigger ] (default: lights)
12 b7340d58 2022-07-18 mischa -i | --id light-id
13 b7340d58 2022-07-18 mischa -s | --sensor sensor-id
14 b7340d58 2022-07-18 mischa -b | --battery percent of battery level to report on, only relevant with sensors
15 b7340d58 2022-07-18 mischa -c | --climate show temperature of sensors in C, only relevant with sensors
16 b7340d58 2022-07-18 mischa -a | --action [ on | off | state | bright | relax | morning | dimmed | evening | nightlight ] (default: state)
17 b7340d58 2022-07-18 mischa -v | --verbose
18 b7340d58 2022-07-18 mischa -d | --debug raw JSON output
19 b7340d58 2022-07-18 mischa -p | --pretty pretty JSON output
20 b7340d58 2022-07-18 mischa
21 b7340d58 2022-07-18 mischa Command examples:
22 b7340d58 2022-07-18 mischa hue/huectl.pl bridge1
23 b7340d58 2022-07-18 mischa Displays all lights of bridge1
24 b7340d58 2022-07-18 mischa hue/huectl.pl bridge1 -i 8
25 b7340d58 2022-07-18 mischa Check for state of light-id 8
26 b7340d58 2022-07-18 mischa hue/huectl.pl bridge2 -t lights -i 8 -a bright
27 b7340d58 2022-07-18 mischa Turn on light-id 8 with the scene bright
28 b7340d58 2022-07-18 mischa hue/huectl.pl bridge2 -t trigger -i 8 -s 34 -a evening
29 b7340d58 2022-07-18 mischa Check for 'dark' state of sensor-id 34, turn on light-id 8 with the scene evening
30 b7340d58 2022-07-18 mischa hue/huectl.pl bridge1 -t sensors -c
31 b7340d58 2022-07-18 mischa Displays temperature of all sensors in C
32 b7340d58 2022-07-18 mischa
33 b7340d58 2022-07-18 mischa Config example:
34 b7340d58 2022-07-18 mischa # huectl,pl config file locations:
35 b7340d58 2022-07-18 mischa # ~/hue.conf, ~/.hue.conf, /etc/hue.conf, ./.hue.conf, ./hue.conf
36 b7340d58 2022-07-18 mischa [bridge1]
37 b7340d58 2022-07-18 mischa ip = 192.168.100.101
38 b7340d58 2022-07-18 mischa token = bridge1token
39 b7340d58 2022-07-18 mischa [bridge2]
40 b7340d58 2022-07-18 mischa ip = 192.168.100.102
41 b7340d58 2022-07-18 mischa token = bridge2token
42 b7340d58 2022-07-18 mischa