Tradfri configurator wont accept security key

Hello!

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…

LOG:

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/core.py”, line 1002, in _event_to_service_call
await service_handler.func(service_call)
File “/home/falkaub/.local/lib/python3.6/site-packages/homeassistant/components/configurator.py”, line 224, in async_handle_service_call
call.data.get(ATTR_FIELDS, {}))
File “/home/falkaub/.local/lib/python3.6/site-packages/homeassistant/components/tradfri.py”, line 68, in configuration_callback
key = await api_factory.generate_psk(security_code)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/aiocoap_api.py”, line 196, in generate_psk
self._psk = yield from self.request(command)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/aiocoap_api.py”, line 152, in request
result = yield from self._execute(api_commands)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/aiocoap_api.py”, line 142, in _execute
_, res = yield from self._get_response(msg)
File “/usr/local/lib/python3.6/dist-packages/pytradfri/api/aiocoap_api.py”, line 92, in _get_response
r = yield from pr.response
File “/usr/local/lib/python3.6/dist-packages/aiocoap/protocol.py”, 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/protocol.py”, line 863, in _run
blockresponse = yield from blockrequest.response
File “/usr/local/lib/python3.6/dist-packages/aiocoap/protocol.py”, line 693, in _init_phase2
yield from self.protocol.fill_remote(self.app_request)
File “/usr/local/lib/python3.6/dist-packages/aiocoap/protocol.py”, 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.