Tradfri integration stops working approx once/twice a week

Hi.

My Trådfri integration stops working like once or twice every week. This started approx 1 month ago.

When this happen I can still use the IKEA Trådfri app so I guess its not a gateway issue(!?). If I reload the Trådfri integration everything works fine again.

The following gets logged when the problem occur, got around 100 identical rows in 1sec!.

2020-10-23 16:32:13 ERROR (MainThread) [homeassistant.components.tradfri.base_class] Unable to execute command <Command put [‘15001’, 65567]: {‘3311’: [{‘5850’: 1}]}>: (‘There was an error with the request.’, CredentialsMissingError(‘No suitable credentials for coaps://192.168.1.231:5684/15001/65567’))

Any ideas? Can I automate a reload of the integration?

Have a nice weekend

Me too! :frowning:

I’m also experiencing instability on the tradfri integration.
And according to the github issue tracker, it is not the only issue:


I don’t think it’s the same issue as you have (logs are different).
I’m now waiting for the issue to reoccur on my setup and see if I have the same problem as you @kim1138

I have the same problem.
Testing a work around:

automation:
  - alias: 'tradfri_keep_alive'
    trigger:
    - minutes: /1
      platform: time_pattern
    action:
    - service_template: light.turn_{{ states('light.tradfri_panel') }}
      entity_id: light.tradfri_panel

From this thread:

Interestingly, around the time that bug was filed, the pytradfri library got a huge version bump (to 7.0.0).
This version includes a whole asyncio rewrite, so that might have introduced this regression.

https://github.com/home-assistant/core/blame/b6630a48b2881d0dd37d0229379bc05dfa0fc07b/homeassistant/components/tradfri/init.py
https://github.com/home-assistant/core/pull/39609

I added this automation too. Will see if it works. Either way I’d really want this to work without special quirks and fixes.

I had some instability issues a couple of months ago with the Tradfri so I moved away from it completely. I now have a ZigBee USB stick (and Zwave stick) running on a pi3 and my main HA running on a Proxmox VM and it works very well. I used Zigbee2MQTT and picking up all my Ikea lights was a breeze.

1 Like

I had the problem again.
Unfortunately, there was no relevant info in the log :confused:
@kim1138, could you open a bug report on https://github.com/home-assistant/core/issues/ ?
As such the hass developers can already take a look at the problem.

EDIT:
I’ve file a bug report for this as I did get some logging this time:

Hello,

I maybe found the root cause at least for one issue. Please check it here and try - please report results to github

1 Like