Repository navigation
Description
Summary
An end device changed parents. After that, the coordinator kept sending to it through the old source route. Every unicast came back with ROUTE_ERROR_SOURCE_ROUTE_FAILURE for the device's NWK. Uplink from the device kept working, but every downlink command timed out. Retries with FORCE_ROUTE_DISCOVERY failed the same way. Several many-to-one route refreshes (MTORRs) happened, and other routers answered them with route records, yet the stale entry stayed. The only thing that recovers the device is re-pairing it.
bellows receives the route errors, but handle_route_error() only logs them. Nothing invalidates the NCP's source-route entry, triggers a refresh for that destination, or falls back to plain AODV.
Environment
- Home Assistant 2026.10.4, ZHA 2.3.1, bellows 1.1.0, zigpy 2.3.0
- Home Assistant Connect ZBT-1, firmware 7.5.1.0 build 0 (20260224005823)
- zigpy
source_routingat its default (off). The host never callssetSourceRouteorxncp_set_manual_source_route(0 occurrences in the debug log), so the stale route comes from the NCP's own concentrator table.
Device
- Aqara H1 no-neutral switch
lumi.switch.b1laus01, EndDevice, NWK0x8F55 - Old parent:
0xFB91(IKEA VINDSTYRKA, router). New parent:0xD34C(IKEA TOFSMYGGA outdoor plug), according to the neighbor tables. zigbee.db,relays_v15for this device:0191FB. That is the last route record, still via0xFB91.
What the logs show
- A read of OnOff from the host results in a
sendUnicastto0x8F55. ThemessageSentHandlerto the first hop reportsSUCCESSorNO_APS_ACK. - About 0.3 s later:
incomingNetworkStatusHandler [ROUTE_ERROR_SOURCE_ROUTE_FAILURE: 11, 0x8F55]
incomingRouteErrorHandler {'status': SOURCE_ROUTE_FAILURE: 169, 'target': 0x8F55}
Processing route error: status=sl_Status.ZIGBEE_SOURCE_ROUTE_FAILURE, nwk=0x8F55
- zigpy retries with
APS_OPTION_RETRY|APS_OPTION_FORCE_ROUTE_DISCOVERY. The same route error comes back each time, and the request times out after 44 s. 10 of 11 reads failed this way over roughly 15 minutes, with 18 route errors logged for0x8F55. - MTORRs did go out. Route records arrived from other routers (
0xFB91,0x7C5A,0xD14F,0xF65Eand others) within seconds. - The device was then physically operated twice. Its reports arrived as
INCOMING_UNICASTfrom0x8F55(last hop LQI 100 to 104, RSSI -85), once about 10 s after a refresh burst. No route record for0x8F55arrived either time, so the stale entry was never replaced.
Expected
Once a source route to a destination keeps failing with SOURCE_ROUTE_FAILURE, it should stop being used. The stack or bellows should drop the entry, or let AODV route discovery take over, so the device becomes reachable through its new parent without re-pairing.
Notes
- The new parent apparently never sending a route record for its child (step 5) is what triggers this. That may be specific to the router or the device. But the coordinator has no recovery path once that happens.
- Also enable AODV route discovery on source-routed unicasts #719 (route discovery on source-routed unicasts) only applies when
source_routingis enabled, so it doesn't cover this case. Here route discovery was already requested, and was even forced, but the NCP's source-route table still took precedence. - A sanitized debug log excerpt is in the first comment. Device IEEE addresses are masked as
<ieee>.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Size
Area
Activity
tsmvp commentedon Oct 28, 2026
Debug log excerpt (bellows.zigbee.application, bellows.ezsp.protocol, zigpy.application at DEBUG), filtered to the relevant lines. It covers the sends to
0x8F55, the route errors, every route record received, and the incoming frames from0x8F55, including the two physical presses at 00:13:41 and 00:16:41. Device IEEE addresses are masked.Log (120 lines)
puddly commentedon Oct 28, 2026
The debug log doesn't contain much info here. If you haven't enabled source routing, it shouldn't be in use unless you enabled it and then disabled it again. What would be most helpful here is a traffic capture. Can you attach a traffic capture PCAP?
https://github.com/zigpy/ziggurat/blob/dev/crates/ziggurat-tools/src/bin/pcap_rekey.rs contains a tool to change the network key of a PCAP.
dickesW commentedon Nov 15, 2026
Same symptom here, with a capture. Short version: the coordinator learns the end device's source route only from route records. After the device moved to a new parent, no route records for it arrive at all, so the old entry (via the old parent) is never replaced.
SOURCE_ROUTE_FAILUREfrom the old parent and a correct route reply from the new parent do not change that.Setup: HA 2026.11.1 (HAOS), ZHA, Home Assistant Connect ZBT-2, EmberZNet 7.5.1.0.
source_routingis not set inzigpy_config(default off, also confirmed in the ZHA diagnosticsdata.config). Sniffer: second stick withember-zli sniffon the same channel, placed next to the coordinator.Device: HOBEIAN ZG-204ZM presence sensor (battery end device), NWK
0x2710.0xdb74, Signify 440400982842, firmware 0x01002900.0x72f0, OSRAM CLA60 RGBW, firmware 0x01020510.The parent is taken from the MAC destination of the sensor's own frames (data requests and data).
Attached PCAP (
bellows-772.pcap, linktype 195):01030507090b0d0f00020406080a0c0d. Frames were decrypted with the real key and re-encrypted with this one, keeping counters and headers unchanged.Two windows, times in UTC+1:
0xdb740x2710, first relay0xdb74. Coordinator unicasts to0x2710use source route[0xdb74, 0xfa81], which is correct.0x72f0(only MAC destination of its own frames)0x2710. All 338 coordinator unicasts to0x2710still carry source route[0xdb74, 0xfa81].0xdb74sends 488 × network status 0x0B (SOURCE_ROUTE_FAILURE) for0x2710to the coordinator. The coordinator's route requests for0x2710are answered by route replies that originate at0x72f0;0xdb74never originates one (it only relays some of the replies that originate at0x72f0).Over the whole morning, the coordinator used a source route ending at
0xdb74for every unicast to0x2710from 05:58 onward: 2 611 frames. The first relay varied (0x4f64,0x806a,0xfa81,0x7085,0x4a13), but the last relay was always0xdb74. The sensor has not been at0xdb74since at least 03:19 (start of that capture). The old parent keeps transmitting to the absent child: 13 014 MAC frames to0x2710in 20 minutes, against 349 frames arriving at it for0x2710. In the same 20 minutes the coordinator originated 308 route requests for0x2710.Second instance, 2026-11-14 (not in the PCAP): another ZG-204ZM (
0x75f0) with the same pair of parents, old0xdb74and new0x72f0. It showed the same pattern: the old parent hammered the absent child, and the coordinator ran route discoveries for0x75f0. It started right after an HA restart (09:05) and stopped by itself after 48 minutes, when the sensor's uplink went through0xdb74again. I did not decode the source-route headers that time.NCP reset during the episode (2026-11-15 10:52:43, not in the PCAP): nobody reloaded anything. bellows raised
NcpFailure: ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNTin_get_extended_timeoutwhile replying to0x2710(same trace as #735), and ZHA reconnected by itself. The NCP counters reset, and from 10:52:47 on the coordinator sends to0x2710without a source route (next hop0x4f64, path ending at0x72f0). In the following 34 minutes there were 850 unicasts to0x2710, all without a source route, with noSOURCE_ROUTE_FAILURE, no route request for0x2710and still no route record from0x2710. So the NCP reset cleared the stale entry, and it did not come back. On 2026-11-14 (second instance above) the restart did not end it. The sensor had moved to0x72f0at some point between 03:48 and 09:39 (sniffer gap), and I did not decode whether the route used after that restart was a source route.What this points to, as far as I can tell:
0x72f0, no route record for it reaches the coordinator. The ticket also says "new parent apparently never sending a route record". Whether0x72f0drops them or the end device stops sending them under this parent, I can't tell from the capture. The sensor itself is out of the sniffer's range.SOURCE_ROUTE_FAILUREand despite a fresh, working AODV route via0x72f0from its own route discovery.handle_route_error()only logs) invalidates it. I am not aware of an EZSP command on 7.5.1 that drops a single source-route entry.Happy to provide longer captures or to test a build.
bellows-772.zip
MattWestb commentedon Nov 15, 2026
Puddly be aware of some older hue routers is not timing out children and can giving problem with source routing if its not reporting it have jumping away to the network (i dont remember if the old parent or the new or both shall doing it).
The Osram i dont knowing if they have fixing there old firmware problems but need see if its accouterments its new child OK to the network or the network cant updating its router topography for it.
I dont digging in the sniff
dickesW commentedon Nov 15, 2026
Thanks @MattWestb. I checked the announcements around the parent change in the same capture (decrypted):
The child announces itself, and the coordinator hears it. 2026-11-15 01:56:59 (UTC+1):
0x2710sends a rejoin request to0x72f0, gets a rejoin response with status 0, and one second later broadcasts a Device_annce. Nine devices relay that broadcast, among them the coordinator itself and0x72f0. At 01:57:00.0680x72f0also sends an APS Update-Device for the child to the coordinator, which MAC-acks it. That frame has NWK security only, no APS security. The first unicast to0x2710afterwards (01:57:08.117) still carries the source route[0xdb74, 0x806a], and0xdb74answers with the first0x0Bat 01:57:08.393. Until the NCP reset at 10:52 that was 2 911 unicasts via0xdb74.Route records came from the old parent, not from the child. Every route record with NWK source
0x2710is first heard with MAC source0xdb74and relay list[0xdb74]. The child itself never sends one, only data frames. The last one was at 01:45:12, twelve minutes before the rejoin. None since. In fact only three routers in this network ever originate route records (two newer Signify,0xdb74and0xfa81, and one other), without any many-to-one route request. No OSRAM router and none of the older Hue bulbs do, as long as the coordinator sends no many-to-one route requests (see edit below).The OSRAM parent looks pre-R21.
7c:b0:3eand84:18:26), including0x72f0, answered with a Parent_annce_rsp with status0x84(NOT_SUPPORTED). Hue and the one other non-OSRAM router did not answer, which is expected since the listed child is not theirs.0x72f0got no response. In three days of capture, End Device Timeout Responses come only from the coordinator, the Hue0xdb74and one non-OSRAM router.0x75f0) rejoined at0x72f0three times on 2026-11-14, with no End Device Timeout exchange at all.So
the new parent neither generates route records for its child nor supports the R21 parent mechanismswithout many-to-one route requests the new parent generates no route records for its child, and it does not support the R21 parent mechanisms, but the child's Device_annce and the parent's Update-Device do reach the coordinator.On the host side I checked the code myself (bellows 1.2.1 and zigpy 2.4.1, as pinned by HA 2026.11.1):
handle_route_erroronly logs. Route records only update zigpy'sdevice.relays, and those are not used whilesource_routingis off. Nothing resetsrelayson a rejoin or Device_annce.setConcentrator(on=False). The capture agrees: in 25 hours the coordinator sent no many-to-one route request at all, only ordinary ones. So the stale entry lives entirely in the NCP's own source route table, which keeps being filled from route records even though the NCP is not a concentrator.Turning onOn EZSP ≥ 9source_routingwould not fix it directly either.set_source_routeis a no-op, and withmanual_source_routingthe XNCP override would install zigpy's relays, which are just as stale. See the edit below for whatsource_routing: truedoes change.On the firmware side, the public source route API only allows reading. The stack does export
sli_zigbee_source_route_delete_entry(id), though: it is declared inprotocol/zigbee/stack/zigbee/source-route-table-update.h(GSDK 4.5.0 and SiSDK 2025.6.3) and is a global symbol inlibzigbee-source-route.a. So an XNCP command could drop a single entry, much like the existing route table commands usesli_zigbee_route_table.@puddly: is it expected that the NCP keeps using learned source routes while the concentrator is off? And would a fix along these lines be acceptable: an XNCP command that deletes the source route entry for a node, called by bellows when a Device_annce, an Update-Device or a
SOURCE_ROUTE_FAILUREarrives for it?Edit (same day): I enabled
source_routing: trueand restarted HA. The coordinator now sends many-to-one route requests,0x72f0answers with route records for0x2710([0x72f0]), and the coordinator's source route to0x2710is now[0x72f0], with no0x0B. So the OSRAM routers behave per spec once there is an MTORR. Whether this avoids the stale route on the next Hue → OSRAM parent change is still open; I'll report back.puddly commentedon Nov 15, 2026
@dickesW Did you migrate your network from a TI radio? Source routing is kind of sticky and will stay on even if you don't keep it on because routers keep the state in memory. You may need to power cycle routers to get them to stop.
Regarding the bad Hue router: @TheJulianJES looked into this before and I reported it to Hue a long time ago. If I recall correctly, route records passing through the device have the router's NWK address added to the source routes chain but with swapped endianness (i.e.
0xABCDis flipped to0xCDAB), this will absolutely mess up all source routes. Not sure if this is the case here. Do you have any old Hue lamps or OSRAM devices?dickesW commentedon Nov 15, 2026
Thanks @puddly.
Migration: not from TI, but from a ConBee II (deCONZ). The network was migrated to a ZBT-1 years ago, and on 2026-10-18 to the ZBT-2. The coordinator IEEE still carries the dresden elektronik OUI
00:21:2e.It is now set tosource_routingis currently not set.true, see the edit in my earlier comment.Sticky source routing:
that would fit what I see.It doesn't, see my next comment. Only three routers in this network originate route records without an MTORR:0xdb74,0xfa81(both newer Signify) and0x4a13. They do it without any many-to-one route request from the coordinator (none in 25 hours of capture). I'll power cycle0xdb74and0xfa81, keep0x4a13as a control, and check with the sniffer whether they stop. (Done for0xfa81only, see my next comment.)Swapped relays: I had exactly that in October. Hue Bloom/Iris on 67.116.10 flipped the relay addresses in route records, and I downgraded them to 5.127.1.26581 on 2026-10-23. In the capture from 2026-11-14 12:12 to 2026-11-15 15:00, every router that forwards route records leaves the relay list unchanged. The stale routes to
0x2710([0xdb74, 0xfa81],[0xdb74, 0x806a], …) only contain real addresses, so that is not it here.Old Hue / OSRAM: yes, both. About a dozen OSRAM/Ledvance routers, including the new parent
0x72f0, and five older Hue bulbs. None of them originates route records without an MTORR. Withsource_routing: truethey do, see the edit in my earlier comment.dickesW commentedon Nov 15, 2026
Update on the power cycle test. I only power cycled
0xfa81.0xdb74had already been without power for several hours a few weeks ago and has originated route records on every captured day since, so it already answers the question.0xfa81was silent from 15:14:29 to 15:16:57 (UTC+1). Its NWK frame counter jumped to the next 4096 boundary (0xA0B001), and it sent its own route records again at 15:16:58 and 15:17:05. There was no many-to-one route request from anyone, neither then nor anywhere in about two weeks of capture since 2026-10-17 (the first night still on the ZBT-1).So these routers send route records on their own, not from leftover state, and I take back "that would fit what I see". The stale entries come from those route records, and power cycling doesn't stop them.
dickesW commentedon Nov 15, 2026
Result. Thanks @puddly and @MattWestb, your hints about old Hue and OSRAM routers pointed in the right direction. The floods I captured started when an end device rejoined at such a router, while a parent change to a newer Hue went cleanly. Without a many-to-one route request (MTORR) these routers don't originate route records for their children. So the NCP keeps the source route entry via the old parent, and every unicast fails with
SOURCE_ROUTE_FAILURE.With
source_routing: truethe coordinator sends an MTORR about every 60 s, and after that these routers send route records too. Since then I could check two parent changes of this kind:SOURCE_ROUTE_FAILURE.SOURCE_ROUTE_FAILUREfor the child, and the child moved on a minute later. That looks like a separate issue.Before the change, a parent change from a newer Hue that kept running to an old Hue (LLC011) gave 931
SOURCE_ROUTE_FAILUREs in 30 minutes.So far that looks fixed here, but these are only two cases from one evening. I'll report back if that changes.
Suggestion for networks without
source_routing.handle_route_error()only logs theSOURCE_ROUTE_FAILURE, and the NCP keeps the entry. The EZSP API can read the source route table but not delete from it. The existing XNCP manual source route doesn't help here either: it overrides one send at a time and needs the correct relays, which the host doesn't know in this situation. A small XNCP command that calls the internalsli_zigbee_source_route_delete_entry()(a global symbol in EmberZNet 7.5'slibzigbee-source-route.a) would let bellows drop the entry when it gets aSOURCE_ROUTE_FAILUREfor a node or a Device_annce from it. Until the next route record arrives, the NCP would then reach the node without a source route.Why I think this works: the NCP reset from my first comment cleared the stale entry. In the following half hour the coordinator sent 850 unicasts to the sensor without a source route, via the new parent, with no failures, and the stale entry didn't come back. One caveat from the same comment: a restart on 2026-11-14 did not end that day's episode, and I couldn't tell why. Also not tested: deleting a single entry instead of clearing the whole table. The affected nodes are end devices, so no other entry should chain through them. I'm happy to test a patch.
zigpy-review-bot commentedon Nov 19, 2026
#778 addresses this. For the setups reported here it looks complete; what it changes:
source_routingoff (the current default, the setup in the original report): at startup bellows writesCONFIG_SOURCE_ROUTE_TABLE_SIZE = 0to the NCP (_get_ezsp_config, written on connect and after each NCP reset bellows does). With an empty source route table the NCP has no stale entries to keep, so unicasts use ordinary routing with route discovery. That is the state the second report observed after the NCP reset, when 850 unicasts reached the sensor through its new parent without a failure.source_routing: true: the table size is left as it is, and the concentrator is now started inRESCHEDULEmode instead ofON(one many-to-one route request right away, then periodic ones; the change from UseRESCHEDULEsource route discovery mode #716, rolled into Shrink source routing table to 0 when source routing is disabled #778). A failing source route is still not removed directly; what replaces it is the next route record, which the periodic many-to-one route requests make routers send. That matches the two clean parent changes reported withsource_routing: true.CONFIG_SOURCE_ROUTE_TABLE_SIZEset explicitly underezsp_configis kept as configured, so a configuration that sets it keeps the old behaviour withsource_routingoff.The PR description says it should be released together with zigpy/zigpy#1982, which enables
source_routingby default for EmberZNet radios.Verified (4 checks)
write_configwith{"CONFIG_SOURCE_ROUTE_TABLE_SIZE": 0}on EZSP v13 (mocked NCP reporting a current size of 200) sendssetConfigurationValue(CONFIG_SOURCE_ROUTE_TABLE_SIZE, 0): a value from the config replaces bellows' default of 200, which is otherwise only ever grown, never shrunk.ezsp_config, so the size-0 default applies unless a user configured the table size themselves.sl_zigbee_types.h:SL_ZIGBEE_SOURCE_ROUTE_DISCOVERY_RESCHEDULEsends a many-to-one route request once immediately, then periodically. Not verified here: that a given EmberZNet firmware accepts a table size of 0 at runtime (the SDK's build-time setting allows 2 to 255); the PR description reports a capture with no source-routed frames after the change.zigpy-review-bot commentedon Nov 20, 2026
A correction to my comment above: #778 is not complete as it stands. puddly found that with the source route table shrunk to 0, joins stop working, and moved the PR back to draft. In his comment on the PR he wrote that the only way he sees now is an XNCP command plus a small check in the firmware's source route hook (
nc_zigbee_override_append_source_route). XNCP commands are implemented in the radio firmware (NabuCasa/silabs-firmware-builder), so that route needs a firmware update as well as a bellows change. Why the empty table breaks joins through routers is laid out in this reply on the PR.So no released bellows changes this yet: #778 is unmerged, and Home Assistant 2026.11.2 ships bellows 1.2.1.
Verified (2 checks)
dickesW commentedon Nov 21, 2026
An update since my result comment, on how #772 behaves with
source_routing: truein practice:@kimdelta Your blind case on PR #778 (a stale source route after a rejoin,
SOURCE_ROUTE_FAILUREuntil a restart) is the pattern I had withsource_routingoff. Withsource_routing: trueit hasn't come back here, so it may be worth a try on your network.zigpy-review-bot commentedon Nov 21, 2026
A caveat for trying
source_routing: true, since it was just suggested above for the network described on #778, which has many Hue routers: some first-generation Hue lamps are reported to stop answering direct commands once the coordinator sends them source-routed frames, while group commands to the same lamps keep working.source_routing: trueset.With
source_routing: true, bellows makes the radio a concentrator that sends many-to-one route requests, and routers that otherwise send no route records start sending them (the capture above showed this for the OSRAM routers). So more devices end up with a stored source route than with the default. If direct commands to Hue lamps start failing after the change, the lamps' models and firmware versions are the first thing to compare. Going back means removing the setting and restarting, and as puddly wrote above, routers can keep source routing state until they are power-cycled.#778 is still a draft at the same head as before, so no released bellows changes the behaviour with
source_routingoff yet.Verified (4 checks)
set_source_routing: with source routing on it callssetConcentrator(on=True)as a high-RAM concentrator and, on EZSP 8 and newer, sets the source route discovery mode toON.DELIVERY_FAILEDwhile working in a group, and their configuration hassource_routing: true.kimdelta commentedon Nov 23, 2026
@dickesW Thanks for the suggestion. I enabled it on the network described on #778:
Enabled 2026-11-21 23:23 UTC, followed by an HA restart. I confirmed it is active in the ZHA diagnostics (
data.config.zigpy_config.source_routing: true). Setup: HA 2026.11.1 (Container), bellows 1.2.1, Sonoff ZBDongle-E on EmberZNet 7.4.4.0.Regarding the caveat about first-generation Hue: my routers are Hue LOM007, LCA012, LCA016, 929003598102 and 929003053301, plus three LEDVANCE PLUG EU EM T. There are no LCT001, LLC011 or LST001 on the network.
Result so far (about 2 days):
I don't have debug logs or a capture from this period, so this is based only on what my automation and error report register. Two days is short, since I've had fault-free stretches before, but so far it's a clear change.
zigpy-review-bot commentedon Nov 23, 2026
The debug log from the night of 2026-11-19 attached on #778 shows the mechanism of this issue, with a current Hue bulb as the new parent and a second affected blind:
SOURCE_ROUTE_FAILUREerrors for it.SOURCE_ROUTE_FAILUREerrors for it.With
source_routingoff, bellows 1.2.1 turns the radio's concentrator off, so the coordinator sends no many-to-one route requests. If the LCA012 sends route records once those requests are sent, as the OSRAM routers above did, that would explain the change you see withsource_routing: true. No log from the last two days shows it, though.Verified (4 checks)
bellows-stale-route-night-2026-11-19.log.gz(2026-11-19 21:29:56 to 2026-11-20 07:08:22 UTC):trustCenterJoinHandlerreportsSTANDARD_SECURITY_SECURED_REJOINwith parent 0xA374 for 0x1A3E at 22:22:32, 02:51:38 and 04:21:03, and for 0xDAFF at 05:53:38. ZHA's own log lines name 0xA374 as Signify LCA012, 0x698B as LOM007, 0x1750 as 929003598102, and 0x1A3E and 0xDAFF as lumi.curtain.acn002.incomingRouteErrorHandlerwithSOURCE_ROUTE_FAILURE: 17,311 for 0x1A3E (22:22:32 until 07:08:22) and 2,198 for 0xDAFF (05:53:39 until 07:08:22). None of the 27,435incomingRouteRecordHandlerframes in the log contains 0xA374, while 2,593 of the frames after the first rejoin still contain 0x698B.set_source_routing, called withenabled=Falsewhensource_routingis off (application.py):setConcentrator(on=False)and, on EZSP 8 and newer, source route discovery modeOFF.