Hello,
I am experiencing recurring fatal disconnections with my SONOFF Dongle Max (Dongle-M) used as a Zigbee coordinator over TCP (Ethernet), and after extensive troubleshooting I believe the root cause is in the ESP32 bridge firmware.
Setup:
Device: SONOFF Dongle Max, Device ID 25231900013758, ESP32 firmware V1.0.10 (latest)
Connection: Ethernet, PoE+ powered from UniFi switch, fixed LAN, TCP mode (port 6638)
Host: Zigbee2MQTT 2.12.1 (ember driver), Home Assistant, ~41 Zigbee devices, channel 11
MG24 firmware tested: EmberZNet 8.2.2.0 and 9.0.2 (both show identical behavior)
Symptom:
Every ~2–3 hours Zigbee2MQTT crashes with:
zh:ember:uart:ash: Received ERROR from adapter, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT.
zh:ember:uart:ash: ASH disconnected | Adapter status: ASH_NCP_FATAL_ERROR
z2m: Adapter disconnected, stopping
On some days this escalates to a "restart storm" (10+ crashes per hour). The device's own web UI notifications show matching repeated "HA/Zigbee2MQTT disconnected/connected" events (16+ pages).
Evidence pointing to the ESP32 bridge:
With the device debug log enabled, right before each failure I can see an ASH retransmission loop between the ESP32 and the MG24: the MG24 repeatedly retransmits the same data frames, the host repeatedly ACKs them, and finally the MG24 emits an ASH ERROR frame (c2 02 51 a8 bd 7e), after which the TCP socket is reset (tcp_server: TCP recv error, errno=104). The ESP32 itself never reboots (uptime 8+ days across many crashes).
Ruled out during troubleshooting:
Power supply: PoE+ from UniFi switch (also tested power cycling)
Network path: Ethernet (WLAN disabled), UniFi logs clean, 0% packet loss
Zigbee interference/devices: crashes occur even with availability/pinging disabled and no traffic peaks
MG24 firmware: identical crashes on EmberZNet 8.2.2.0 and 9.0.2
Additional bug: the device fails DNS resolution via the LAN DNS server (getaddrinfo error 202 for timeapi.coolkit.cc), so NTP never syncs and all notifications are timestamped 1970-01-01, which complicates diagnostics. Ping to 8.8.8.8 works.
This matches reports from other users in Zigbee2MQTT GitHub issues #30441 and #30891.
Could you please confirm whether this is a known issue in the ESP32 bridge firmware and whether a fix is planned? I am happy to provide full debug logs from both the device web console and Zigbee2MQTT.
Thank you,
Dominik
Před odesláním doporučuji přiložit výřez hex dumpu z web konzole dongle a kousek Z2M logu (oba máš z dnešní noci). Pokud založí ticket, drž se čísla ticketu — a stejný text (bez pozdravů) můžeš přidat i jako komentář do issue #30441 na GitHubu, tam pomůže ostatním.mužes ho rovnou přidat do textu výřez hex dumpu z web konzole dongle a kousek Z2M logu (oba máš z dnešní noci). ?Thought processThought processZde je kompletní verze s přiloženými logy:
Subject: Dongle Max (Dongle-M) — recurring ASH_NCP_FATAL_ERROR / TCP bridge failure every 2–3 hours (ESP32 firmware V1.0.10)
Hello,
I am experiencing recurring fatal disconnections with my SONOFF Dongle Max (Dongle-M) used as a Zigbee coordinator over TCP (Ethernet), and after extensive troubleshooting I believe the root cause is in the ESP32 bridge firmware.
Setup:
Device: SONOFF Dongle Max, Device ID 25231900013758, ESP32 firmware V1.0.10 (latest)
Connection: Ethernet, PoE+ powered from UniFi switch, fixed LAN, TCP mode (port 6638)
Host: Zigbee2MQTT 2.12.1 (ember driver), Home Assistant, ~41 Zigbee devices, channel 11
MG24 firmware tested: EmberZNet 8.2.2.0 and 9.0.2 (both show identical behavior)
Symptom:
Every ~2–3 hours Zigbee2MQTT crashes. Example from 2026-07-03 (repeated identically at 00:04, 00:30, 00:35, 00:39, 00:46, 03:50, 04:11, 04:22, 07:02):
[2026-07-03 04:11:04] error: zh:ember:uart:ash: Received ERROR from adapter, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT.
[2026-07-03 04:11:06] error: zh:ember:uart:ash: ASH disconnected | Adapter status: ASH_NCP_FATAL_ERROR
[2026-07-03 04:11:07] error: zh:ember:ezsp: Fatal error, status=ASH_NCP_FATAL_ERROR. Last Frame: [FRAME: ID=52:"SEND_UNICAST" Seq=41 Len=10]
[2026-07-03 04:11:11] error: z2m: Adapter disconnected, stopping
Occasionally also this variant during/after recovery:
[2026-07-03 04:25:55] error: zh:ember:ezsp: ERROR Transaction failure; status=ERROR_WRONG_DIRECTION. Last Frame: [FRAME: ID=52:"SEND_UNICAST" Seq=36 Len=27].
On some days this escalates to a "restart storm" (10+ crashes per hour). The device's own web UI notifications show matching repeated "HA/Zigbee2MQTT disconnected/connected" events (16+ pages).
Evidence pointing to the ESP32 bridge (device web console debug log, captured 2026-07-03):
Right before the failure, the host keeps sending ACK frames while the MG24 side repeatedly answers with the same ASH ERROR frame (c2 ...), then the TCP socket is reset:
W (452540) TCP: (4)=> 82 50 3a 7e
W (452543) MG24_TCP: (6)=> c2 02 51 a8 bd 7e
W (452552) TCP: (4)=> 83 40 1b 7e
W (452553) TCP: (8)=> 84 30 fc 7e 84 30 fc 7e
W (452557) MG24_TCP: (12)=> c2 02 51 a8 bd 7e c2 02 51 a8 bd 7e
W (452560) TCP: (4)=> 84 30 fc 7e
W (452599) TCP: (4)=> 84 30 fc 7e
W (452600) TCP: (8)=> 85 20 dd 7e 86 10 be 7e
W (452606) TCP: (16)=> 86 10 be 7e 86 10 be 7e 86 10 be 7e 86 10 be 7e
W (452607) MG24_TCP: (30)=> c2 02 51 a8 bd 7e c2 02 51 a8 bd 7e c2 02 51 a8 bd 7e c2 02 51 a8 bd 7e c2 02 51 a8 bd 7e
E (453919) tcp_server: TCP recv error, errno=104
I (453922) webserver_api: ... {"z2mOrZhaConnected":false,"tcpSocket":{"connected":false}}
Earlier in the same capture, data frames from the MG24 are visibly retransmitted multiple times (identical payloads repeated, e.g. frames 1c 61 b1 a9 6b 2a ..., 2c 61 b1 a9 0d 2a ..., 3c 61 b1 a9 7d 31 2a ... re-sent at 392108, 394149 and 397318 ms), while the host repeats ACKs — a classic ASH retransmission loop that ends with the ERROR frame above. The ESP32 itself never reboots (uptime 8+ days across many crashes).
Ruled out during troubleshooting:
Power supply: PoE+ from UniFi switch (also tested power cycling)
Network path: Ethernet (WLAN disabled), UniFi logs clean, 0% packet loss
Zigbee interference/devices: crashes occur even with availability/pinging disabled and no traffic peaks
MG24 firmware: identical crashes on EmberZNet 8.2.2.0 and 9.0.2
Additional bug: the device fails DNS resolution via the LAN DNS server (esp-tls: couldn't get hostname for :timeapi.coolkit.cc: getaddrinfo() returns 202), so NTP never syncs and all notifications are timestamped 1970-01-01 (see sys_time: local time :1970-01-01 in the log), which complicates diagnostics. Ping to 8.8.8.8 works.
This matches reports from other users in Zigbee2MQTT GitHub issues #30441 and #30891.
Could you please confirm whether this is a known issue in the ESP32 bridge firmware and whether a fix is planned? I can provide complete debug logs from both the device web console and Zigbee2MQTT on request.
Thank you,
Dominik
