Zigbee2mqtt crashes/freezes

Hi everyone,
My HA Setup has huge problems.
My zigbee2mqtt add-on fails constantly. It stops, but I can’t find anything in the logs. There are ZigBee messages, but no errors. Sometimes it won’t start back up either. Even a system restart won’t help.
Sometimes it works for a while before stopping again

Can somebody help me troubleshoot?

On a secondary note: my Bluetooth stops working too, here only a reboot will help.

My HA runs as HAOS on a raspberry 3. The ZigBee stick is connected via a 1m usb extension cable

In my experience running zigbee with bluetooth is not good idea, as bluetooth tend to kill zigbee network. Those two doesnt go along together well.
If you can, remove bluetooth adapter and see how thing will go from there.

Bluetooth is built into the pi and the ZigBee dongle is away from the pi. It worked flawlessly I til a few days ago

Disable bluetooth from starting.

How do I do that?

I don’t use haos but probably you have to log in to terminal and then type

systemctl --type=service

to get list of running services. Find a bluetooth.
To stop service type

sudo systemctl stop bluetooth

To disable service you could use

sudo systemctl disable bluetooth

and it will not start the service on reboot.
To enable do the oposite

sudo systemctl enable bluetooth

I have the same problem. It is a new problem and since I have been running both Zigbee2MQTT and Bluetooth for a long time I would be surprised if the was Bluetooth related. I can’t find any info in the logs and it can take several goes to get it to restart. It will not auto restart on boot even although I have this option checked. The problem seemed to have started when I recently updated the Zigbee2Mqtt integration although this may just be a co-incidence. I am fully up to date with my Homeassistant and run it on Proxmox.

Exactly this happened to me! Does anyone know how to revert back to an earlier zigbee2mqtt add-on version?

With the backup & restore functionality in HA. Select partial restore and then select zigbee2mqtt

Thanks! I’ll give it a try!

Do you have any feedback 2 months later?
I have the same problem and not possible to downgrade from backup… Very random (not everyday and not necessary on the same zigbee device) … For me, restart the Zigbee2mqtt integration fix temporarily the problem, but it happens again few hours later…

I have the same problem. The whole system crashes when Zigbee2mqtt starts. This was not happening before and I haven’t made any changes other than updating the addon some time ago.

Same here and I know that’s an old thread, but unfortunately, there’s no solution for this yet.

I created an automation which restarts Home Assistant after Zigbee2MQTT is unavailable for a while (since restart of the Addon doesn’t help). This works 99 percent of the time, but unfortunately not always (like tonight, when my stairs stayed dark). These are the last log entries I have in my log (I restarted the addon at 4.34 manually):

 [2025-03-20 03:20:40] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue - Bewegungsmelder Flur', payload '{"battery":100,"illuminance":1,"led_indication":false,"linkquality":102,"motion_sensitivity":null,"occupancy":false,"occupancy_timeout":0,"temperature":21.71,"update":{"installed_version":33574179,"latest_version":33574179,"state":"idle"}}'
 [04:34:46] INFO: Preparing to start...
 [04:34:46] INFO: Socat not enabled
 [04:34:46] INFO: Enabled Zigbee2MQTT watchdog with value '0.2,0.2,0.2,0.3,0.4,0.5,1,3,5,10,30,60,120,360'
 [04:34:46] INFO: Starting Zigbee2MQTT...

Since this might help some of you, here is the automation which restarts the addon most of the time:

  alias: HomeAssistant - Restart after 3min without Zigbee
  description: ""
  triggers:
    - type: not_connected
      device_id: 218d114449518bbf90b8d2b52d38a0c0
      entity_id: c31e81a5a955a96c453e9205271a60b1
      domain: binary_sensor
      trigger: device
      for:
        hours: 0
        minutes: 3
        seconds: 0
  conditions: []
  actions:
    - action: homeassistant.restart
      metadata: {}
      data: {}
  mode: single

Hi! The same thing happens to me. Zigbee2mqtt keeps disconnecting itself… In fact, it doesn’t matter what automation I create with my Zigbee devices because they’re useless if Z2M isn’t working. I’m new to HA and I’m messing around with an old PI3, but it’s honestly quite frustrating to encounter so many problems configuring so few devices… Does anyone know what this could be causing or how I can fix it so Z2M is working so I can test automations? From what I’m reading, quite a few people are still in the same situation…

In MQTT, my dongle appears disconnected when this happens, but it’s not true. Could it be that I need to update the firmware on the SONOFF Dongle P? Is this recommended?

Thank you very much!

This is my latest add-on log:

Starting Zigbee2MQTT without watchdog.
[2025-03-21 09:25:49] info: 	z2m: Logging to console, file (filename: log.log)
[2025-03-21 09:25:50] info: 	z2m: Starting Zigbee2MQTT version 2.1.3 (commit #unknown)
[2025-03-21 09:25:50] info: 	z2m: Starting zigbee-herdsman (3.2.7)
[2025-03-21 09:25:52] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4898f39226cef118823a3adc169b110-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-03-21 09:25:52] info: 	zh:zstack:znp: Serialport opened
[2025-03-21 09:25:54] info: 	z2m: zigbee-herdsman started (resumed)
[2025-03-21 09:25:54] info: 	z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
[2025-03-21 09:25:54] info: 	z2m: Sensor 1 (0xa4c1382111da4ddd): ZG-204ZL - Tuya Luminance motion sensor (EndDevice)
[2025-03-21 09:25:54] info: 	z2m: Interruptor Luz encimera (0xa4c138f2f2609550): SH-SC07 - Tuya Button scene switch (EndDevice)
[2025-03-21 09:25:54] info: 	z2m: Puerta entrada (0x00158d008b6115f4): MCCGQ11LM - Aqara Door and window sensor (EndDevice)
[2025-03-21 09:25:54] info: 	z2m: Currently 3 devices are joined.
[2025-03-21 09:25:54] info: 	z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[09:26:48] INFO: Preparing to start...
[09:26:50] INFO: Socat not enabled
[09:26:51] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[09:27:39] INFO: Preparing to start...
[09:27:40] INFO: Socat not enabled
[09:27:41] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[09:28:49] INFO: Preparing to start...
[09:28:50] INFO: Socat not enabled
[09:28:51] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[09:30:04] INFO: Preparing to start...
[09:30:05] INFO: Socat not enabled
[09:30:06] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.

The Pi3 is extremely limited when it comes to RAM. Are you sure what you’re seeing isn’t just a symptom of it running out of memory/swap?

When I activate it, it usually uses about 30% of the RAM. So I shouldn’t be limited by that… My plan is to upgrade to a MINI PC, but right now I’m just testing it out so I can gain the knowledge and avoid problems with a new installation…

You need to be looking at the overall RAM usage when Z2M goes down, not just when you activate it. If Z2M spikes to eg. 50% and HA is using up 70% of the RAM already, you can see how that would be a problem.

That’s without considering other potential causes of failure, like a bad USB connection or interference. Are you using a USB extension cable between your Pi and your coordinator?

Just to add here: I’m using a Intel Core i5-12400 with 32GB RAM as server, so even if this is a raspi issue in case of ederpolli, this is not the case for my device, so I assume this must be caused by something different.