Tradfri configurator wont accept security key


Long time Homeassistant user… Also been using Tradfri with hass for 8months now, but i recently upgraded my ubuntu 16.04 to 17.10 and reinstalled everything. All works, exepct tradfri configurator wont accept the security key…

I tried factory reseting and rebooting the gateway…


2018-04-17 23:21:38 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall configurator.configure: configure_id=ID, fields=security_code=KEY>
Traceback (most recent call last):
File “/home/falkaub/.local/lib/python3.6/site-packages/homeassistant/”, line 1002, in _event_to_service_call
await service_handler.func(service_call)
File “/home/falkaub/.local/lib/python3.6/site-packages/homeassistant/components/”, line 224, in async_handle_service_call, {}))
File “/home/falkaub/.local/lib/python3.6/site-packages/homeassistant/components/”, line 68, in configuration_callback
key = await api_factory.generate_psk(security_code)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/”, line 196, in generate_psk
self._psk = yield from self.request(command)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/”, line 152, in request
result = yield from self._execute(api_commands)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/”, line 142, in _execute
_, res = yield from self._get_response(msg)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/”, line 92, in _get_response
r = yield from pr.response
File “/usr/local/lib/python3.6/dist-packages/aiocoap/”, line 814, in _run_outer
yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
File “/usr/local/lib/python3.6/dist-packages/aiocoap/”, line 863, in _run
blockresponse = yield from blockrequest.response
File “/usr/local/lib/python3.6/dist-packages/aiocoap/”, line 693, in _init_phase2
yield from self.protocol.fill_remote(self.app_request)
File “/usr/local/lib/python3.6/dist-packages/aiocoap/”, line 426, in fill_remote
raise RuntimeError(“No transport could route message”)
RuntimeError: No transport could route message

Did you change HA versions as part of the upgrade?

I previously had issues with i l or 1 all looking the same. 0 and O may have the same issue.

did you install autoconf as noted in the docs?

I was behind several version, the new version needed the new python so i upgraded the OS.

In the new OS, im using the lates Homeassistant! Autoconf is already installed. gateway and ubuntu server is on the same router.

So if anyone ever google search find this post…

Follow the install instruction on this link: GitHub - home-assistant-libs/pytradfri: IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.

After all that, if you enter the security key and get error in hass log like this:

[coap] Exception CancelledError() can not be represented as errno, setting -1.

You goofed up the key. The key text font is stupid. L and I are the same.

Hi! I have the same problem, and i have extracted the key from the qr-code, so there can’t be a typo - what can i do?

Delete tradfri cache in hass folder, factory reset the gateway.
Also whats the error log?

Thank you for your advice. i am totally new to hass, so i can’t even find the cache in the folder, and i do not know where to find the error log. i am running homeassistant on a mac.