Record what is known to be open but not being worked on: the Zigbee stack forgetting its network after a short coordinator outage, the hardcoded network ID and channel, state not kept across reboots, the upstream zigbee-rs PRs and the spec questions to raise in them, what has not been tried on the hardware, and some housekeeping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4.1 KiB
4.1 KiB
TODO
Things that are known to be open. None of these is being worked on yet.
Reliability
- The Zigbee stack forgets its network after a short coordinator outage.
A failed rejoin is followed by a second attempt that, if it also fails,
wipes the network keys and falls back to a fresh join, which needs the
coordinator's pairing window to be open. This took the light off the network
when the server rebooted (18 Nov) and, most likely, again when Home Assistant
restarted (24 Nov; inferred, the failure itself was not captured). Each time
it needed re-pairing.
- Where:
commissionandlink_maintenanceinvendor/zigbee-rs/zigbee/src/stack.rs, and the retry loop instack_task(src/zigbee_stack.rs). - Idea: keep the saved network and keep retrying the rejoin with a back-off, and only forget it after a long failure (say 30 minutes), an explicit leave, or a network mismatch.
- It is a library change, so it belongs on its own branch off upstream
main, separate from the effects work. - The 10-second button hold makes recovery easy, but does not prevent it.
- Where:
Configuration
- The Zigbee network ID and channel are hardcoded in
src/zigbee_stack.rs(EXTENDED_PAN_ID,CHANNEL). The ID is broadcast by the network and is not a secret, but it means a light only pairs with one network.- Why it is pinned: the stack takes both from its configuration. Resuming after a reboot tunes to the first configured channel rather than the channel that was joined, and rejoin looks for the configured network ID. A wildcard ID or a range of channels would therefore break resume.
- Options: change the library to use the channel and ID it remembers, or have the app save the network it joined in its own flash and build the configuration from that.
- Light and effect state is not saved across reboots. On/off, level, colour and the selected effect all start from their defaults.
- The effects cluster uses development identifiers. Manufacturer code
0xC0DEis not assigned to anyone, and the cluster ID is0xFD00. Decide on proper values and change them together insrc/effects_cluster.rsandha/zha_quirks/smart_light.py. - The effect attributes are not reportable, so Home Assistant only knows what it last wrote. Fine while nothing else changes them; revisit if effects can be changed locally.
Upstream zigbee-rs
- Open PRs for the two branches already pushed to the fork, each as its
own PR off upstream
main:feature/identify-trigger-effectfeature/manufacturer-specific-clusters
- PR #109 (RGB colour control) is open and has had review comments applied. Squash-merge when approved.
- Spec questions to raise in review. Neither PR can say what ZCL
requires, so both pick an answer and flag it:
- Trigger Effect with an undefined effect or variant answers
INVALID_FIELD. - A frame for a manufacturer-specific cluster with the wrong manufacturer
code answers
UNSUP_COMMAND.
- Trigger Effect with an undefined effect or variant answers
- After the PRs merge, point the submodule at upstream (or the fork's
main) instead offeature/lighting-effects-integration, and delete the integration branch.
Testing gaps
Not yet tried on the hardware (the commit messages say so too):
- Trigger Effect: Okay, Channel change, Finish effect and Stop effect sent
from a coordinator. Only blink and breathe (ZHA's
flash) were tried. - Manufacturer-specific attribute reports.
- Rejection of a frame that carries the wrong manufacturer code.
Housekeeping
.gitmodulesuses an SSH URL for the submodule (git@github.com:m5p3nc3r/zigbee-rs.git). Switch to HTTPS if cloning from a network that blocks SSH.- Older commits point at submodule commits that no longer exist on any branch, because the integration branch was rebased. The tip works, but checking out an old commit and updating the submodule can fail.
- Pre-existing
rustfmtdifferences: 1 insrc/light.rsand 7 insrc/zigbee_stack.rs. Cosmetic; fix in a commit of their own. - No licence file. Decide on one.