Koenkk / Koenkk/zigbee2mqtt

Spam from devices results in slow startup

Open
#33,026 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

problem
Dominant language
TypeScript
Stars
15.7k
Forks
2k
Avg merge
18h 55m
Merged PRs (30d)
35

Description

What happened?

Z2M is unable to start while HA addons watchdog is enabled ( at addon Info/Control Dialog ). Constant infinite restart loop. This is now for few days ( I suppose that wrong paths should be deleted from ZBT-2 NVRAM in few hours or day ). As I noticed watchdog timout is sth like 2min but my Z2M starts up in 4:30 sec !!!!!!!!
( for now I had to disable add-n watchdog and cerate my own in automation to give more time for Z2M to start )

NabuCasa says that is Z2M problem cause:
"While I appreciate that we manufacture the ZBT-2, the routing himself is done by Zigbee2Mqtt, as is the path selection, and source routing."

My question is: it is your add-on responsibility or their firmware responsibility to fix this long startup of the addon ( and infinite startup loops while watchdog enabled) because of wrong paths.

What did you expect to happen?

Normal, short startup time

How to reproduce it (minimal and precise)

You cannot on your end.
You can look trough internal startup procedure to check why Z2M is waiting so long or selecting paths that are wrong during startup.

Zigbee2MQTT version

2.14.1-1

Adapter firmware version

7.5.1 [GA]

Adapter

Nabucasa ZBT-2

Setup

Add-on in HA.

Device database.db entry

No response

Debug log

[07:16:37] INFO: Preparing to start...
[07:16:37] INFO: Socat not enabled
[07:16:38] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2026-09-04 07:16:41] info: z2m: Logging to console
[2026-09-04 07:16:41] info: z2m: Starting Zigbee2MQTT version 2.14.1 (commit #unknown)
[2026-09-04 07:16:41] info: z2m: Starting zigbee-herdsman (10.9.2)
[2026-09-04 07:16:41] info: zh:ember: Using default stack config.
[2026-09-04 07:16:41] info: zh:ember: ======== Ember Adapter Starting ========
[2026-09-04 07:16:41] info: zh:ember:ezsp: ======== EZSP starting ========
[2026-09-04 07:16:41] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2026-09-04 07:16:41] info: zh:ember:uart:ash: Serial port opened
[2026-09-04 07:16:41] info: zh:ember:uart:ash: ======== ASH starting ========
[2026-09-04 07:16:42] info: zh:ember:uart:ash: ======== ASH connected ========
[2026-09-04 07:16:42] info: zh:ember:uart:ash: ======== ASH started ========
[2026-09-04 07:16:42] info: zh:ember:ezsp: ======== EZSP started ========
[2026-09-04 07:16:42] info: zh:ember: Adapter EZSP protocol version (13) lower than Host. Switched.
[2026-09-04 07:16:42] info: zh:ember: Adapter version info: {"ezsp":13,"revision":"7.5.1 [GA]","build":0,"major":7,"minor":5,"patch":1,"special":0,"type":170}
[2026-09-04 07:16:43] info: zh:ember: [STACK STATUS] Network up.
[2026-09-04 07:16:43] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE for "23715".
[2026-09-04 07:16:43] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE for "55885".
[2026-09-04 07:16:43] info: zh:ember: [INIT TC] Adapter network matches config.
[2026-09-04 07:16:43] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast.
[2026-09-04 07:16:43] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE for "55885".
[2026-09-04 07:16:43] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE for "55885".
[2026-09-04 07:16:45] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_SOURCE_ROUTE_FAILURE for "53046".
[2026-09-04 07:18:15] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_INDIRECT_TRANSACTION_EXPIRY for "22828".
[2026-09-04 07:18:49] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_SOURCE_ROUTE_FAILURE for "51275".
[2026-09-04 07:20:41] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_SOURCE_ROUTE_FAILURE for "53046".
[2026-09-04 07:21:15] info: z2m: zigbee-herdsman started (resumed)
[2026-09-04 07:21:15] info: z2m: Coordinator firmware version: '{"meta":{"build":0,"ezsp":13,"major":7,"minor":5,"patch":1,"revision":"7.5.1 [GA]","special":0,"type":170},"type":"EmberZNet"}'

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Zigbee2MQTT startup path around zigbee-herdsman and the Ember adapter, using the provided log to trace source-route discovery and route errors. Determine why startup remains blocked for several minutes with the ZBT-2 and whether the delay is in Zigbee2MQTT or adapter firmware. Done means identifying the responsible component and providing a fix or a clearly supported handoff.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.