[REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Moderator: leecollings
- pgielen
- Posts: 90
- Joined: Monday 18 February 2019 14:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Boxmeer
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Would it not be simpler to control Tradfri lights without the gateway, just using a Raspberry Pi and an XBee board?
https://robothuis.nl, RPi4B, RFXCOM XL, Aeotec Z-Stick, ESP Easy, Weatherstation, several switches and sensors, Ikea Trädfri, Philips Hue, Foscam, Reolink, Lyric T6, Ring
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hello, someone can helpme plz?
I run
else if I run
How I can proceed?
Thanks
I run
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.201 PSW
usage: configure.py [-h] {config,service} ...
configure.py: error: argument command: invalid choice: '192.168.0.201' (choose from 'config', 'service')
Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py config 192.168.0.201 PSW
Error: Unable to import pytradfri. Please check your installation!
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?
You're missing the pytradfri library. If you've installed it with pip3, make sure that you have only one python3 interpreter installed...Alessio78 wrote: ↑Tuesday 19 March 2019 20:29 Hello, someone can helpme plz?
I runelse if I runCode: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.201 PSW usage: configure.py [-h] {config,service} ... configure.py: error: argument command: invalid choice: '192.168.0.201' (choose from 'config', 'service')
How I can proceed?Code: Select all
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py config 192.168.0.201 PSW Error: Unable to import pytradfri. Please check your installation!
Thanks
Regards,
M
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi,
I have the same error "configure.py: error: argument command: invalid choice: '192.168.2.1' (choose from 'config', 'service')". How can I check if there are more interpreters installed? (And remove them.)
I build Domoticzfrom scratch and right after this I tried to install the Tradfri plugin.
Thanks for the help!
Kind regards, Rob
I have the same error "configure.py: error: argument command: invalid choice: '192.168.2.1' (choose from 'config', 'service')". How can I check if there are more interpreters installed? (And remove them.)
I build Domoticzfrom scratch and right after this I tried to install the Tradfri plugin.
Thanks for the help!
Kind regards, Rob
-
- 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?
Please check the command, the syntax has changed in the latest version:schulpr wrote: ↑Friday 22 March 2019 17:35 Hi,
I have the same error "configure.py: error: argument command: invalid choice: '192.168.2.1' (choose from 'config', 'service')". How can I check if there are more interpreters installed? (And remove them.)
I build Domoticzfrom scratch and right after this I tried to install the Tradfri plugin.
Thanks for the help!
Kind regards, Rob
Code: Select all
$ ./configure.py config 192.168.2.1 PSK
M
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi M,
Thanks for your fast response! I used this description:
...
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
...
Is step 14 also changed? Edit: Yes, ./configure.py service create
Kind regards, Rob
Thanks for your fast response! I used this description:
...
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
...
Is step 14 also changed? Edit: Yes, ./configure.py service create
Kind regards, Rob
-
- 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, it is... Please check the updated readme, but in short:schulpr wrote: ↑Friday 22 March 2019 18:40 Hi M,
Thanks for your fast response! I used this description:
...
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
...
Is step 14 also changed?
Kind regards, Rob
Code: Select all
12. ./configure.py config <IP address tradfri hub> <security KEY on rear of hub>
13. python3 tradfri.tac
14. ./configure.py service create
15. sudo cp ikea-tradfri.service /etc/systemd/system
16. sudo systemctl daemon-reload
M
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi M,
Thanks again. I was unaware of a description and just followed the explanation in this thread. Sorry for this.
Rgards, Rob
Thanks again. I was unaware of a description and just followed the explanation in this thread. Sorry for this.
Rgards, Rob
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Yes, it's fine now!
Verzonden vanaf mijn iPhone met Tapatalk
Verzonden vanaf mijn iPhone met Tapatalk
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I have the same problem. I tried these suggestions already:moroen wrote: ↑Thursday 07 February 2019 12:49fotogen wrote: ↑Tuesday 05 February 2019 1:04 Hi
Kind of desperate since im stuck in one of the first steps
I could read that another user had the same problem but no solution. When running the ./configure.py i get error message that there is no module named "pytradfri". But i can clearly see that it is there when cheching pip3 list. I have been uninstalling/re-installing python and the different scripts. Do any one have any clue? Please make my day
Code: Select all
$ /usr/bin/env python3 -m pip list
Code: Select all
/usr/bin/env python3 -m pip list
returns among the needed modules:
cryptography (0.6.1)
pytradfri (6.0.1)
Twisted (18.9.0)
Code: Select all
python3 configure.py config 192.168.1.x xxxx
Error: Unable to import pytradfri. Please check your installation!
Running on a standard raspbian system.
Another error I get, which is probably caused by the same euh, cause: when I start tradfri.tac, it cannot find the cryptography module:
Code: Select all
python3 tradfri.tac
'No module named 'cryptography.x509''
When I reinstall pytradfri, I get the following SyntaxError, even thought pip3 afterwards claims it is installed succesfully:
Code: Select all
Installing collected packages: pytradfri
Found existing installation: pytradfri 6.0.1
Uninstalling pytradfri:
Successfully uninstalled 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...
Is there anything else I can check?
-
- 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?
@axello2,
I reread your output a couple of times before I spotted this:
I would recommend upgrading to latest 3.6.x (3.6.8) or 3.7.x (3.7.3) but any version from 3.5.3 and higher should work!
Regards,
M
I reread your output a couple of times before I spotted this:
You need at least python 3.5.3 in order to use pytradfri and thus the Tradfri-plugin...axello2 wrote: ↑Thursday 28 March 2019 17:20Code: Select all
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
I would recommend upgrading to latest 3.6.x (3.6.8) or 3.7.x (3.7.3) but any version from 3.5.3 and higher should work!
Regards,
M
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Oh flup, I remember reading that somewhere in the beginning, so I apt upgraded everything, but that was not good enough. I guess I have to update my linux distribution as well. Pity, that's for another time.
Thanks for your swift answer!
Axel
Thanks for your swift answer!
Axel
-
- Posts: 1
- Joined: Saturday 30 March 2019 19:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi, I am pretty new to all of this but when I put in all the commands I got finally no errors. But when I submit the Tradfri to my Domoticz Hardware i do not get the option of an Identity or to fill in the key. What do i do wrong? Also I get the logfile saying "failed to connect to IKEA tradfri COAP-adapter! Status: 111 "
In python i have this
"ikea-tradfri.service created:
[Unit]
Description=IKEA Tradfri COAP-adapter
[Service]
Type=simple
ExecStart=/usr/local/bin/twistd --nodaemon \
--rundir=/home/pi/domoticz/plugins/IKEA-Tradfri \
--pidfile=/home/pi/domoticz/plugins/IKEA-Tradfri/twistd.pid \
--python=/home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac
User=pi
Group=pi
Restart=always
[Install]
WantedBy=multi-user.target"
Where do I go wrong?
Jojo
In python i have this
"ikea-tradfri.service created:
[Unit]
Description=IKEA Tradfri COAP-adapter
[Service]
Type=simple
ExecStart=/usr/local/bin/twistd --nodaemon \
--rundir=/home/pi/domoticz/plugins/IKEA-Tradfri \
--pidfile=/home/pi/domoticz/plugins/IKEA-Tradfri/twistd.pid \
--python=/home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac
User=pi
Group=pi
Restart=always
[Install]
WantedBy=multi-user.target"
Where do I go wrong?
Jojo
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi Moroen,
Thanks for your help. After updating to Stretch and re-installing all the dependencies again, I got it working. Apart from the update polling, but that's a known issue I guess.
issue: When I switch the Trådfri bulbs On with Domotics, the status given to the event system is correct, but when I switch On with the Trådfri remote or the Trådfri app it is still reported as Off, and vice-versa]
Cheers,
Axel
Thanks for your help. After updating to Stretch and re-installing all the dependencies again, I got it working. Apart from the update polling, but that's a known issue I guess.
issue: When I switch the Trådfri bulbs On with Domotics, the status given to the event system is correct, but when I switch On with the Trådfri remote or the Trådfri app it is still reported as Off, and vice-versa]
Cheers,
Axel
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Good morning,
Unfortunately I had do re-install my Domoticz from scratch. I have all the python plug-ins working again except the Tradfri. I get this message:
I removed python v2.7, re-installed 3.5.3. I'm on the latest beta of Domoticz. Does anyone has an idea what goes wrong?
Thanks for the suggestions!
Kind regards, Rob
Unfortunately I had do re-install my Domoticz from scratch. I have all the python plug-ins working again except the Tradfri. I get this message:
Code: Select all
2019-03-31 08:13:32.339 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'.
2019-03-31 08:13:32.339 Error: (Tradfri) Module Import failed, exception: 'ImportError'
2019-03-31 08:13:32.339 Error: (Tradfri) Module Import failed: ' Name: colors'
2019-03-31 08:13:32.339 Error: (Tradfri) Error Line details not available.
Thanks for the suggestions!
Kind regards, Rob
-
- 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's my fault... I've been doing some restructuring in preparation for a coming major change (ditching coap-client), and managed to mess up the master branch. If you pull the latest commit, it should be fixed now... Sorry for the inconvenience!schulpr wrote: ↑Sunday 31 March 2019 8:25 Good morning,
Unfortunately I had do re-install my Domoticz from scratch. I have all the python plug-ins working again except the Tradfri. I get this message:
I removed python v2.7, re-installed 3.5.3. I'm on the latest beta of Domoticz. Does anyone has an idea what goes wrong?Code: Select all
2019-03-31 08:13:32.339 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'. 2019-03-31 08:13:32.339 Error: (Tradfri) Module Import failed, exception: 'ImportError' 2019-03-31 08:13:32.339 Error: (Tradfri) Module Import failed: ' Name: colors' 2019-03-31 08:13:32.339 Error: (Tradfri) Error Line details not available.
Thanks for the suggestions!
Kind regards, Rob
Regards,
M
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi M,
No problem, it's a hobby .
git pull didn't do the trick. I removed everything and started all over. When I install " pip3 install service-identity" I get this error:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ksul_5ak/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-s7qsqisb-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ksul_5ak/cryptography/
When I continue the ressult is the same.
Kind regards, Rob
No problem, it's a hobby .
git pull didn't do the trick. I removed everything and started all over. When I install " pip3 install service-identity" I get this error:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ksul_5ak/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-s7qsqisb-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ksul_5ak/cryptography/
When I continue the ressult is the same.
Kind regards, Rob
-
- 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?
This isn't a tradfri issue, but I would guess you're lacking the libssl-dev package?schulpr wrote: ↑Sunday 31 March 2019 20:11 Hi M,
No problem, it's a hobby .
git pull didn't do the trick. I removed everything and started all over. When I install " pip3 install service-identity" I get this error:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ksul_5ak/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-s7qsqisb-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ksul_5ak/cryptography/
When I continue the ressult is the same.
Kind regards, Rob
Regards,
M
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hello M,
Your suggestion brought me a bit further. Next error:
pi@raspberrypi3:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.7 started (command line)!
Couldn't listen on any [Errno 98] Address already in use.
Even killed the complete Domoticz directory and started all over.
Kind regards, Rob
Your suggestion brought me a bit further. Next error:
pi@raspberrypi3:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.7 started (command line)!
Couldn't listen on any [Errno 98] Address already in use.
Even killed the complete Domoticz directory and started all over.
Kind regards, Rob
Who is online
Users browsing this forum: No registered users and 1 guest