#Zigbee2mqtt watchdog not working properly

1 messages · Page 1 of 1 (latest)

grim latch
#

Hello,

I had to restart my Wi-Fi AP today (changing channels due to overcrowding), found out after a few hours that the z2m addon did not auto-restart - even though the watchdog was enabled.
The last entry in the log (sorry, I didn't think to copy it) was something like "Could not connect to <the-IP-address-of-the-coordinator>" (Coordinator is SLZB-06Mg24)

Maybe the watchdog needs to be adjusted to catch "connection" issues..

#

Zigbee2mqtt watchdog not working properly

grim latch
#

Anyone?

ivory plume
#

I'm finding the same thing. I haven't deteremined what at what point it disconnects, but i the find that I have to restart it multiple times before it makes the connections. I am using the SMLight slzb-06 it that makes a difference. Since this is a network system i do not have Socat enabled

#

This is from my log

[2025-05-25 19:45:17] info:     z2m: Logging to console, file (filename: log.log)
[2025-05-25 19:45:17] info:     z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 19:45:17] info:     z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 19:45:17] info:     zh:zstack:znp: Opening TCP socket with 192.168.1.20:6638
[2025-05-25 19:45:20] error:     zh:zstack:znp: Socket error Error: connect EHOSTUNREACH 192.168.1.20:6638
[2025-05-25 19:45:20] error:     z2m: Error while starting zigbee-herdsman
[2025-05-25 19:45:20] error:     z2m: Failed to start zigbee-herdsman
[2025-05-25 19:45:20] error:     z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 19:45:20] error:     z2m: Exiting...
[2025-05-25 19:45:20] error:     z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/.pnpm/zigbee-herdsman@4.0.0/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:160:24)
    at Socket.emit (node:events:536:35)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:90:21)
[2025-05-25 19:45:20] info:     zh:zstack:znp: Port closed
ivory plume
#

Bumping this up as it is a contining problem. Any time of a power outage or HA reload I have to manually restart the zigbee2mqtt addon. Not only that but it takes four or five tries before it loads.

keen wind
#

Have you enabled the watchdog as per link?

ivory plume
#

I have

keen wind
#

Because I don't see it in the log.

ivory plume
#

Maybe I'm confused on that then. I have "Watchdog" enabled. Is that something else?

keen wind
#

Where do you see that?

#

Oh. You mean the addon watchdog? Yeah that's something else.

ivory plume
#

Ok, then where do I add what you referenced? Is it in the raw file?

keen wind
#

See link. It's configured in the addon config. You might need to use the yaml way.

ivory plume
#

Anywhere in the configuration file?

keen wind
#

I'm not sure. I don't use the addon myself. I configure it via the environment variable for my docker container. My guess is it has to be on its own line.

ivory plume
#

Ok I'll add it to the file as i think correct and see what happens. Thanks
Here is a partial of my file

version: 4
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.1.92:1883
  user: mqtt_user
  password: illusion
serial:
  port: tcp://192.168.1.20:6638
  adapter: zstack
  baudrate: 115200
watchdog: default
advanced:
  log_level: info
  channel: 11
keen wind
#

I think the version is misplaced but the rest looks good to me.

ivory plume
#

we'll see what happens