So, I set up Tradfri a couple weeks ago and everything worked fine. About a week ago I upgraded to Python 3.6.3 and Home Assistant 0.60.0 and Tradfri stopped working. For some reason I had to install autoconf
and DTLSSocket
using:
apt get install autoconf
and pip install dtlssocket
.
Everything worked fine after that. Now, a couple of days later Tradfri broke once again. I didn’t update anything. It just stopped working and I’m now receiving the following errors:
Tradfri setup failed.
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 92, in _get_response
r = yield from pr.response
File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
blockresponse = yield from blockrequest.response
File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
aiocoap.error.RequestTimedOut
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/tradfri.py", line 154, in _setup_gateway
gateway_info_result = yield from api(gateway.get_gateway_info())
File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 152, in request
result = yield from self._execute(api_commands)
File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 142, in _execute
_, res = yield from self._get_response(msg)
File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 98, in _get_response
raise RequestTimeout('Request timed out.', e)
pytradfri.error.RequestTimeout: ('Request timed out.', RequestTimedOut())
Also, in the frontend I now see the Tradfri component again which keeps asking for the security code, which is already in my .tradfri_psk.conf
. It’s not literally in there, but I’m guessing its a token or a hashed version of it. The .conf file is there though.
Has anyone else received these errors recently? If so, did you fix it?
Rebooting the Tradfri Gateway and Home Assistant doesn’t help. I didn’t try anything else yet, since everything has been working fine the last couple of days and I didn’t update anything.
Edit: I’m on Raspbian using a Virtual Env.