Closed jacobhallgren closed 5 years ago
Your Python 3 version is too low. You need 3.5 at least.
root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# /usr/local/bin/python3.6 ./configure.py 10.22.2.4 fnYhASmWfdfyFqa Failed to generate ID/PSK-pair. Check that the IP and Master Key is correct.
Is the format correct?
Did the compile succeed? Because that is step 1
I think so
ystem@domoticz:~$ cd pytradfri/ system@domoticz:~/pytradfri$ sudo /usr/local/bin/python3.6 setup.py install [sudo] password for system: running install running bdist_egg running egg_info creating pytradfri.egg-info writing pytradfri.egg-info/PKG-INFO writing dependency_links to pytradfri.egg-info/dependency_links.txt writing requirements to pytradfri.egg-info/requires.txt writing top-level names to pytradfri.egg-info/top_level.txt writing manifest file 'pytradfri.egg-info/SOURCES.txt' reading manifest file 'pytradfri.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pytradfri.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib creating build/lib/pytradfri copying pytradfri/init.py -> build/lib/pytradfri copying pytradfri/group.py -> build/lib/pytradfri copying pytradfri/gateway.py -> build/lib/pytradfri copying pytradfri/command.py -> build/lib/pytradfri copying pytradfri/main.py -> build/lib/pytradfri copying pytradfri/device.py -> build/lib/pytradfri copying pytradfri/smart_task.py -> build/lib/pytradfri copying pytradfri/mood.py -> build/lib/pytradfri copying pytradfri/resource.py -> build/lib/pytradfri copying pytradfri/const.py -> build/lib/pytradfri copying pytradfri/error.py -> build/lib/pytradfri copying pytradfri/color.py -> build/lib/pytradfri copying pytradfri/util.py -> build/lib/pytradfri creating build/lib/pytradfri/api copying pytradfri/api/init.py -> build/lib/pytradfri/api copying pytradfri/api/aiocoap_api.py -> build/lib/pytradfri/api copying pytradfri/api/libcoap_api.py -> build/lib/pytradfri/api creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/init.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/group.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/gateway.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/command.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/main.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/device.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/smart_task.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/mood.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/resource.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/const.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/error.py -> build/bdist.linux-x86_64/egg/pytradfri copying build/lib/pytradfri/color.py -> build/bdist.linux-x86_64/egg/pytradfri creating build/bdist.linux-x86_64/egg/pytradfri/api copying build/lib/pytradfri/api/init.py -> build/bdist.linux-x86_64/egg/pytradfri/api copying build/lib/pytradfri/api/aiocoap_api.py -> build/bdist.linux-x86_64/egg/pytradfri/api copying build/lib/pytradfri/api/libcoap_api.py -> build/bdist.linux-x86_64/egg/pytradfri/api copying build/lib/pytradfri/util.py -> build/bdist.linux-x86_64/egg/pytradfri byte-compiling build/bdist.linux-x86_64/egg/pytradfri/init.py to init.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/group.py to group.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/gateway.py to gateway.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/command.py to command.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/main.py to main.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/device.py to device.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/smart_task.py to smart_task.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/mood.py to mood.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/resource.py to resource.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/const.py to const.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/error.py to error.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/color.py to color.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/api/init.py to init.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/api/aiocoap_api.py to aiocoap_api.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/api/libcoap_api.py to libcoap_api.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/util.py to util.cpython-36.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/pytradfri-6.0.1-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing pytradfri-6.0.1-py3.6.egg Copying pytradfri-6.0.1-py3.6.egg to /usr/local/lib/python3.6/site-packages Adding pytradfri 6.0.1 to easy-install.pth file
And 10.22.2.4 is the IP of your Tradfri hub?
$ pip3 install pytradfri
If you already have installed pytradfri in some form or another, you should remove it before running pip3 install
$ pip3 uninstall pytradfri
Repeat the pip3 uninstall command until you get an error message that says pytradfri is not installed
Make sure you have compiled and installed coap-client
Then run ./configure.py with the ip and master-key
If this still fails, check to see if coap-client is installed correctly:
$ coap-client -u "Client_identity" -k KEY coaps://IP:5684/.well-known/core
Note: "Client_identity" really is "Client_identity", it's the default IDENT for the MASTER PSK...
Thank you for your effort, I got the gateway to say success to password and ip now I am stuck on this:
root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# /usr/local/bin/python3.6 tradfri.tac
Traceback (most recent call last):
File "tradfri.tac", line 1, in
You need to install twisted as well:
$ pip3 install twisted
And make sure you match the version of domoticz with the version of the plugin: if using stable domoticz, use the master branch of the plugin, if using latest beta of domoticz, the development-branch...
Yeah im using beta and the it to devlopment.
Twisted in installed as well.
root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# pip3 install twisted Requirement already satisfied (use --upgrade to upgrade): twisted in /usr/local/lib/python3.4/dist-packages Requirement already satisfied (use --upgrade to upgrade): zope.interface>=4.4.2 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): constantly>=15.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): incremental>=16.10.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): Automat>=0.3.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): hyperlink>=17.1.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): PyHamcrest>=1.9.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): attrs>=17.4.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3/dist-packages (from zope.interface>=4.4.2->twisted) Cleaning up... root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# also tried upgraded.
root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# pip3 install twisted --upgrade Requirement already up-to-date: twisted in /usr/local/lib/python3.4/dist-packages Requirement already up-to-date: zope.interface>=4.4.2 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: constantly>=15.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: incremental>=16.10.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: Automat>=0.3.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: hyperlink>=17.1.1 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: PyHamcrest>=1.9.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Requirement already up-to-date: attrs>=17.4.0 in /usr/local/lib/python3.4/dist-packages (from twisted) Downloading/unpacking setuptools from https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl#sha256=ce4137d58b444bac11a31d4e0c1805c69d89e8ed4e91fde1999674ecc2f6f9ff (from zope.interface>=4.4.2->twisted) Downloading setuptools-40.4.3-py2.py3-none-any.whl (569kB): 569kB downloaded Installing collected packages: setuptools Found existing installation: setuptools 5.5.1 Not uninstalling setuptools at /usr/lib/python3/dist-packages, owned by OS Successfully installed setuptools Cleaning up... root@domoticz:/home/system/domoticz/plugins/IKEA-Tradfri# /usr/local/bin/python3.6 tradfri.tac
You're installing twisted for python 3.4, you need to use python 3.5 or higher...
Closing issue due to inactivity. Please reopen if this still isn't working!
byte-compiling build/bdist.linux-x86_64/egg/pytradfri/api/aiocoap_api.py to aiocoap_api.cpython-34.pyc File "build/bdist.linux-x86_64/egg/pytradfri/api/aiocoap_api.py", line 67 async def _get_protocol(self): ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/pytradfri/api/libcoap_api.py to libcoap_api.cpython-34.pyc byte-compiling build/bdist.linux-x86_64/egg/pytradfri/util.py to util.cpython-34.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pytradfri.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/pytradfri-6.0.1-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing pytradfri-6.0.1-py3.4.egg Removing /usr/local/lib/python3.4/dist-packages/pytradfri-6.0.1-py3.4.egg Copying pytradfri-6.0.1-py3.4.egg to /usr/local/lib/python3.4/dist-packages pytradfri 6.0.1 is already the active version in easy-install.pth
Installed /usr/local/lib/python3.4/dist-packages/pytradfri-6.0.1-py3.4.egg Processing dependencies for pytradfri==6.0.1 Finished processing dependencies for pytradfri==6.0.1 system@domoticz:~/pytradfri$