This has been deprecated and replaced with Tradfricoap. This repository is kept for reference, and will not be further developed.
Recommended python version: 3.6.x - 3.7.x, 3.5.3 also supported, but will be deprecated.
$ sudo apt install build-essential autoconf
$ python3 setup.py install
The script needs the gateway IP and key, this can be set with the config gateway option. This is only needed on first use.
./tradfri.py config gateway IP KEY
./tradfri.py --help
./tradfri list
./tradfri on <ID>
./tradfri off <ID>
./tradfri level <ID> <LEVEL> (Level: 0-254)
./tradfri wb <ID> <WHITEBALANCE> (Whitebalance: cold/normal/warm)
$ docker build --no-cache --build-arg ip=IP --build-arg key=KEY -t tradfri:latest .
IP = the ip-adress of the IKEA gateway, KEY = the master key found on the underside of the gateway.
$ docker run -d -p 1234:1234 -p 8085:8085 tradfri:latest
Test the adapter using curl (or another browser)
$ curl docker-host-ip:8085/devices