[REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Moderator: leecollings
- Involver
- Posts: 4
- Joined: Thursday 18 August 2016 22:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Amsterdam
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
... thanks for your reply... I got an error stating 'please commit your changes'.. googled and found I had to discard changes (hard reset), then I got to pull the update. I guess I need to setup COAP again as the plugin shows connection errors in the log... Will try tonight after work...
Rgds,
David
Rgds,
David
Domoticz - RPi - RFXCom - KaKu - Synology - HikVision - Oregon Scientific - YouLess - Anna
-
- Posts: 3
- Joined: Tuesday 11 December 2018 18:21
- Target OS: -
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi - I have been trying to set this up for a little whilst but cannot get past the below error. Would really appreciate the forums help
!
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.6 started (command line)!
Couldn't listen on any
[Errno 98] Address already in use.

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.6 started (command line)!
Couldn't listen on any
-
- Posts: 2
- Joined: Tuesday 04 December 2018 21:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10266
- Location: Zuid-Holland
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thanks Moroen, that works quite well for now! Even if there's only one light in a group, the group combines the light to one switch. Hopefully this feature will be supported in future.moroen wrote: ↑Monday 10 December 2018 15:47 As for the 12 spotlights, you could combine them into one or more groups using the Ikea Tradfri app, and enable "Add groups as devices". You'll still end up with all the devices in the device-list, but you would also get ONE device that controls all the lights as if they were one. Then you'll able to add this single device to your switches-page..
Hardware RPi 3B+ / RFX433trxXL
Domoticz: 4.10266
Python: 3.5.3
RFX433trxXL
Domoticz: 4.10266
Python: 3.5.3
RFX433trxXL
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:willhollis18 wrote: ↑Tuesday 11 December 2018 18:23 Hi - I have been trying to set this up for a little whilst but cannot get past the below error. Would really appreciate the forums help!
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.6 started (command line)!
Couldn't listen on any[Errno 98] Address already in use.
Code: Select all
$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
M
-
- Posts: 3
- Joined: Tuesday 11 December 2018 18:21
- Target OS: -
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
[/quote]
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:
Regards,
M
[/quote]
Thanks for the quick reply. Now that seems to work but when I try below I get the below error despite getting the config created message (further below)
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:
Code: Select all
$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
M
[/quote]
Thanks for the quick reply. Now that seems to work but when I try below I get the below error despite getting the config created message (further below)
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py –skip-config –create-service
Error: Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.72 xxx
Config created!
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:
Code: Select all
$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
M
[/quote]
Thanks for the quick reply. Now that seems to work but when I try below I get the below error despite getting the config created message (further below)
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py –skip-config –create-service
Error: Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.72 xxx
Config created!
It's double dashes: --skip-config --create-service, rather than -skip-config...

Regards,
M
-
- Posts: 3
- Joined: Tuesday 11 December 2018 18:21
- Target OS: -
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Duh.. Thanks that worked now
It's double dashes: --skip-config --create-service, rather than -skip-config...![]()
Regards,
M

- Varazir
- Posts: 377
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Dose this have high CPU/Mem uses ?
Should I install it on another pi?
Should I install it on another pi?
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
- heggink
- Posts: 977
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Not with me. Notice a few more %%s but probably more due to another python plugin.
Last edited by heggink on Friday 14 December 2018 13:45, edited 1 time in total.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
-
- Posts: 562
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi!
i have bought the ikea gateway and i have some rgb bulbs as well.
is it possible to change color on the bulbs with this plugin?
is there an easy way to install this on the raspberry pi?
i have looked at this thread and it seems that it is many things that need to be installed to get it to work, and im not that good at programming,
thanks.
i have bought the ikea gateway and i have some rgb bulbs as well.
is it possible to change color on the bulbs with this plugin?
is there an easy way to install this on the raspberry pi?
i have looked at this thread and it seems that it is many things that need to be installed to get it to work, and im not that good at programming,
thanks.
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
The plugin supports setting the predefined colors (same as the Ikea app) of RGB-bulbs. At the moment the plugin is a bit non-trivial to set up, I'm constantly trying to make the install easier. If you follow the steps in the readme closely, and use sudo when installing pytradfri etc, you should be ok, the biggest hurdle is making sure that you have python version 3.5 or higher installed...tjabas wrote: ↑Thursday 20 December 2018 13:08 Hi!
i have bought the ikea gateway and i have some rgb bulbs as well.
is it possible to change color on the bulbs with this plugin?
is there an easy way to install this on the raspberry pi?
i have looked at this thread and it seems that it is many things that need to be installed to get it to work, and im not that good at programming,
thanks.
Feel free to ask any questions here in the thread or send me a PM if you run into trouble!
Regards,
M
-
- Posts: 562
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thank you for the quick reply, i now use deconz but i miss the option to change the color of the bulb, so i think that i will give it a try with the trådfri gateway.
do i need to have som bulbs connected to the ikea gateway for it to be shown in domoticz, or will the gateway be visible in domoticz anyway?
do i need to have som bulbs connected to the ikea gateway for it to be shown in domoticz, or will the gateway be visible in domoticz anyway?
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
You need to have at least one device (bulb, socket or led-driver) added to the IKEA-gateway before starting the plugin. Only devices added to the gateway are shown, there is no entry for the gateway itself.tjabas wrote: ↑Thursday 20 December 2018 15:47 Thank you for the quick reply, i now use deconz but i miss the option to change the color of the bulb, so i think that i will give it a try with the trådfri gateway.
do i need to have som bulbs connected to the ikea gateway for it to be shown in domoticz, or will the gateway be visible in domoticz anyway?
Regards,
M
-
- Posts: 45
- Joined: Monday 02 July 2018 23:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.100xx
- Location: Alkmaar, The Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
hi @moroen, I saw on the github that the LED drivers have not been tested, I have two built into an existing lamp, and I can control them via the plugin!
So the IKEA Tradfri LED drivers also work with the plugin!
So the IKEA Tradfri LED drivers also work with the plugin!
NUC Proxmox VM Stable & Raspberry Pi-3 Domoticz Beta
Tradfri Pluging by Moroen, Home made MySensors, Luftdaten, Home & Garden automatisation.
APC Back-UPS XS 700U, Modbus RTU & Janitza UMG103, RF-Link
Sonos plugins
Tradfri Pluging by Moroen, Home made MySensors, Luftdaten, Home & Garden automatisation.
APC Back-UPS XS 700U, Modbus RTU & Janitza UMG103, RF-Link
Sonos plugins
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thank you for the info. I've updated the readme!

Regards,
M
- Varazir
- Posts: 377
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Edit: all works ok now 

Last edited by Varazir on Monday 14 January 2019 10:42, edited 1 time in total.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
-
- Posts: 3
- Joined: Tuesday 16 October 2018 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.7900
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi,
thanx all for the info in this tread.
did a new fresh install, with some problems regarding the ./configure.py <ip> <key> part.
but in the end got it to work.made some notes and did again a new/fresh install on an other pi, and made some changes
to the list of commands form Thijs.
this way it worked second time without any errors.
SD Card preparation:
1. Flash SD with Raspbian Lite
2. Start up with screen and keyboard and login.
On terminal:
raspi-config
Set wifi, date, country, timezone, keyboard, enable ssh / serial / spi , reset password
reboot and login
1. sudo apt-get update
2. sudo apt-get upgrade
2.1 cd /etc
2.2 ls check for pythonX.X folder (should be python2.7)
2.3 sudo apt-get remove python2.7 (just to be sure)
3. sudo apt-get install python3-pip autoconf libtool
3.1 sudo reboot
4. curl –L install.domoticz.com | sudo bash
5. cd /home/pi/domoticz/plugins
6. git clone https://github.com/moroen/IKEA-Tradfri-plugin.git IKEA-Tradfri
7. cd IKEA-Tradfri
8. bash ./install-coap-client.sh
9. pip3 install pytradfri
10. sudo pip3 install twisted
11. pip3 install service-identity
11. sudo reboot
12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
13. python3 tradfri.tac
14. ./configure.py –-skip-config –-create-service
15. sudo cp ikea-tradfri.service /etc/systemd/system
16. sudo systemctl daemon-reload
17. sudo systemctl start ikea-tradfri.service
18. sudo systemctl enable ikea-tradfri.service
19. Sudo reboot
20. Add ikea tradfri in hardware
20.1 toggle: Observe changes to yes
hope it can help someone...
thanx for the help
regards
Mark
thanx all for the info in this tread.
did a new fresh install, with some problems regarding the ./configure.py <ip> <key> part.
but in the end got it to work.made some notes and did again a new/fresh install on an other pi, and made some changes
to the list of commands form Thijs.
this way it worked second time without any errors.
SD Card preparation:
1. Flash SD with Raspbian Lite
2. Start up with screen and keyboard and login.
On terminal:
raspi-config
Set wifi, date, country, timezone, keyboard, enable ssh / serial / spi , reset password
reboot and login
1. sudo apt-get update
2. sudo apt-get upgrade
2.1 cd /etc
2.2 ls check for pythonX.X folder (should be python2.7)
2.3 sudo apt-get remove python2.7 (just to be sure)
3. sudo apt-get install python3-pip autoconf libtool
3.1 sudo reboot
4. curl –L install.domoticz.com | sudo bash
5. cd /home/pi/domoticz/plugins
6. git clone https://github.com/moroen/IKEA-Tradfri-plugin.git IKEA-Tradfri
7. cd IKEA-Tradfri
8. bash ./install-coap-client.sh
9. pip3 install pytradfri
10. sudo pip3 install twisted
11. pip3 install service-identity
11. sudo reboot
12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
13. python3 tradfri.tac
14. ./configure.py –-skip-config –-create-service
15. sudo cp ikea-tradfri.service /etc/systemd/system
16. sudo systemctl daemon-reload
17. sudo systemctl start ikea-tradfri.service
18. sudo systemctl enable ikea-tradfri.service
19. Sudo reboot
20. Add ikea tradfri in hardware
20.1 toggle: Observe changes to yes
hope it can help someone...
thanx for the help
regards
Mark
-
- Posts: 408
- Joined: Sunday 15 January 2017 11:06
- Target OS: Linux
- Domoticz version: beta
- Location: Norway
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thanks for the great write-up, I'll add it to the readme if that's ok with you?DiSrUpTeR wrote: ↑Wednesday 09 January 2019 23:03 Hi,
thanx all for the info in this tread.
did a new fresh install, with some problems regarding the ./configure.py <ip> <key> part.
but in the end got it to work.made some notes and did again a new/fresh install on an other pi, and made some changes
to the list of commands form Thijs.
this way it worked second time without any errors.
Regards,
M
-
- Posts: 3
- Joined: Tuesday 16 October 2018 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.7900
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
no problem, where here to helpThanks for the great write-up, I'll add it to the readme if that's ok with you?
-
- Posts: 22
- Joined: Friday 28 December 2018 20:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Dank voor deze installatiehandleiding.
Ik loop alleen helaas vast met : na stap 12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
Ik moet iig eerst na stap 11 het volgende invoeren: cd ./domoticz/plugins/IKEA-Tradfri
Dan kan ik stap 12 uitvoeren, maar krijg een foutmelding.
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 192.168.1.*** ***-**-***
Traceback (most recent call last):
File "./configure.py", line 43, in <module>
psk = api_factory.generate_psk(args.key)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 164, in generate_psk
self._psk = self.request(Gateway().generate_psk(existing_psk_id))
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 96, in request
return self._execute(api_commands, timeout=timeout)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 85, in _execute
raise RequestTimeout() from None
pytradfri.error.RequestTimeout
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $
Wat doe ik fout?
Alvast bedankt!
Pieter
Ik loop alleen helaas vast met : na stap 12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
Ik moet iig eerst na stap 11 het volgende invoeren: cd ./domoticz/plugins/IKEA-Tradfri
Dan kan ik stap 12 uitvoeren, maar krijg een foutmelding.
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 192.168.1.*** ***-**-***
Traceback (most recent call last):
File "./configure.py", line 43, in <module>
psk = api_factory.generate_psk(args.key)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 164, in generate_psk
self._psk = self.request(Gateway().generate_psk(existing_psk_id))
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 96, in request
return self._execute(api_commands, timeout=timeout)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 85, in _execute
raise RequestTimeout() from None
pytradfri.error.RequestTimeout
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $
Wat doe ik fout?
Alvast bedankt!
Pieter
Who is online
Users browsing this forum: No registered users and 1 guest