Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Posted: Tuesday 19 March 2019 16:03
Would it not be simpler to control Tradfri lights without the gateway, just using a Raspberry Pi and an XBee board?
Open source Home Automation System
https://forum.domoticz.com/
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!
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
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
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
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!
Code: Select all
python3 tradfri.tac
'No module named 'cryptography.x509''
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...
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'
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.
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
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