Ikea Tradfri not working after Gateway reset

This sounds like a valid explanation. Actually I have an old copy of tradfri.conf that I’ve copied into the configuration folder… and restarted. It didn’t make any difference.

I assume that when you configure IKEA Tradfri it will not only create tradfri.conf file but also make some other required magic in the backend.

So from my log output it seems to be sumething in the py-script that is not working for us :disappointed_relieved:

/Kaspar

OK, so since I am kind of desperate and I don’t see any activity form developers trying to dig out the issue…I did try a fresh install on another SD card. Reason was, whne I installed HASSIO Tradfri worked fine, that was 7days ago roughly. The newer version might have broken this functionality…

Is there a way to download the previous hassio disk image version so that I can try it out?

New Version of HASSIO and stilll no Tradfri solution!!! :frowning:

Traceback (most recent call last):
File “/usr/lib/python3.6/asyncio/tasks.py”, line 179, in _step
result = coro.send(None)
File “/usr/lib/python3.6/site-packages/homeassistant/components/tradfri.py”, line 66, in configuration_callback
psk = yield from api_factory.generate_psk(callback_data.get(‘key’))
File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 193, in generate_psk
self._psk = yield from self.request(command)
File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 149, in request
result = yield from self._execute(api_commands)
File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 141, in _execute
api_command.result = _process_output(res, parse_json)
File “/usr/lib/python3.6/site-packages/pytradfri/command.py”, line 71, in result
self._result = self._process_result(value)
File “/usr/lib/python3.6/site-packages/pytradfri/gateway.py”, line 28, in process_result
return result[ATTR_PSK]
TypeError: ‘NoneType’ object is not subscriptable

how about instead of complaining, you ask yourself: what can I contribute to get this bug fixed?
This is an open source project and everyone (especially the devs) is sacrificing their spare time for this. So no one owes anything, especially if the only thing you do is complain.

Have you thought about going to github and creating an issue including all the logs and information devs need to get this bug tracked down?

And by the way, maybe this is a tricky bug to hunt down and get it fixed so it takes a lot of time.
so calm your tits.

Mr sharukins,
you don’t know me and I don’t know you, neither what each one is doing, as well as knowledge.

If you read my thread, I never complained. I point out versions, and ideas.
I know it is an open source project and free time developed.

I am glad you took the time to reply to me.

I actually did not go github, as this forum has been used by dev team to get other issues fixed also, and was trying to get some knowledge on… it is just me or everybody issue.

Now I will add, instead of going to github to create an issue I am actually installing a linux machine to run the py script coap that is used and see where is the bug or malfunction and point the dev team to where I believe is the problem.

You see, I am actually elec/prog customer support on my day job, and I have done too much coding, not for hassio, so I like first to investigate before knocking on doors. Forum is a “light” way of asking questions to community and sometimes get dev team some visibility of problem dimension.

Thank you so much for your help Mr sharukins.

(Sorry to the forum for this reply)

1 Like

Well…not sure why, but it works now.

I did a factory reset on tradfri gateway. more than once… and tried to connect again using HASSIO and I got a new conf file… and I was like…uohhhhhh… what is going on… and puff. works now.

I read on other foruns ismilar issues with tradfri, and need for factory reset due to pre-shared keys…

So it is solved (and not using 0.58) and actually looks pretty good, importing all light names etc.

Need to check now how to get sensor stat only. Already broke the groups on tradfri, did not popo up at new switches… I think.

just FYI…

The 0.58.1 just appeared under the Hassio tab. I updated it and entered my security key for the Tradfri gateway through the GUI and my lights appeared, so everything is working again!

Running Home Assistant 0.58.1 and today Tradfri stopped working from HA. I reset my gateway several times, without luck. I’ve removed tradfri.conf, and restarted HA, but HA doesn’t seem to notice the gateway. Defining the host IP manually in configuration.yaml doesn’t work either.

The log file is full of Fatal DTLS error: code 115 and Exception CancelledError() can not be represented as errno, setting -1..

UPDATE
Ah well, silly me. I didn’t notice the .tradfri_psk.conf file, which contained the wrong key. After removing this file and restarting HA I could run the configurator again and everything is working fine now. Also see https://github.com/home-assistant/home-assistant/issues/10499.