Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z2M doesn't gracefully cope with network outages, triggered by mesh network updates. #26543

Open
paulte opened this issue Mar 1, 2025 · 1 comment
Labels
problem Something isn't working

Comments

@paulte
Copy link

paulte commented Mar 1, 2025

What happened?

Using an SLZB06 coordinator over wifi, connecting back to z2m running within home assistant.

When the network is unavailable (such as home wifi upgrading), Z2m exits after loosing communication with the co-ordinator.

Z2M attempts to restart 10 times, taking about 50 seconds elapsed and then stays shutdown

What did you expect to happen?

I expected an exponential backoff between each restart.

  • Device crash and restart might be able to be handled quickly.
  • A home wifi router update would take a little longer
  • A rolling firmware upgrade of access points in a mesh network will take longer

These type of external outages could result in a better system / user experience if the wrapper restarting z2m assumes outages can take longer.

How to reproduce it (minimal and precise)

  • Configure z2m on HA on any device.
  • Configure an SLZB06 (or any other type of network based co-ordinator). Connect both into the same switch.
  • Remove the ethernet cable on the slzb06

Zigbee2MQTT version

2.1.1.

Adapter firmware version

20240710

Adapter

slzb06

Setup

add on to HA, running HAOS on a proxmox vm

Debug log

z2m.log

Logs show quick restarts followed by a manual start of z2m later on once the network was available.

@paulte paulte added the problem Something isn't working label Mar 1, 2025
@Nerivec
Copy link
Collaborator

Nerivec commented Mar 1, 2025

You should be able to use this to define a soft-failure watchdog for Z2M as you see fit (note: Z2M has no control over the HA add-on watchdog):
https://www.zigbee2mqtt.io/guide/installation/15_watchdog.html
in add-on config page, check "Show unused optional configuration options", and the field will appear.
You can use default as value if the defaults mentioned in above link works for you, otherwise define the values you want (no-space-CSV format).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants