[REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Moderator: leecollings
-
- Posts: 18
- Joined: Tuesday 10 January 2017 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi bought a Tradfri gateway but can't connect it with the script:
I did enter:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 10.0.0.14 EwulNJJdX2UhrLCy
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Security key is correct.
I did enter:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 10.0.0.14 EwulNJJdX2UhrLCy
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Security key is correct.
-
- 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?
If you could please fetch the latest development-branch, run configure.py with the (newly added) --debug argument, and post the output?Flappie wrote: ↑Monday 05 November 2018 18:43 Hi bought a Tradfri gateway but can't connect it with the script:
I did enter:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 10.0.0.14 EwulNJJdX2UhrLCy
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Security key is correct.
Code: Select all
$ cd IKEA-Tradfri
$ git checkout development
$ git pull
$ ./configure.py --debug IP KEY
M
-
- Posts: 18
- Joined: Tuesday 10 January 2017 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
This is the output:moroen wrote: ↑Monday 05 November 2018 21:11If you could please fetch the latest development-branch, run configure.py with the (newly added) --debug argument, and post the output?Flappie wrote: ↑Monday 05 November 2018 18:43 Hi bought a Tradfri gateway but can't connect it with the script:
I did enter:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 10.0.0.14 EwulNJJdX2UhrLCy
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Security key is correct.
Regards,Code: Select all
$ cd IKEA-Tradfri $ git checkout development $ git pull $ ./configure.py --debug IP KEY
M
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 10.0.0.14 EwulNJJdX2UhrLCy
Traceback (most recent call last):
File "./configure.py", line 39, 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 88, in _execute
'Error executing request: {}'.format(err)) from None
pytradfri.error.RequestError: Error executing request: Command '['coap-client', '-u', 'Client_identity', '-k', 'EwulNJJdX2UhrLCy', '-v', '0', '-m', 'post', '-f', '-', 'coaps://10.0.0.14:5684/15011/9063']' returned non-zero exit status 1
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $
-
- 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?
Is coap-client installed and working from the command line?Flappie wrote: ↑Tuesday 06 November 2018 8:24This is the output:moroen wrote: ↑Monday 05 November 2018 21:11If you could please fetch the latest development-branch, run configure.py with the (newly added) --debug argument, and post the output?Flappie wrote: ↑Monday 05 November 2018 18:43 Hi bought a Tradfri gateway but can't connect it with the script:
I did enter:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 10.0.0.14 EwulNJJdX2UhrLCy
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
Security key is correct.
Regards,Code: Select all
$ cd IKEA-Tradfri $ git checkout development $ git pull $ ./configure.py --debug IP KEY
M
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 10.0.0.14 EwulNJJdX2UhrLCy
pytradfri.error.RequestError: Error executing request: Command '['coap-client', '-u', 'Client_identity', '-k', 'EwulNJJdX2UhrLCy', '-v', '0', '-m', 'post', '-f',
Regards,
M
-
- Posts: 18
- Joined: Tuesday 10 January 2017 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Yes, COAP-Client is installed:moroen wrote: ↑Tuesday 06 November 2018 10:02Is coap-client installed and working from the command line?Flappie wrote: ↑Tuesday 06 November 2018 8:24This is the output:moroen wrote: ↑Monday 05 November 2018 21:11
If you could please fetch the latest development-branch, run configure.py with the (newly added) --debug argument, and post the output?
Regards,Code: Select all
$ cd IKEA-Tradfri $ git checkout development $ git pull $ ./configure.py --debug IP KEY
M
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 10.0.0.14 EwulNJJdX2UhrLCy
pytradfri.error.RequestError: Error executing request: Command '['coap-client', '-u', 'Client_identity', '-k', 'EwulNJJdX2UhrLCy', '-v', '0', '-m', 'post', '-f',
Regards,
M
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ coap-client
coap-client v4.2.0alpha -- a small CoAP implementation
(c) 2010-2015 Olaf Bergmann <[email protected]>
-
- 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?
Flappie wrote: ↑Tuesday 06 November 2018 10:41 Yes, COAP-Client is installed:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ coap-client
coap-client v4.2.0alpha -- a small CoAP implementation
(c) 2010-2015 Olaf Bergmann <[email protected]>
Ok, which version of python and pytradfri?
Regards,
M
-
- Posts: 8
- Joined: Monday 09 July 2018 16:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: The Netherlands, Almere
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi Moroen,
I can't get the IKEA Trådfri to connect as well.
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
both the IP and Master Key I supply should be fine.
after running the debug I see:
Traceback (most recent call last):
File "./configure.py", line 39, 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
I have the COAP client installed:
coap-client
coap-client v4.1.2 -- a small CoAP implementation
(c) 2010-2015 Olaf Bergmann <[email protected]>
python version:
python --version
Python 3.5.3
I can't get the IKEA Trådfri to connect as well.
Script says:
Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.
both the IP and Master Key I supply should be fine.
after running the debug I see:
Traceback (most recent call last):
File "./configure.py", line 39, 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
I have the COAP client installed:
coap-client
coap-client v4.1.2 -- a small CoAP implementation
(c) 2010-2015 Olaf Bergmann <[email protected]>
python version:
python --version
Python 3.5.3
Raspberry pi
Zigbee2MQTT
Z-Wave usb
Zigbee2MQTT
Z-Wave usb
-
- 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?
@TJLuijt and Flappie,
Flappie: The error suggests that the module can't execute coap-client for some reason.
TJLuict: coap-client appears to be called, but times out before receiving a reply. The most common cause for this is either wrong IP or master key.
Could you both try to run coap-client from the command-line, to check if coap-client can communicate with the gw?
Note: "Client_identity" should be entered exactly as shown, just substitute IP and KEY...
Regards,
M
Flappie: The error suggests that the module can't execute coap-client for some reason.
TJLuict: coap-client appears to be called, but times out before receiving a reply. The most common cause for this is either wrong IP or master key.
Could you both try to run coap-client from the command-line, to check if coap-client can communicate with the gw?
Code: Select all
$ coap-client -u "Client_identity" -k KEY -m get coaps://IP:5684/.well-known/core
v:1 t:CON c:GET i:8490 {} [ ]
<//15006>;ct=0;obs,<//15001>;ct=0;obs,<//15004>;ct=0;obs,<//15004/add>;ct=0,<//15004/remove>;ct=0,<//15010>;ct=0;obs,<//15005>;ct=0;obs,<//15011/15012>;ct=0;obs,<//15011/9034>;ct=0,<//15011/9030>;ct=0,<//15011/9031>;ct=0,<//15011/9102>;ct=0,<//15011/9094>;v:1 t:CON c:GET i:8491 {} [ ]
Regards,
M
-
- Posts: 8
- Joined: Monday 09 July 2018 16:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: The Netherlands, Almere
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi Moroen,
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidated
I can ping my tradfri gateway so the ip should be fine.
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidated
I can ping my tradfri gateway so the ip should be fine.
Raspberry pi
Zigbee2MQTT
Z-Wave usb
Zigbee2MQTT
Z-Wave usb
-
- 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?
That reply indicates that there is something wrong with the ident/psk-pair. Client_identity is the default ident, so the error is most likely the key...TJLuijt wrote: ↑Wednesday 07 November 2018 20:42 Hi Moroen,
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidated
Regards,
M
-
- Posts: 8
- Joined: Monday 09 July 2018 16:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: The Netherlands, Almere
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
This is the security key on the back of the gateway right?
TJLuijt wrote: ↑Wednesday 07 November 2018 21:42
Hi Moroen,
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidatedby moroen » Thursday 08 November 2018 1:52
That reply indicates that there is something wrong with the ident/psk-pair. Client_identity is the default ident, so the error is most likely the key...
I have the privilege of having an "O" in my code so have tried all the different versions of that as well but still no luck

Raspberry pi
Zigbee2MQTT
Z-Wave usb
Zigbee2MQTT
Z-Wave usb
-
- 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?
Yes, the key on the label on the back...TJLuijt wrote: ↑Thursday 08 November 2018 9:55This is the security key on the back of the gateway right?
TJLuijt wrote: ↑Wednesday 07 November 2018 21:42
Hi Moroen,
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidatedby moroen » Thursday 08 November 2018 1:52
That reply indicates that there is something wrong with the ident/psk-pair. Client_identity is the default ident, so the error is most likely the key...
I have the privilege of having an "O" in my code so have tried all the different versions of that as well but still no luck![]()
Have you tried to manually enter the KEY in the official IKEA app? Just to make sure the key is correct...
Regards,
M
-
- Posts: 8
- Joined: Monday 09 July 2018 16:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: The Netherlands, Almere
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Yes, this works so that should be solid as well.moroen wrote: ↑Thursday 08 November 2018 13:27Yes, the key on the label on the back...TJLuijt wrote: ↑Thursday 08 November 2018 9:55This is the security key on the back of the gateway right?
TJLuijt wrote: ↑Wednesday 07 November 2018 21:42
Hi Moroen,
thanks for the swift reply.
the result is:
sudo coap-client -u "Client_identity" -k ********* -m get coaps://***.***.***.**/.well-known/core v:1 t:CON c:GET i:8490 {} [ ]
v:1 t:CON c:GET i:4124 {} [ ]
Nov 07 20:41:09 ALRT 20 invalidate peer
Nov 07 20:41:09 WARN received alert, peer has been invalidated
I have the privilege of having an "O" in my code so have tried all the different versions of that as well but still no luck![]()
Have you tried to manually enter the KEY in the official IKEA app? Just to make sure the key is correct...
Regards,
M
I also used a QR reader and got it as text and copied it in the terminal statement.
Raspberry pi
Zigbee2MQTT
Z-Wave usb
Zigbee2MQTT
Z-Wave usb
-
- Posts: 53
- Joined: Saturday 10 March 2018 2:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I really can't get this plugin installed.
I did a reboot to make sure that wouldnt cause any issues.
i hope you can help me out.
Code: Select all
pi@raspberrypi:/ $ pip uninstall pytradfri
Cannot uninstall requirement pytradfri, not installed
Storing debug log for failure in /home/pi/.pip/pip.log
pi@raspberrypi:/ $ sudo pip uninstall pytradfri
Cannot uninstall requirement pytradfri, not installed
Storing debug log for failure in /root/.pip/pip.log
pi@raspberrypi:/ $ sudo find -name pytradfri
pi@raspberrypi:/ $ sudo find . -name pytradfri
pi@raspberrypi:/ $ sudo shutdown -r now
Connection to rappi closed by remote host.
Connection to rappi closed.
Code: Select all
pi@raspberrypi:~ $ cd domoticz/plugins/
pi@raspberrypi:~/domoticz/plugins $ which python3
/usr/bin/python3
pi@raspberrypi:~/domoticz/plugins $ sudo pip install pytradfri
Downloading/unpacking pytradfri
Downloading pytradfri-6.0.1.tar.gz
Running setup.py (path:/tmp/pip-build-oV6C6L/pytradfri/setup.py) egg_info for package pytradfri
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
Installing collected packages: pytradfri
Running setup.py install for pytradfri
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
File "/usr/local/lib/python2.7/dist-packages/pytradfri/command.py", line 9
def __init__(self, method, path, data=None, *, parse_json=True,
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/__main__.py", line 29
"Tradfri gateway:", end=" ")
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/util.py", line 12
def load_json(filename: str) -> Union[List, Dict]:
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/api/libcoap_api.py", line 46
def _execute(self, api_command, *, timeout=None):
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/api/aiocoap_api.py", line 67
async def _get_protocol(self):
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/device.py", line 204
def set_state(self, state, *, index=0):
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/pytradfri/gateway.py", line 121
def get_mood(self, mood_id, *, mood_parent=None):
^
SyntaxError: invalid syntax
Successfully installed pytradfri
Cleaning up...
pi@raspberrypi:~/domoticz/plugins $ sudo find / -name pytradfri
/usr/local/lib/python2.7/dist-packages/pytradfri
pi@raspberrypi:~/domoticz/plugins $ sudo ./configure.py 192.168.1.194 c9b0qCubbpNdyDvF
sudo: ./configure.py: command not found
pi@raspberrypi:~/domoticz/plugins $ cd IKEA-Tradfri/
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo ./configure.py 192.168.1.194 c9b0qCubbpNdyDvF
Traceback (most recent call last):
File "./configure.py", line 3, in <module>
from pytradfri import Gateway
ImportError: No module named 'pytradfri'
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ git checkout development
fatal: Unable to create '/home/pi/domoticz/plugins/IKEA-Tradfri/.git/index.lock': Permission denied
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ git checkout development
fatal: Unable to create '/home/pi/domoticz/plugins/IKEA-Tradfri/.git/index.lock': Permission denied
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo git checkout development
Branch development set up to track remote branch development from origin.
Switched to a new branch 'development'
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ git pull
error: cannot open .git/FETCH_HEAD: Permission denied
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo git pull
Already up-to-date.
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo ./configure.py <ip> <code>
Traceback (most recent call last):
File "./configure.py", line 3, in <module>
from pytradfri import Gateway
ImportError: No module named 'pytradfri'
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip install pytradfri
Requirement already satisfied (use --upgrade to upgrade): pytradfri in /usr/local/lib/python2.7/dist-packages
Cleaning up...
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo ./configure.py --debug <ip> <key>
Traceback (most recent call last):
File "./configure.py", line 3, in <module>
from pytradfri import Gateway
ImportError: No module named 'pytradfri'
-
- 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're installing pytradfri for python2.7... Try:RapTile wrote: ↑Friday 09 November 2018 17:15 I really can't get this plugin installed.
i hope you can help me out.Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip install pytradfri Requirement already satisfied (use --upgrade to upgrade): pytradfri in /usr/local/lib/python2.7/dist-packages Cleaning up... pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo ./configure.py --debug <ip> <key> Traceback (most recent call last): File "./configure.py", line 3, in <module> from pytradfri import Gateway ImportError: No module named 'pytradfri'
Code: Select all
$ sudo pip3 install pytradfri
Regards,
M
-
- Posts: 53
- Joined: Saturday 10 March 2018 2:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thanks for the tip but it did not work.moroen wrote: ↑Friday 09 November 2018 17:47Using pip3 should make sure that pip installs the library for python3...Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip install pytradfri Requirement already satisfied (use --upgrade to upgrade): pytradfri in /usr/local/lib/python2.7/dist-packages [code] $ sudo pip3 install pytradfri
Regards,
M
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo find / -name pytradfri
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip3 uninstall pytradfri
Cannot uninstall requirement pytradfri, not installed
Storing debug log for failure in /root/.pip/pip.log
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip uninstall pytradfri
Cannot uninstall requirement pytradfri, not installed
Storing debug log for failure in /root/.pip/pip.log
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip3 install pytradfri
Downloading/unpacking pytradfri
Downloading pytradfri-6.0.1.tar.gz
Running setup.py (path:/tmp/pip-build-xf_shnel/pytradfri/setup.py) egg_info for package pytradfri
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
Installing collected packages: pytradfri
Running setup.py install for pytradfri
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
File "/usr/local/lib/python3.4/dist-packages/pytradfri/api/aiocoap_api.py", line 67
async def _get_protocol(self):
^
SyntaxError: invalid syntax
Successfully installed pytradfri
Cleaning up...
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $
-
- 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're getting closer... It appears your version of python is 3.4, you need at least 3.5 or higher...RapTile wrote: ↑Friday 09 November 2018 18:45Code: Select all
Installing collected packages: pytradfri Running setup.py install for pytradfri /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) File "/usr/local/lib/python3.4/dist-packages/pytradfri/api/aiocoap_api.py", line 67 async def _get_protocol(self): ^ SyntaxError: invalid syntax

Regards,
M
-
- 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?
Hm, I'm running out of ideas here... The coap-client call to .well-know/core using ident/psk and the coaps-protocol is the most low-level test I can think of...TJLuijt wrote: ↑Thursday 08 November 2018 15:28Yes, this works so that should be solid as well.
I also used a QR reader and got it as text and copied it in the terminal statement.
Regards,
M
-
- Posts: 53
- Joined: Saturday 10 March 2018 2:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I think i fixed that but now i get:moroen wrote: ↑Friday 09 November 2018 19:15You're getting closer... It appears your version of python is 3.4, you need at least 3.5 or higher...RapTile wrote: ↑Friday 09 November 2018 18:45Code: Select all
Installing collected packages: pytradfri Running setup.py install for pytradfri /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) File "/usr/local/lib/python3.4/dist-packages/pytradfri/api/aiocoap_api.py", line 67 async def _get_protocol(self): ^ SyntaxError: invalid syntax
![]()
Regards,
M
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo pip3 install pytradfri
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pytradfri
Could not fetch URL https://pypi.python.org/simple/pytradfri/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pytradfri (from versions: )
No matching distribution found for pytradfri
-
- Posts: 53
- Joined: Saturday 10 March 2018 2:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I think i fixed it with:
Code: Select all
Download Python-3.6.1.tar.xz from https://www.python.org/
Unzip the file and keep the folder in home directory.
Open terminal in that directory and perform the following commands:
./configure
make
make test
sudo make install
This will install Python 3.6 but pip3 may not be working.Install necessary modules using:
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Now write the following to re run the installation:
sudo make
sudo make install
Now you can install packages with Python 3.6 using pip3 command.
Who is online
Users browsing this forum: No registered users and 1 guest