[solved] HA not working with Tradfri GW v1.4.15

Hi all

After upgrading my gateway to 1.4.15, I receive

Sep 16 10:26:50 mcp hass[211363]: 2018-09-16 10:26:50 ERROR (MainThread) [coap] Fatal DTLS error: code 115 Sep 16 10:26:50 mcp hass[211363]: Sep 16 10:26:50 WARN received alert, peer has been invalidated Sep 16 10:26:50 mcp hass[211363]: 2018-09-16 10:26:50 ERROR (MainThread) [coap] Exception CancelledError() can not be represented as errno, setting -1. Sep 16 10:26:50 mcp hass[211363]: Sep 16 10:26:50 ALRT 115 invalidate peer
To me, this looks like IKEA changed something in the GW. I removed the configuration and added the GW back in HA with no success. Reboot of the GW included.
Could be an issue with dtlssocket 0.1.7 / Tradfri?

Anyone has also this problem?

HA 77.3 on Ubuntu 18 with virtenv python v3.6.5

Cheers, Luke

I just checked mine and it all seems to be working, so not a global incompatibility issue. I have noticed device status updates in HA have sometimes be a little sluggish when using the physical remotes to control the devices though recently.

Tradfri GW on 1.4.15
HA 77.3 (Hass.io) on RPi3 - HassOS 1.10

could you post your DTLSsocket version?

I’m using the standard Hass.io RasPi image (based on HassOS 1.10)
Managed to SSH in and I think this is the info you are asked for?

#pip3 list | grep -i dtls
DTLSSocket = 0.1.7

When you mentioned you removed config did you mean you removed the .tradfri_psk.conf as per the docs? or just the Tradfri section of configuration.yaml? (Sorry if that’s a teaching grandma to suck eggs kinda question BTW)

1 Like

first I removed only the section in the config. After that, I renamed the psk config file. Now it seems like it’s working, but I still receive a lot of

## Log Details (ERROR)

Sun Sep 16 2018 14:34:26 GMT+0200 (Mitteleuropäische Sommerzeit)

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

Btw: “Fatal DTLS error: code 20” points to a wrong Security Code. I had a typo in it at first.

Okay, seems like deleting the log file was the problem.

TL;DR: Delete the tradfri section in your config and the .tradfri_psk.conf file. Then reboot the instance and reconfigure everything. It doesn’t matter if you have groups configured with now non-existing entities.

I’m having the same problem after updating hassio to 0.92.1
I looked, but I did not find a .tradfri_psk.conf anywhere.

removed. now in .storage and in the /config/.storage/core.config_entries file

I’m having the exact same issue and errors after a firmware update of the Tradfri hub. Can you help me out: what were your steps to fix this?

The DTLS error 115 is mentioned in the documentation, and the proposed fix is removing .tradfri_psk.conf. I found it in my /config folder, removed it but that doesn’t seem to have any effect: rebooted twice, Tradfri entities remain unavailable, no new discovery.

I did find a mention of Tradfri in the /config/.storage/core.config_entries file. Did you remove those entries? It is my understanding that simple users like us shouldn’t be editing the core files. There is a Trash button available on the integration page for Tradfri, perhaps I should delete the integration from there?

If you have any input, it’s most welcome :slight_smile:

Well I just removed the Tradfri integration from the front end (using Trash icon on the integration page), restarted HA, re-entered my security key and I’m up and running again. Seems pretty simple in hindsight :slight_smile:

I also entered a pull request for the Tradfri documentation, suggesting this instead of removing .tradfri_psk.conf.

As far as I know, the tradfri_psk.conf is deprecated. Thus, moved into /.storage.
As you found out, simply remove the integration either through the UI, or the entity’s files in . storage.

Funfact: I had more or less the same issue again. The GW completely got nuts. I assume a UPnP Problem and opened a Ticket @ IKEA.
My solution was to join the GW to a cheap Router with UPnP enabled. After that, rejoin it back to my subnet.