Losing connection every few minutes

I have ha running bare metal on a laptop. It has been stable for over a year, maybe 2. A few days ago I noticed that I am frequently getting the connection lost message in the bottom corner of the companion app. It usually comes back in 10-20 seconds. Around the same time my ZigBee network started losing devices, not sure if this is a coincidence or something related.

The ZigBee issue is mostly fixed now by changing channel in z2m. But the connection issue remains.

I have not made any changes to my install, ZigBee or network. it doesn’t seem to be my network connection as browsing still works.

I have force stopped and cleared cache for the app. I have fully kiosk running on a tablet and this also loses connection. I’ve also restarted the host several times but it doesn’t help. How can I determine the reason for this? Would there be something in the logs, what should I look for?

Thanks

Long shot, but try this:

Check if you have “Suspend background connections” switched on. To get to the setting, Click on your profile picture in the bottom left of the HA dashboard, then scroll down to the Browser setting at the bottom. Note that you will need to enable Advanced Mode to see the setting.

The closest I could find is ‘automatically close connection’. This is off

I was getting this alot in 2025.3 core but went away in 2025.4.

1 Like

I’m on 2024.10 and have been for a while

Ok so I just noticed something. My tablet was set up with fully kiosk to access via nabu casa and it would go offline at the same time as my mobile. Today I changed the tablet setting to use homeassistant.local:8123.

My phone just went offline now and when I checked the tablet it was still working. So it seems like it is some kind of network issue, I was starting to think it may be an issue with the host. However as I said before, internet browsing does continue to work so it is not a case of my internet losing connection

I am not great this kind of troubleshooting, with this info is there anything in particular I should be looking at?

Thanks

Edit:
So not as straightforward as that. It happened again, this time went offline for a couple of minutes. And the tablet was also offline. But I didn’t have the connection lost message on the tablet. Cameras were not loading and couldn’t turn ZigBee lights on/off. I have a few input booleans on my dashboard and pressing should toggle but that wasn’t working either. Seems that sometimes tablet and phone both go offline and sometimes the tablet continues to work.

A bit of progress…

As the dropped connection started around the same time that I noticed my ZigBee devices were playing up I thought to disable them and see what happens.

I disable z2m and unplugged my sonoff dongle. It’s been a day and I’ve not noticed any more lost connection whereas it was happening every few minutes before this. Also the dashboard had started lagging and this is also fixed now.

The way I see it now is there are a few possible reasons for this.
Z2M may need updating - there is one available
Dongle may need a firmware update - I’ve not checked if available
Some ZigBee device could be causing an issue

What is the best way to isolate the problem. Would there be something in the logs, which log would I check. System or the add on logs? Not sure exactly what to look for.

If it’s the zigbee device spamming MQTT then mqttexplorer will give an idea what devices are doing the spamming. Perhaps it a device that needs firmware update.

Is, by chance, your WiFi network (route,r Access Ponit) set to automatically select best channel? Then you might have stable connection for years, but some change in your neighbourhood could force AP to change active channel and thus cause short disconnection… This could also influence your Zigbee network, if any interference between selected channels occurs after such change.

Good point. Unfortunately I am using deco M5 mesh and it automatically selects the best channel, there is no option to change this.

Thanks I will look in to it