Skip to content

Command line tool for controlling IKEA Tradfri gateway

Notifications You must be signed in to change notification settings

moroen/ikea-tradfri

Repository files navigation

Python Script for controlling IKEA - Tradfri lights

Note:

This has been deprecated and replaced with Tradfricoap. This repository is kept for reference, and will not be further developed.

Requirements

Recommended python version: 3.6.x - 3.7.x, 3.5.3 also supported, but will be deprecated.

Install dependencies

$ sudo apt install build-essential autoconf 

Setup

$ 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

Usage

./tradfri.py --help

List all devices

./tradfri list

Controll a light

./tradfri on <ID>
./tradfri off <ID>
./tradfri level <ID> <LEVEL> (Level: 0-254)
./tradfri wb <ID> <WHITEBALANCE> (Whitebalance: cold/normal/warm)

Using docker

Build docker image

$ 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.

Run docker image

$ docker run -d -p 1234:1234 -p 8085:8085 tradfri:latest

Test docker-adapter

Test the adapter using curl (or another browser)

$ curl docker-host-ip:8085/devices

About

Command line tool for controlling IKEA Tradfri gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages