Page 1 of 1
Ikea Tradfri plugin install issues
Posted: Monday 22 April 2019 14:20
by thomaspronk
Hi all,
I am new to Domoticz as I have used PiMatic for a few years. But that one is almost end of live. So it's time for Domoticz.
This morning I've installed a new installation of Domoticz, based on a Raspberry with the latest Raspbian. Domoticz is set to the Bèta and I've followed the steps from
https://github.com/moroen/IKEA-Tradfri-plugin. Unfortunately I'm stock on step 6 "Configure the Tradfri COAP-adapter:" and i got a Unkown Error.
I know Ikea have updated the hub last week, which might by the issue.
Does anyone have any idea to fix this?
Thank you kindly.
Thomas
Re: Ikea Tradfri plugin install issues
Posted: Monday 22 April 2019 19:16
by moroen
thomaspronk wrote: ↑Monday 22 April 2019 14:20
Hi all,
I am new to Domoticz as I have used PiMatic for a few years. But that one is almost end of live. So it's time for Domoticz.
This morning I've installed a new installation of Domoticz, based on a Raspberry with the latest Raspbian. Domoticz is set to the Bèta and I've followed the steps from
https://github.com/moroen/IKEA-Tradfri-plugin. Unfortunately I'm stock on step 6 "Configure the Tradfri COAP-adapter:" and i got a Unkown Error.
I know Ikea have updated the hub last week, which might by the issue.
Does anyone have any idea to fix this?
Thank you kindly.
Thomas
Could you please provide some more context, most important the Python version, and any output from the command? You should also try to run the configure.py script with the debug option and post the output.
Code: Select all
$ ./configure.py --debug config IP KEY
Regards,
M
Re: Ikea Tradfri plugin install issues
Posted: Monday 22 April 2019 19:46
by thomaspronk
Hi Moroen,
Thanks for your reply. Please see below:
Python version: 2.7.13
Python 3 version: 3.5.3
Debug logg:
Traceback (most recent call last):
File "./configure.py", line 67, 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 genera te_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 90, in _execut e
api_command.result = _process_output(return_value, parse_json)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 182, in _proce ss_output
'Please compile coap-client without debug output. See '
pytradfri.error.RequestError: Please compile coap-client without debug output. See instructions at htt ps://github.com/ggravlingen/pytradfri#installation
Re: Ikea Tradfri plugin install issues
Posted: Monday 22 April 2019 20:06
by moroen
thomaspronk wrote: ↑Monday 22 April 2019 19:46
Hi Moroen,
Thanks for your reply. Please see below:
Python version: 2.7.13
Python 3 version: 3.5.3
Debug logg:
Traceback (most recent call last):
File "./configure.py", line 67, 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 genera te_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 90, in _execut e
api_command.result = _process_output(return_value, parse_json)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 182, in _proce ss_output
'Please compile coap-client without debug output. See '
pytradfri.error.RequestError: Please compile coap-client without debug output. See instructions at htt ps://github.com/ggravlingen/pytradfri#installation
The coap-client has been compiled without the correct options: pytradfri.error.RequestError: Please compile coap-client without debug output
Take a look at the instructions from ggravlingens repo, or try compiling coap-client using the script provided with the plugin:
Regards,
M
Re: Ikea Tradfri plugin install issues
Posted: Tuesday 23 April 2019 0:15
by thomaspronk
Hi Moroen,
Thanks for your help! After reinstalling and setting Python to Python3 I've managed to install your plugin succesfully as you descriped in your manual.
The only thing is devices are not showing up in the Device section. I've configured the Hardware Device with the following settings:
- Adaptor IP Address: set to the ip of de Raspberry / localhost
- Observe Changes: YES
- Polling interval: 30 Seconds
I've tried several other configs and it doesn't work. Do you have any suggetion?
- Thomas
Re: Ikea Tradfri plugin install issues
Posted: Tuesday 23 April 2019 21:24
by thomaspronk
thomaspronk wrote: ↑Tuesday 23 April 2019 0:15
Hi Moroen,
Thanks for your help! After reinstalling and setting Python to Python3 I've managed to install your plugin succesfully as you descriped in your manual.
The only thing is devices are not showing up in the Device section. I've configured the Hardware Device with the following settings:
- Adaptor IP Address: set to the ip of de Raspberry / localhost
- Observe Changes: YES
- Polling interval: 30 Seconds
I've tried several other configs and it doesn't work. Do you have any suggetion?
- Thomas
As I was searching to a solution I found this article (
https://www.domoticz.com/forum/viewtopi ... 79#p153279) and tried the command pi@raspberrypi:~ $ python3 -i -m pytradfri 192.168.2.2.
The logfile shows Domoticz is talking to de Hub and de hub to Domoticz . I beleive my domoticz is missing the security code somewhere?
Re: Ikea Tradfri plugin install issues
Posted: Wednesday 24 April 2019 1:05
by moroen
thomaspronk wrote: ↑Tuesday 23 April 2019 21:24
thomaspronk wrote: ↑Tuesday 23 April 2019 0:15
Hi Moroen,
Thanks for your help! After reinstalling and setting Python to Python3 I've managed to install your plugin succesfully as you descriped in your manual.
The only thing is devices are not showing up in the Device section. I've configured the Hardware Device with the following settings:
- Adaptor IP Address: set to the ip of de Raspberry / localhost
- Observe Changes: YES
- Polling interval: 30 Seconds
I've tried several other configs and it doesn't work. Do you have any suggetion?
- Thomas
As I was searching to a solution I found this article (
https://www.domoticz.com/forum/viewtopi ... 79#p153279) and tried the command pi@raspberrypi:~ $ python3 -i -m pytradfri 192.168.2.2.
The logfile shows Domoticz is talking to de Hub and de hub to Domoticz . I beleive my domoticz is missing the security code somewhere?
You could try a dry-run of the adapter:
If the adapter works, you should see all the devices connected to the gateway.
As for no devices showing up in domoticz, a couple of other users have had the same problem. Never managed to track it down completely, but if it's not to much of a hassle, a complete reset of domoticz has solved this before. The easiest way to test is to stop domoticz, rename the domoticz.db file to something else, and restart domoticz, and the add the IKEA-plugin again...
Regards,
M
Re: Ikea Tradfri plugin install issues
Posted: Wednesday 24 April 2019 20:09
by thomaspronk
Hi Moroen,
Finally it’s fixed! I believe there where some issues with auto starting of the Tradfri plugin. I noticed after trying to start the plugin manually. All my Tradri devices did showed up and it was possible to change de light status until I closed the terminal session. After multiple times following step 7 of your instructions, the plugin is starting automatically.
Many thanks you for your support! It helped me a lot!
Kind Regards,
Thomas
Re: Ikea Tradfri plugin install issues
Posted: Friday 10 January 2020 10:46
by ZatarraNL
thomaspronk wrote: ↑Wednesday 24 April 2019 20:09
Finally it’s fixed! I believe there where some issues with auto starting of the Tradfri plugin. I noticed after trying to start the plugin manually. All my Tradri devices did showed up and it was possible to change de light status until I closed the terminal session. After multiple times following step 7 of your instructions, the plugin is starting automatically.
Hi Thomas,
I have a similar problem. Everything installed just fine (except some issues with the pip3 update). But I can't find any devices in my devices-list. Can you describe what you did? What is step 7? I only find 6 steps on the github-page.
gives me:
Code: Select all
65536: TRADFRI remote control (None - None)
65537: TRADFRI bulb (0 - None)
Domoticz log says:
Code: Select all
020-01-10 11:06:54.562 Error: (IKEA-Tradfri) failed to load 'plugin.py', Python Path used was '~/domoticz/plugins/IKEA-Tradfri/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-x86_64-linux-gnu:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2020-01-10 11:06:54.562 Error: (TRADFRI-gateway) Module Import failed, exception: 'NameError'
2020-01-10 11:06:54.562 Error: (TRADFRI-gateway) Error Line details not available.
And
Code: Select all
Error: TRADFRI-gateway hardware (22) thread seems to have ended unexpectedly
I have everything installed following the 6 steps on Moroens github page. The plugin has been added in the hardware section of Domoticz. I tried several different options there, such as yes/no for "add groups as devices" en yes/no for "observe changes". So far no devices in the device-section.
My domoticz is running on a debian 9 x86-64 virtual machine.
I have no need for reinstalling domoticz. I really want to prevent that.
Re: Ikea Tradfri plugin install issues
Posted: Thursday 23 January 2020 22:41
by Bpasop
ZatarraNL wrote: ↑Friday 10 January 2020 10:46
Hi Thomas,
I have a similar problem. Everything installed just fine (except some issues with the pip3 update). But I can't find any devices in my devices-list. Can you describe what you did? What is step 7? I only find 6 steps on the github-page.
gives me:
Code: Select all
65536: TRADFRI remote control (None - None)
65537: TRADFRI bulb (0 - None)
Domoticz log says:
Code: Select all
020-01-10 11:06:54.562 Error: (IKEA-Tradfri) failed to load 'plugin.py', Python Path used was '~/domoticz/plugins/IKEA-Tradfri/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-x86_64-linux-gnu:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2020-01-10 11:06:54.562 Error: (TRADFRI-gateway) Module Import failed, exception: 'NameError'
2020-01-10 11:06:54.562 Error: (TRADFRI-gateway) Error Line details not available.
And
Code: Select all
Error: TRADFRI-gateway hardware (22) thread seems to have ended unexpectedly
I have everything installed following the 6 steps on Moroens github page. The plugin has been added in the hardware section of Domoticz. I tried several different options there, such as yes/no for "add groups as devices" en yes/no for "observe changes". So far no devices in the device-section.
My domoticz is running on a debian 9 x86-64 virtual machine.
I have no need for reinstalling domoticz. I really want to prevent that.
Hi ZatarraNL,
Did you solved the problem yet? I got exactly the same problem and can't get it solved.
Code: Select all
2020-01-22 23:57:51.912 Error: (IKEA-Tradfri) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/IKEA-Tradfri/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2020-01-22 23:57:51.912 Error: (Ikea) Module Import failed, exception: 'NameError'
2020-01-22 23:57:51.912 Error: (Ikea) Error Line details not available.
and
Code: Select all
Lights:
65540: Nachtlamp 1 (0 - 62 - None)
65539: Nachtlamp 2 (0 - 63 - None)
65541: TRADFRI bulb 3 (0 - 0 - None)
Plugs:
65537: Lamp (0 - 0 - None)
65538: Buitenlamp (0 - 0 - None)
Others:
65536: TRADFRI on/off switch (None - None - None)
Re: Ikea Tradfri plugin install issues
Posted: Saturday 01 February 2020 9:59
by ZatarraNL
Bpasop wrote: ↑Thursday 23 January 2020 22:41
ZatarraNL wrote: ↑Friday 10 January 2020 10:46
...
Hi ZatarraNL,
Did you solved the problem yet? I got exactly the same problem and can't get it solved.
Code: Select all
2020-01-22 23:57:51.912 Error: (IKEA-Tradfri) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/IKEA-Tradfri/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2020-01-22 23:57:51.912 Error: (Ikea) Module Import failed, exception: 'NameError'
2020-01-22 23:57:51.912 Error: (Ikea) Error Line details not available.
and
Code: Select all
Lights:
65540: Nachtlamp 1 (0 - 62 - None)
65539: Nachtlamp 2 (0 - 63 - None)
65541: TRADFRI bulb 3 (0 - 0 - None)
Plugs:
65537: Lamp (0 - 0 - None)
65538: Buitenlamp (0 - 0 - None)
Others:
65536: TRADFRI on/off switch (None - None - None)
Hi Bpasop,
I did succeed. Even without to reinstall domoticz. It seemed to be a python-version issue. All posted at this thread:
https://www.domoticz.com/forum/viewtopi ... 40#p233803
No really clear answer, though..
Good luck.
Re: Ikea Tradfri plugin install issues
Posted: Saturday 01 February 2020 11:34
by sancla
There are a few steps you can take, try this guide and see if this helps:
https://sancla.com/domoticz/domoticz-and-ikea-tradfri/
Re: Ikea Tradfri plugin install issues
Posted: Saturday 01 February 2020 13:51
by moroen
Python version management is a friggin nightmare. These kind of problems are almost always more than one python interpreter on the system, causing the library that domoticz uses to be from another interpreter than pip3 is using, and thus unable to find the required modules. Using the system provided python usually works, but then you´re stuck on the version provided by the distro.
The plugin provides another API than py3coap exactly for this reason. Try upgrading to the latest version of the plugin (0.8.1 at the moment), and take a look at the readme (
https://github.com/moroen/IKEA-Tradfri- ... /README.md) for instructions on using coapcmd instead.
Regards,
M