Skip to content

[Windows] Z2M will not start most of the time. Maybe 1 out of 50 tries it starts. #30414

@Ltek

Description

@Ltek

Problem Statement:

Everytime I update Z2M in the past few months I always takes multiple computer reboots to get Z2M working. Zwave JS always works, first try and very quickly so there is not a COM port or driver issue in windows.

Even changing the physical USB port does not fix it (com port is same in Windows)

It looks like deleting the COM port in Device Manager, and restarting the PC, Z2M will connect without error (nothing is logged at all). I remember needing to do that last time to get it working also. To be clear, once it connects, its fine but looks like it has some serious problem connecting to COM ports.

Logs always show the same errors/problem... COM port permissions (which is bogus, I suspect that is a false error). No other app/software is binding to the COM port (USB port)

Also, after a reboot, before trying to start Z2M, I opened the Sonoff web online flashing web page... it sees, and connects to the device first shot. Something is wrong with Z2M on Windows... at least with my install there is. I updated today to 2.7.1 and same problem as prior versions

I'm using NSSM to run it... Windows Processes shows it Running.

If I unplug the Sonoff and replug, the first time I try to start the logs this...

Starting Zigbee2MQTT without watchdog.
[2025-12-31 15:29:50] error:    zh:ember:uart:ash: Received frame with CRC error
[2025-12-31 15:29:51] error:    zh:ember:uart:ash: Received frame with CRC error
[2025-12-31 15:29:51] error:    zh:ember:uart:ash: Received frame with CRC error
[2025-12-31 15:29:53] error:    zh:ember:uart:ash: Received frame with CRC error
[2025-12-31 15:29:56] error:    zh:ember:uart:ash: Received ERROR from adapter, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT.
[2025-12-31 15:29:56] error:    zh:ember:uart:ash: ASH disconnected | Adapter status: ASH_NCP_FATAL_ERROR
[2025-12-31 15:29:56] error:    zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR.
[2025-12-31 15:29:56] error:    zh:ember: Adapter fatal error: HOST_FATAL_ERROR
[2025-12-31 15:30:00] error:    z2m: Error while starting zigbee-herdsman
[2025-12-31 15:30:00] error:    z2m: Failed to start zigbee-herdsman
[2025-12-31 15:30:00] error:    z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-12-31 15:30:00] error:    z2m: Exiting...
[2025-12-31 15:30:00] error:    z2m: Error: [INIT TC] Network init timed out after 10000ms
    at Object.start (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\oneWaitress.ts:285:23)
    at EmberOneWaitress.startWaitingForEvent (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\oneWaitress.ts:310:63)
    at EmberAdapter.initTrustCenter (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\emberAdapter.ts:870:36)
    at EmberAdapter.initEzsp (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\emberAdapter.ts:708:18)
    at EmberAdapter.start (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\emberAdapter.ts:1539:24)
    at Controller.start (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\controller\controller.ts:143:29)
    at Zigbee.start (C:\zigbee2mqtt\lib\zigbee.ts:70:27)
    at Controller.start (C:\zigbee2mqtt\lib\controller.ts:101:13)
    at start (C:\zigbee2mqtt\index.js:149:5)
 ELIFECYCLE  Command failed with exit code 1.

All other tries to restart..

[2025-12-31 14:07:49] error: 	zh:ember:uart:ash: Failed to init port with error Error: Opening COM4: Access denied
[2025-12-31 14:07:49] error: 	z2m: Error while starting zigbee-herdsman
[2025-12-31 14:07:49] error: 	z2m: Failed to start zigbee-herdsman
[2025-12-31 14:07:49] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-12-31 14:07:49] error: 	z2m: Exiting...
[2025-12-31 14:07:49] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\emberAdapter.ts:666:19)
    at EmberAdapter.start (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\adapter\ember\adapter\emberAdapter.ts:1539:24)
    at Controller.start (C:\zigbee2mqtt\node_modules\.pnpm\zigbee-herdsman@7.0.4\node_modules\zigbee-herdsman\src\controller\controller.ts:143:29)
    at Zigbee.start (C:\zigbee2mqtt\lib\zigbee.ts:70:27)
    at Controller.start (C:\zigbee2mqtt\lib\controller.ts:101:13)
    at start (C:\zigbee2mqtt\index.js:149:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    problemSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions