For some time now, when I restart Home Assistant, I have to restart Zigbee2MQTT (installed on another server) for the devices to work again in Home Assistant.
When I restart Home Assistant, I can leave it for a long time without doing anything, and the devices will still be “unavailable” even though they are functional and usable in the Zigbee2MQTT UI.
This only seems to affect Zigbee2MQTT devices and not the other MQTT devices I have.
Does anyone have any idea where this is coming from?
I haven’t seen anything in the Zigbee2MQTT logs or in Home Assistant either:
2025-10-30 08:45:01.786 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2025-10-30 08:45:01.786 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.00 seconds
2025-10-30 08:45:02.076 INFO (MainThread) [homeassistant.components.number] Setting up mqtt.number
2025-10-30 08:45:02.079 INFO (MainThread) [homeassistant.components.light] Setting up mqtt.light
2025-10-30 08:45:02.080 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up mqtt.binary_sensor
2025-10-30 08:45:02.080 INFO (MainThread) [homeassistant.components.sensor] Setting up mqtt.sensor
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.button] Setting up mqtt.button
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.select] Setting up mqtt.select
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.text] Setting up mqtt.text
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.update] Setting up mqtt.update
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.lock] Setting up mqtt.lock
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.event] Setting up mqtt.event
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.image] Setting up mqtt.image
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.climate] Setting up mqtt.climate
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up mqtt.alarm_control_panel
2025-10-30 08:45:02.081 INFO (MainThread) [homeassistant.components.switch] Setting up mqtt.switch
2025-10-30 08:45:02.083 INFO (MainThread) [homeassistant.components.sensor] Setting up mqtt_room.sensor
2025-10-30 08:46:23.300 INFO (MainThread) [homeassistant.components.mqtt.client]
MQTT client initialized, birth message sent
Apparently so.
If you look at the screenshot I sent, I updated around 11:20 and the z2m was disconnected for a while until I manually restarted it.
Around 23:00 I manually restarted HA and the z2m remained connected.
Yes, absolutely! Could that cause a problem?
I should point out that Home Assistant is running in a VM, so when it restarts, it doesn’t restart the USB ports.
Yes that definitely could be the source of your problem. You can test the theory by changing the MR1 to Ethernet mode although that will need some tweaks to your Z2M config.
Hello, I tested it and it does indeed work, even though I don’t really understand why.
The problem is that it doesn’t suit me: I sometimes have problems with my internet connection, so I have an automation that turns off the modem plug and turns it back on after a few seconds. Except that with Zigbee2MQTT in Ethernet mode, it turns off the plug and… never turns it back on because there is no longer access to Zigbee if there is no Ethernet network.
In terms of dependency, this is a huge obstacle for me. I use Zigbee devices rather than WiFi devices to avoid this dependency…
I have the same issue, but I think even when manually restarting HA. @Ben90 have you also tried the persistence suggestion from grancisp, did this help?
@fantangelo that makes sense when Z2M is an addon, but at least I use it as a docker container and it still is running when starting up HA. Changing the start up sequenze of docker containers and implementing delays does not help either. So I don’t think this is the problem/solution for us.
Hi, I tried all the tips here but nothing works. The solution I found is to make Home Assistant connect to my other server in SSH and make it reboot the Zigbee2MQTT container when Home Assistant restart…