Persistent ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT — reproduces on two different EZSP radios (ZBT-1 and ZBT-2
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the reported path through bellows/ash.py (_send_data_frame and send_data), then trace set_extended_timeout in bellows/ezsp/v4/__init__.py and send_packet in bellows/zigbee/application.py. Compare the ACK timeout failure with the reported gateway teardown symptoms and review the attached log excerpt. Done means the cause is identified and the repeated failure and resulting Core disruption are addressed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Report: Persistent ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT — reproduces on two different EZSP radios (ZBT-1 and ZBT-2)
Summary
bellows.ash.NcpFailure: NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT occurs
repeatedly during normal ZHA operation (triggered via set_extended_timeout inside
zigpy.zcl.reply → zigpy.device.request → bellows.zigbee.application.send_packet).
The error causes intermittent Home Assistant Core freezes/unresponsiveness
(Supervisor watchdog "missed API response", occasionally forcing a full Core
restart), and has now been reproduced identically after replacing the radio
hardware entirely — from a Home Assistant Connect ZBT-1 to a Home Assistant
Connect ZBT-2 — which rules out a defective individual USB stick.
Environment
- Home Assistant Core: 2026.7.3 (also reproduced on 2026.7.2)
- Installation type: Home Assistant OS 18.1, Home Assistant Green (aarch64, embedded)
- Supervisor: 2026.07.3
- ZHA: 2.0.0
- zigpy: 2.0.0
- bellows: 0.49.2
- zha-quirks: 2.1.1
- Radio (original): Home Assistant Connect ZBT-1, EmberZNet firmware 7.5.1.0 build 0 (20260224005823), chip EFR32MG21A020F512IM32, ezspVersion 13, stack_version 13
- Radio (after migration): Home Assistant Connect ZBT-2 — same error reproduces
- Network size: ~35 Zigbee devices (mix of Router/EndDevice, mostly Tuya/SONOFF)
- Connection: USB, official Nabu Casa 40cm extension cable (Nabu Casa-recommended)
Steps already ruled out
We spent significant time isolating this before concluding it's a software issue:
- USB cable/port: tested multiple ports, tested with and without the official
40cm extension cable.ASH_OVERFLOW_ERROR,ASH_FRAMING_ERROR,ASH_OVERRUN_ERROR
counters are all 0 — no physical-layer transmission errors. - RF interference: energy scan showed the network's original channel (25) was
heavily congested (score ~4/100) vs. channel 20 (~86/100). Migrated the network to
channel 20 viazha_toolkit/ZHA network migration. Did not resolve the issue —
confirms this is a USB/serial (ASH protocol) problem, not an over-the-air RF problem. - Known periodic-backup bug (zigpy/bellows#724): initially suspected this was the
cause (xncp_get_route_table_entryburst during zigpy's periodic network backup
overwhelming the ASH ACK budget). Applied the documented workaround:
This did eliminate the specificzha: zigpy_config: backup_enabled: falseload_network_info/route-table-dump crash-loop
signature, but the underlyingERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNTstill recurs
via a different code path — triggered by ordinaryset_extended_timeoutcalls
during normal device communication (not the periodic backup task). - Hardware replacement: swapped the radio entirely (ZBT-1 → ZBT-2) using ZHA's
built-in "automatic radio migration" flow (network key/PAN ID/channel/device list
preserved, ~35 devices did not need re-pairing). The identical
ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNTtraceback reappeared within an hour of
migrating to the brand-new ZBT-2, ruling out a defective individual unit. - CPU/RAM/network/DNS/socket-count: all checked during "hang" windows and found
normal (CPU ~24-29%, RAM ~2.6-2.9/4GB,ping/nslookupclean,/proc/net/sockstat
unremarkable, no USB bus resets/re-enumerations in kernel log).
Observed traceback (identical on both ZBT-1 and ZBT-2)
Traceback (most recent call last):
File "zigpy/zcl/__init__.py", line 891, in reply
return await self._endpoint.reply(...)
File "zigpy/endpoint.py", line 269, in reply
return await self.device.reply(...)
File "zigpy/device.py", line 996, in reply
return await self.request(...)
File "zigpy/device.py", line 693, in request
await send_request(attempt=attempt)
File "zigpy/application.py", line 1136, in request
await self.send_packet(...)
File "bellows/zigbee/application.py", line 1030, in send_packet
await self._ezsp.set_extended_timeout(...)
File "bellows/ezsp/v4/__init__.py", line 201, in set_extended_timeout
(curr_extended_timeout,) = await self.getExtendedTimeout(remoteEui64=ieee)
File "bellows/ezsp/protocol.py", line 124, in command
await self._gw.send_data(data)
File "bellows/uart.py", line 26, in send_data
await self._transport.send_data(data)
File "bellows/ash.py", line 735, in send_data
await asyncio.shield(...)
File "bellows/ash.py", line 660, in _send_data_frame
raise NcpFailure(t.NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT)
bellows.ash.NcpFailure: NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT
Also observed around the same failures:
bellows.thread: Attempted to use a closed event loop
RuntimeWarning: coroutine 'Gateway.send_data' was never awaited
AttributeError: 'NoneType' object has no attribute 'set_extended_timeout'
suggesting the gateway/_ezsp object is being torn down (set to None) while
in-flight set_extended_timeout calls are still referencing it — a possible
race condition between connection-loss handling and concurrent outgoing requests.
Impact
- Supervisor watchdog periodically logs
Watchdog missed a Home Assistant Core API response; in tight clusters this escalates toWatchdog missed 2 Home Assistant Core API responses in a row. Restarting Home Assistant Core!— forcing a full
Core restart, several times a day on bad days. - Frontend shows recurring "Connection lost. Reconnecting…" during these episodes.
- Home Assistant Cloud (Nabu Casa) full-instance backup uploads fail
(pre_backup_actions_failed/Error during pre-backup: NcpResetCode. ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT) when the pre-backup hook happens to
coincide with this condition. - A secondary add-on (Automation Inspector) was observed cycling its WebSocket
connection to Core every ~30-40s during bad episodes; stopping it correlated
with a quieter period, but this may be a symptom rather than a cause and needs
more data before concluding anything.
Request
Given this reproduces identically across two different EZSP radios (different
physical units, same chip family/firmware baseline) under the same Home Assistant
Core version, we suspect a bellows/zigpy-side issue (possibly related to the ASH
retry/timeout budget under load, or the _ezsp/gateway teardown race noted above)
rather than anything hardware-specific. Happy to provide full diagnostics
(config_entry-zha-*.json diagnostics download available, network keys redacted)
or run further debug-level logging on request.
Attachments to include when filing
- ZHA diagnostics JSON (download via Settings → Devices & Services → ZHA →
⋮ → Download diagnostics) — redact/removenetwork_keyand
tc_link_keyfields before uploading, or use GitHub's private
attachment flow - Full Home Assistant Core log covering a "hang" window (Settings → System →
Logs → download, or/config/home-assistant.log) - Supervisor log covering the same window (Settings → System → Logs → pick
"Supervisor" from the dropdown → download)
- Lingua principale
- Python
- Stelle
- 221
- Fork
- 104
- Merge medio
- 5g 15h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di zigpy/bellows
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
-
Stale NCP source route is never invalidated after SOURCE_ROUTE_FAILURE; end device unreachable until re-pairForse già presa @puddly l’ha presa 5 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di zigpy/bellows
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
volcengine/OpenViking#8432 ·
I maintainer di solito rispondono entro 1 giorno
-
Failed chat turns are passed to the follow-up rewrite as completed historyForse già presa @hskhyl l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/auto-ontology#683 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation task
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Implement parse_url and accept http URLs for Pear backendForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fedora-infra/anitya#2231 ·
I maintainer di solito rispondono entro 2 giorni
-
MarkdownDocSerializer.post_process escapes '\<' to '\<', rendering literal '<' in CommonMarkAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
docling-project/docling-core#1067 ·
I maintainer di solito rispondono entro 3 giorni