Repository navigation
Enable child aging on Z-Stack builds from 20230507 - #287
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #287 +/- ##
==========================================
- Coverage 98.60% 98.54% -0.06%
==========================================
Files 43 43
Lines 3581 3582 +1
==========================================
- Hits 3531 3530 -1
- Misses 50 52 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
puddly
reviewed
Oct 21, 2026
Contributor
|
@zigpy-review-bot How does this compare to Z2M? |
Collaborator
Author
|
Short version: Z2M (zigbee-herdsman) never writes this NVRAM item at all, so it just runs with whatever the firmware ships. After this PR, zigpy-znp does the same on Koenkk's 20230507+ builds.
The one thing the comparison does not settle is the PR's open item: the cutoff trusts |
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zigpy-znp has written
NWK_CHILD_AGE_ENABLE=Falseat every start since 18448dc (2020). Koenkk's Z-Stack 3.x.0 builds enable child aging from 20230507 on and skip the NotMyChild leave for Xiaomi devices (prefix 00:15:8d) in firmware, so zigpy-znp's write turned off what those builds ship with. Related: #285Changes
NWK_CHILD_AGE_ENABLE=Truewhen the Z-Stack build id is 20230507 or newer,Falseotherwise (older builds, builds without aCodeRevision). The item is still written in both cases, because a coordinator that already ran under zigpy-znp hasFalsein NVRAM.SYS.Versionbefore the stack settings are written (the build id is needed there); it is no longer requested afterstart_network.AssocRemoverecovery, which assumed aging is always off.Testing
test_child_aging_by_buildcovers builds before and after the cutoff and a missingCodeRevision.Open items
CodeRevisionbeing Koenkk's build date, the same assumption as the existing 20210708 check. A non-Koenkk build reporting a later date without the Xiaomi leave exemption would now run with aging on.send_packetstill drops a child at its firstMAC_TRANSACTION_EXPIRED; its interplay with aging is discussed in Child aging is forced off at every start: why, and should zigpy-znp stop writing NWK_CHILD_AGE_ENABLE? #285.