Go to file
mischa 57321944ba missing bracket 2022-07-18 16:55:39 +02:00
.gitignore added config file support, hue.conf 2020-05-07 16:13:45 +02:00
README.md missing bracket 2022-07-18 16:55:39 +02:00
add-newdeveloper.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
daylight-trigger.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
get-groups.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
get-id.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
get-lights.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
get-rules.py multiple changes 2019-11-06 22:18:42 +01:00
get-sensors.py added ZLLSwitch to get-sensors.py 2020-05-09 15:00:06 +02:00
groupctl.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
hue.conf locations added in hue.conf 2020-05-07 20:40:37 +02:00
huectl.pl minor flag change in help, -h to -c (climate) 2022-07-18 16:47:05 +02:00
lightctl.py change colormodes 2020-06-24 21:03:37 +02:00
temperature.py added config file support, hue.conf 2020-05-07 16:13:45 +02:00
wrapper-sensors-battery.sh added config file support, hue.conf 2020-05-07 16:13:45 +02:00

README.md

Hue API Scripts

All the Python scripts are no longer being worked on and has been replaced by a single Perl script.

The script is huectl.pl together with hue.conf.

$ ./huectl.pl                   
Usage: hue/huectl.pl bridge-name [-t type] [-i id] [-s sensor] [-b percent] [-a action] [-v] [-d] [-p]
Options:
bridge-name    as defined in [HOME]./hue.conf or [HOME]./.hue.conf or /etc/hue.conf
-t | --type    [ lights | sensors | groups | all | trigger ] (default: lights)
-i | --id      light-id
-s | --sensor  sensor-id
-b | --battery percent of battery level to report on, only relevant with sensors
-c | --climate show temperature of sensors in C, only relevant with sensors
-a | --action  [ on | off | state | bright | relax | morning | dimmed | evening | nightlight ] (default: state)
-v | --verbose  
-d | --debug   raw JSON output
-p | --pretty  pretty JSON output

Command examples:
hue/huectl.pl bridge1
	Displays all lights of bridge1
hue/huectl.pl bridge1 -i 8
	Check for state of light-id 8
hue/huectl.pl bridge2 -t lights -i 8 -a bright
	Turn on light-id 8 with the scene bright
hue/huectl.pl bridge2 -t trigger -i 8 -s 34 -a evening
	Check for 'dark' state of sensor-id 34, turn on light-id 8 with the scene evening
hue/huectl.pl bridge1 -t sensors -c
	Displays temperature of all sensors in C

Config example:
# huectl,pl config file locations:
# ~/hue.conf, ~/.hue.conf, /etc/hue.conf, ./.hue.conf, ./hue.conf
[bridge1]
ip = 192.168.100.101
token = bridge1token
[bridge2]
ip = 192.168.100.102
token = bridge2token