Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.49k stars 1.62k forks source link

zigbee2mqtt crash after a while running using tcp slzb-06m, sometimes even with restart it does not start. #23151

Open diesel437 opened 1 week ago

diesel437 commented 1 week ago

What happened?

Even with a full reboot, sometimes it does not start correctly. It keeps crashing randomly.

What did you expect to happen?

Works correctly, reboots when needed!

How to reproduce it (minimal and precise)

Using SLZB-06M with darks ncp firmware: https://github.com/darkxst/silabs-firmware-builder/blob/main/firmware_builds/slzb-06m/ncp-uart-hw-v7.4.2.0-slzb-06m-115200.gbl

Zigbee2MQTT version

1.38

Adapter firmware version

7.4.2

Adapter

SMLIGHT SLZB-06M

Setup

Z2M LXC, MQTT LXC, HAOS VM

Debug log

(STARTED USING NPM START)

root@zigbee2mqtt:/opt/zigbee2mqtt/data/log/2024-06-24.03-37-22# cat log.log [2024-06-24 03:37:22] info: z2m: Logging to console, file (filename: log.log) [2024-06-24 03:37:22] info: z2m: Starting Zigbee2MQTT version 1.38.0 (commit #f1847301) [2024-06-24 03:37:22] info: z2m: Starting zigbee-herdsman (0.49.2) [2024-06-24 03:37:22] info: zh:ember: Using default stack config. [2024-06-24 03:37:22] info: zh:ember: ======== Ember Adapter Starting ======== [2024-06-24 03:37:22] info: zh:ember:ezsp: ======== EZSP starting ======== [2024-06-24 03:37:22] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:37:22] info: zh:ember:uart:ash: Socket ready [2024-06-24 03:37:22] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:37:22] error: zh:ember:uart:ash: Received ERROR from NCP while connecting, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT. [2024-06-24 03:37:22] error: zh:ember:uart:ash: ASH disconnected | NCP status: ASH_NCP_FATAL_ERROR [2024-06-24 03:37:22] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR. [2024-06-24 03:37:22] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:37:22] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:37:23] info: zh:ember:uart:ash: ======== ASH connected ======== [2024-06-24 03:37:23] info: zh:ember:uart:ash: ======== ASH started ======== [2024-06-24 03:37:23] info: zh:ember:ezsp: ======== EZSP started ======== [2024-06-24 03:37:24] warning: zh:ember:uart:ash: Frame(s) in progress cancelled in [1ac1020b0a527e] [2024-06-24 03:37:24] error: zh:ember:uart:ash: Received unexpected reset from NCP, with reason=RESET_SOFTWARE. [2024-06-24 03:37:24] error: zh:ember:uart:ash: ASH disconnected: ASH_ERROR_NCP_RESET | NCP status: ASH_NCP_FATAL_ERROR [2024-06-24 03:37:24] error: zh:ember:uart:ash: Error while parsing received frame, status=HOST_FATAL_ERROR. [2024-06-24 03:37:24] error: zh:ember: !!! NCP FATAL ERROR reason=HOST_FATAL_ERROR. ATTEMPTING RESET... !!! [2024-06-24 03:37:24] info: zh:ember:queue: Request dispatching stopped; queue=0 priorityQueue=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: ASH COUNTERS since last clear: [2024-06-24 03:37:24] info: zh:ember:uart:ash: Total frames: RX=2, TX=3 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Cancelled : RX=1, TX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: DATA frames : RX=0, TX=1 [2024-06-24 03:37:24] info: zh:ember:uart:ash: DATA bytes : RX=0, TX=4 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Retry frames: RX=0, TX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: ACK frames : RX=0, TX=1 [2024-06-24 03:37:24] info: zh:ember:uart:ash: NAK frames : RX=0, TX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: nRdy frames : RX=0, TX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: CRC errors : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Comm errors : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Length < minimum: RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Length > maximum: RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Bad controls : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Bad lengths : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Bad ACK numbers : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Out of buffers : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Retry dupes : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: Out of sequence : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: ACK timeouts : RX=0 [2024-06-24 03:37:24] info: zh:ember:uart:ash: ======== ASH stopped ======== [2024-06-24 03:37:24] info: zh:ember:ezsp: ======== EZSP stopped ======== [2024-06-24 03:37:24] info: zh:ember: ======== Ember Adapter Stopped ======== [2024-06-24 03:37:25] info: zh:ember: ======== Ember Adapter Starting ======== [2024-06-24 03:37:25] info: zh:ember:ezsp: ======== EZSP starting ======== [2024-06-24 03:37:25] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:37:25] info: zh:ember:uart:ash: Socket ready [2024-06-24 03:37:25] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:37:26] info: zh:ember:uart:ash: ======== ASH connected ======== [2024-06-24 03:37:26] info: zh:ember:uart:ash: ======== ASH started ======== [2024-06-24 03:37:26] info: zh:ember:ezsp: ======== EZSP started ======== [2024-06-24 03:37:26] warning: zh:ember: [EzspConfigId] Failed to SET "APS_UNICAST_MESSAGE_COUNT" TO "32" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead. [2024-06-24 03:37:26] info: zh:ember: [STACK STATUS] Network up. [2024-06-24 03:37:26] info: zh:ember: [INIT TC] NCP network matches config. [2024-06-24 03:37:26] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1246ms until next broadcast. [2024-06-24 03:37:26] info: zh:ember:queue: Request dispatching started. [2024-06-24 03:37:26] info: zh:ember:ezsp: Received network/route error ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE for "52765". [2024-06-24 03:38:05] error: z2m:mqtt: Not connected to MQTT server! [2024-06-24 03:38:05] error: z2m:mqtt: Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: '{"state":"offline"} [2024-06-24 03:38:05] info: z2m:mqtt: Disconnecting from MQTT server [2024-06-24 03:38:05] info: z2m: Stopping zigbee-herdsman... [2024-06-24 03:38:05] info: z2m: Stopped zigbee-herdsman [2024-06-24 03:38:05] info: z2m: Stopped Zigbee2MQTT root@zigbee2mqtt:/opt/zigbee2mqtt/data/log/2024-06-24.03-37-22#

(FAILED TO START)

root@zigbee2mqtt:/opt/zigbee2mqtt# npm start

zigbee2mqtt@1.38.0 start node index.js

[2024-06-24 03:49:20] info: z2m: Logging to console, file (filename: log.log) [2024-06-24 03:49:20] info: z2m: Starting Zigbee2MQTT version 1.38.0 (commit #6c7d52a3) [2024-06-24 03:49:20] info: z2m: Starting zigbee-herdsman (0.49.2) [2024-06-24 03:49:20] info: zh:ember: Using default stack config. [2024-06-24 03:49:20] info: zh:ember: ======== Ember Adapter Starting ======== [2024-06-24 03:49:20] info: zh:ember:ezsp: ======== EZSP starting ======== [2024-06-24 03:49:20] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:49:20] info: zh:ember:uart:ash: Socket ready [2024-06-24 03:49:20] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:49:20] error: zh:ember:uart:ash: Received ERROR from NCP while connecting, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT. [2024-06-24 03:49:20] error: zh:ember:uart:ash: ASH disconnected | NCP status: ASH_NCP_FATAL_ERROR [2024-06-24 03:49:20] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR. [2024-06-24 03:49:20] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR. [2024-06-24 03:49:20] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR. [2024-06-24 03:49:20] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR. [2024-06-24 03:49:20] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:49:20] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:49:21] info: zh:ember:uart:ash: ======== ASH connected ======== [2024-06-24 03:49:21] info: zh:ember:uart:ash: ======== ASH started ======== [2024-06-24 03:49:21] info: zh:ember:ezsp: ======== EZSP started ======== [2024-06-24 03:49:22] warning: zh:ember:uart:ash: Frame(s) in progress cancelled in [1ac1020b0a527e] [2024-06-24 03:49:22] error: zh:ember:uart:ash: Received unexpected reset from NCP, with reason=RESET_SOFTWARE. [2024-06-24 03:49:22] error: zh:ember:uart:ash: ASH disconnected: ASH_ERROR_NCP_RESET | NCP status: ASH_NCP_FATAL_ERROR [2024-06-24 03:49:22] error: zh:ember:uart:ash: Error while parsing received frame, status=HOST_FATAL_ERROR. [2024-06-24 03:49:22] error: zh:ember: !!! NCP FATAL ERROR reason=HOST_FATAL_ERROR. ATTEMPTING RESET... !!! [2024-06-24 03:49:22] info: zh:ember:queue: Request dispatching stopped; queue=0 priorityQueue=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: ASH COUNTERS since last clear: [2024-06-24 03:49:22] info: zh:ember:uart:ash: Total frames: RX=2, TX=3 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Cancelled : RX=1, TX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: DATA frames : RX=0, TX=1 [2024-06-24 03:49:22] info: zh:ember:uart:ash: DATA bytes : RX=0, TX=4 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Retry frames: RX=0, TX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: ACK frames : RX=0, TX=1 [2024-06-24 03:49:22] info: zh:ember:uart:ash: NAK frames : RX=0, TX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: nRdy frames : RX=0, TX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: CRC errors : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Comm errors : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Length < minimum: RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Length > maximum: RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Bad controls : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Bad lengths : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Bad ACK numbers : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Out of buffers : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Retry dupes : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: Out of sequence : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: ACK timeouts : RX=0 [2024-06-24 03:49:22] info: zh:ember:uart:ash: ======== ASH stopped ======== [2024-06-24 03:49:22] info: zh:ember:ezsp: ======== EZSP stopped ======== [2024-06-24 03:49:22] info: zh:ember: ======== Ember Adapter Stopped ======== [2024-06-24 03:49:23] info: zh:ember: ======== Ember Adapter Starting ======== [2024-06-24 03:49:23] info: zh:ember:ezsp: ======== EZSP starting ======== [2024-06-24 03:49:23] info: zh:ember:uart:ash: ======== ASH NCP reset ======== [2024-06-24 03:49:23] info: zh:ember:uart:ash: Socket ready [2024-06-24 03:49:23] info: zh:ember:uart:ash: ======== ASH starting ======== [2024-06-24 03:49:24] info: zh:ember:uart:ash: ======== ASH connected ======== [2024-06-24 03:49:24] info: zh:ember:uart:ash: ======== ASH started ======== [2024-06-24 03:49:24] info: zh:ember:ezsp: ======== EZSP started ======== [2024-06-24 03:49:24] warning: zh:ember: [EzspConfigId] Failed to SET "APS_UNICAST_MESSAGE_COUNT" TO "32" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead. [2024-06-24 03:49:24] info: zh:ember: [STACK STATUS] Network up. [2024-06-24 03:49:24] info: zh:ember: [INIT TC] NCP network matches config. [2024-06-24 03:49:24] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast. [2024-06-24 03:49:24] info: zh:ember:queue: Request dispatching started. [2024-06-24 03:49:29] info: zh:ember:ezsp: <=== [ZDO clusterId=32824 sender=52815] Support not implemented upstream.

(FAILED TO START)

hellcry37 commented 1 week ago

I am using slzb-06 and mine is more unstable also

mmokrejs commented 1 week ago

Add rtscts: false to your config for the ember driver (requires core and radio firmware updates prior to that) and beware, that at least for me the configuration.yaml is somehow cached by HomeAssistantGreen and is out of sync with the configuration.yaml I edited via ssh. I deleted the database/json contents of the /config/zigbee2mgtt_"$somenum"/ and rebooted. That is probably why people complain things are messy, because the contents are somehow cache or once parsed and converted to the database format the GUI reachable via HA -> Settings -> AddOns -> Zigbee2MQTT -> Configuration is out of sync.

Core Firmware update - SLZB-06M Zigbee Ethernet POE USB Adapter

Firmware update - SLZB-06M Zigbee Ethernet POE USB Adapter

mirkochip88 commented 10 hours ago

Slzb-06m with ember and rtscts on false, same here. If I've switch back to ezsp, work like a charm.