Tradfri configurator cannot accept key


#1

I have a new trådfri gateway with a few bulbs that I would like to control from hass.

They are found twice with discovery:

And entering the security code: Results in:
image

The logs says:
Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 390, in start
resp = await self._request_handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_app.py”, line 366, in _handle
resp = await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 106, in impl
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/static.py”, line 66, in staticresource_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py”, line 34, in real_ip_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 66, in ban_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 97, in auth_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py”, line 34, in real_ip_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 66, in ban_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 97, in auth_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py”, line 115, in handle
result = await result
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/data_validator.py”, line 47, in wrapper
result = await method(view, request, *args, **kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/data_entry_flow.py”, line 86, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/data_entry_flow.py”, line 80, in async_configure
flow, step_id, user_input)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/data_entry_flow.py”, line 98, in _async_handle_step
result = await getattr(flow, method)(user_input) # type: Dict
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/tradfri/config_flow.py”, line 52, in async_step_auth
user_input[KEY_SECURITY_CODE])
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/tradfri/config_flow.py”, line 151, in authenticate
key = await api_factory.generate_psk(security_code)
File “/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 195, in generate_psk
self._psk = await self.request(command)
File “/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 155, in request
result = await self._execute(api_commands)
File “/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 146, in _execute
_, res = await self._get_response(msg)
File “/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 95, in _get_response
r = await pr.response
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py”, line 718, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py”, line 743, in _run
await protocol.find_remote_and_interface(app_request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py”, line 293, in find_remote_and_interface
if await ri.fill_or_recognize_remote(message):
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/tokenmanager.py”, line 179, in fill_or_recognize_remote
return await self.token_interface.fill_or_recognize_remote(message)
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/messagemanager.py”, line 327, in fill_or_recognize_remote
remote = await self.message_interface.determine_remote(message)
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/transports/tinydtls.py”, line 328, in determine_remote
dtlsparams = self.ctx.client_credentials.credentials_from_request(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiocoap/credentials.py”, line 285, in credentials_from_request
raise CredentialsMissingError(“No suitable credentials for %s” % uri)
aiocoap.credentials.CredentialsMissingError: No suitable credentials for coaps://192.168.0.48:5684/15011/9063

I am not sure where to go from here, as I have found several hints that are unclear, for example that the configurator has been broken by some changes done by IKEA: https://github.com/home-assistant/home-assistant/pull/10282

Any hints and pointers appreciated.


#2

May I just add that I just did a hard reset on the trådfri gateway and had to re-configure all bulbs and remotes - argh. And the gw is running the newest IKEA firmware.

May I also add that I updated to 0.83.3.

I am trying to guess on why the trådfri libs are not getting a response from anyone, as the hardware is very cheap but well designed. To me, it looks like an obvious choice to support in HA.


#3

I had an issue when entering the code on my gateway. I had a L/I/1 figure that caused me issues. Try entering a different L/I/1 value for your first character.


#4

Thanks @silvrr I realized that quite as it was really hard to make a difference. I have tried all variations possible, and the error message is the same. :frowning: