Ikea Bilresa switches - huge delays in responding - SOLVED

I have wrestled with this problem for weeks trying to get the Ikea Bilresa switches to be reliable. They paired OK into HA, and worked at first, but when they went to sleep, they would become unresponsive - until some time in the future when the backlog of events fired through into HA.

My setup is as follows:

  • A lan-connected Sonoff Dongle Max running Thread RCP
  • Open Thread Border Router running in a docker container on an Ubuntu server (using bnutzer/otbr-tcp:latest, because I couldn’t get the openthread version to work over IP)
  • A matter server running in a docker container on the same Ubuntu server (Package matterjs-server · GitHub image)
  • Home Assistant running in a docker container on a Synology DS920+ (network_mode: host)
  • Matter integration in HA
  • Thread Integration in HA
  • OTBR Integration in HA

Everything appeared to connect and talk to each other but when left for a while, they became very unresponsive.

With the help of Gemini and ChatGPT, I spent hours tracing logs ipv6 routings, ot-ctl commands, etc but ended up going round in circles.

So just in case anyone else is going round the same circles - here’s what my problem was and what solved it.

My ufw config defaults to “Drop” for anything that hasn’t got an explicit rule. After some time, I’m guessing that the IP traffic was no longer ‘related’ and so came in as new requests on the wpan0 interface, and were duly dropped by the firewall. It was only when OTBR sent out a ‘are you still there’ message that the events were able to come through.

So the solution was simple - add a new rule to allow all traffic from the thread ipv6 range on the wpan0 and the responses from the switches became reliable.