Hass.io error while connecting to IKEA Tradfri gateway

Hi,

today I finally got my RPI and installed Hass.io. I have a set of IKEA Tradfri bulb, remote control and gateway but I can not connect to it. It keep throwing errors. I have rebooted both RPI and the gateway several times with no success.

Thank you for any advice

ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved 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 61, in configuration_callback DEFAULT_ALLOW_TRADFRI_GROUPS) File “/usr/lib/python3.6/site-packages/homeassistant/components/tradfri.py”, line 125, in _setup_gateway api = yield from api_factory(host, key, loop=hass.loop) File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 152, in api_factory yield from request(Command(‘get’, [‘status’])) File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 117, in request result = yield from _execute(api_commands) File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 109, in _execute api_command.result = _process_output(res, parse_json) File “/usr/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py”, line 176, in _process_output return json.loads(output) File “/usr/lib/python3.6/json/init.py”, line 354, in loads return _default_decoder.decode(s) File “/usr/lib/python3.6/json/decoder.py”, line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File “/usr/lib/python3.6/json/decoder.py”, line 357, in raw_decode raise JSONDecodeError(“Expecting value”, s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

2 Likes

I believe an IKEA update is causing the problem.

Same for me, seems like Ikea pushed some update, i had to restart my gateway. And TRÅDFRI does not work in HA

Same here - Ikea pushed an update and it’s no longer appearing in my HA.

I am also getting the same error. Only just set up Hassio on a Rasberry Pi so was not sure it way something I did.

Looks like the update enabled HomeKit and Alexa Integration

Same here.

Same here :frowning:

Same here :frowning:

It’ll be fixed this weekend:

IKEA changed the protocol. Some info here https://www.npmjs.com/package/node-red-contrib-tradfri
BR

Hi!

I have updated my TRADFRI GW yesterday, it went just fine but today I am getting errors again. Is there some fix?

Blockquote
2017-11-05 17:36:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved 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

I gave up on HomeAssistant + Tradfri as I couldn’t get it working. I reverted back to using Node-red for my automation for the time being.

The node-red interface for Tradfri now works an I got the impression that there will soon be an update also for HA.

When it comes to the Tradfri GW I unfortunately have had one more lock-up of th GW.
BR

Edit: Several years later now and a LOT of node-red flows, now going all in for Home assistant. Brought a handful of useful nore-red flows with me to Home assistant.

I have upgraded to 0.57.1 and get APIFacory errors.
Looks like something isn’t installed! Traceback (most recent call last): File “/usr/lib/python3.6/site-packages/homeassistant/components/tradfri.py”, line 60, in configuration_callback from pytradfri.api.aiocoap_api import APIFactory

looks like an encryption error,
I suggest removing .tradfri_conf in the config folder and reconfiguring your gateway after a reboot

I tried just now, did not make a difference. I also tried to touch the file same error. Strace did not tell me much eighter.

There were a few issues opened on github concerning tradfri, I guess they will be solved in the next HASS version

Cool, I will wait for the update :grinning:

Update 0.57.2 doesnt seem to be the trick. I cant get the configuration to work with my Trådfri gateway right now. Is it worth troubleshooting or is it a known issue?

I got it working. There was a pytradfri dir in the deps dir in my config dir. After removing that it works.