Repository navigation
Conversation
Raw ZCL over UDP/IPv6 to per-device addresses derived from the Extended PAN ID, with ack/nack, a send policy and multicast copies of unsolicited frames. Throwaway; see spike/zbr/SPIKE.md and the design note. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ziggurat as a router of the spike network on a second C6, configured from the coordinator's settings, serving the same gateway; NWK_addr_req discovery for unknown devices. Results in spike/zbr/SPIKE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Soak (router placement, 1 h)Every 5 s: toggle the light (ack requested), read On/Off back, wait for the multicast report.
|
Mark devices sleepy from their Device_annce capability, pass sleepy_destination to the stack, retry once after an APS ack timeout. Probe results against a C6 sleepy end device in spike/zbr/SPIKE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The router answers NWK_addr_req / IEEE_addr_req for itself, so a sleepy device bound to it can resolve the binding and its reports reach the multicast group. Adds the sed_steps.py client, a parametrised soak, and the SED functional and 1 h soak results to SPIKE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sleepy end device through the border router (router placement)An ESP32-C6 running as a sleepy end device: receiver off when idle, data poll about every 15 s. Its parent is a mains-powered light, not the gateway. Commits 8c7f7a6 and e4b8e1a; details are in Probes: a read every 2 s for 60 s (30 requests)
Functional
1 h soak: toggle, then read back, every 45 s, no client retries
Takeaways
|
A frame for a sleepy device is re-sent at the parent's persistence time (7.68 s, 15.36 s) with the same APS counter until one copy is acked. The 1 h soak goes from 44/80 to 80/80 cycles. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sleepy end device: re-sending every 7.68 s closes the gapThis follows up the previous comment. The gateway now re-sends a frame for a sleepy device at 7.68 s and 15.36 s after the first send, which is the parent's indirect-queue persistence time. It stops as soon as one copy is acked. Every copy reuses the first one's APS counter, so the device drops duplicates instead of running the command twice. Together the three copies cover a poll period of up to about 23 s. Commit 029c88a. The 1 h soak used the same setup: toggle, then read back, every 45 s, with no client retries.
|
|
Great to see that you have one eye on both the classic sed and with modern pull-control. I have only sniffing Ikea controllers that doing end device timeout request then connecting its parent but i dont knowing how long its can being but i have seen some hours being acked from the parent. Great work done !! |
Throwaway spike, not for merging. This draft is here to share the code and findings.
What it is
A gateway that makes every device on a Zigbee network reachable over IPv6. Anything with a
UDP socket can then talk to a device in raw ZCL, without a Zigbee radio, zigpy or a vendor
SDK. It is modelled on Z-Wave Z/IP and on how an OpenThread Border Router publishes a Thread
network. Design note:
docs/superpowers/specs/2026-11-21-zigbee-border-router-design.md.<prefix>::<EUI-64>. The /64 is a ULA derived from theExtended PAN ID:
fd+ 40 bits of SHA-256("zigbee-br" ‖ EPID).fields: flags, seq, endpoint, cluster, profile, status.
RFC 3306 group
ff35:40:<prefix>::1, sent from the device's own address.read-only(default),commands,full.flowchart LR C["IP client<br/>(any UDP socket)"] subgraph Host["Linux host"] direction TB subgraph A["Spike A: coordinator placement"] ZA["ziggurat-server<br/>+ zbr gateway"] --- ZP["zigpy / ZHA"] end subgraph B["Spike B: router placement"] ZB["ziggurat-server (router)<br/>+ zbr gateway"] end end RA(("C6 RCP<br/>coordinator 0x0000")) RB(("C6 RCP<br/>router 0x4965")) L(("ZBOSS light<br/>0x1f77")) C -- "UDP/IPv6 :23106<br/>to fd9e:…:fe0a:e0a0" --> ZA C -. "or" .-> ZB ZA --- RA ZB --- RB RA <-- "802.15.4" --> L RB <-- "802.15.4" --> L ZB -. "network settings<br/>(WebSocket)" .-> ZAflowchart LR E["Extended PAN ID<br/>bf:21:54:02:88:05:4e:3d"] --> H["SHA-256('zigbee-br' ‖ EPID)"] H --> P["fd + first 40 bits, subnet 0<br/>fd9e:4994:3fb::/64"] D["Device EUI-64<br/>20:6e:f1:ff:fe:0a:e0:a0"] --> I["modified EUI-64<br/>(U/L bit flipped)"] P --> AD["fd9e:4994:3fb::226e:f1ff:fe0a:e0a0"] I --> AD P --> G["multicast ff35:40:fd9e:4994:3fb::1"]Header (8 bytes):
Spike A: coordinator placement (
--zbr-port)crates/ziggurat-server/src/zbr.rsruns next to the zigpy client. It subscribes to thenotification hub and sends through
proto::send_unicast, with no stack changes.by unicast from the device's address, with the client's ZCL TSN restored.
commandspolicy nacks Configure Reporting and ZDO.fullpolicy, a ZDO Bind and Configure Reporting from IP produce reports onthe multicast group.
Spike B: router placement (
--zbr-router-of <ws url>)crates/ziggurat-server/src/zbr_router.rsruns Ziggurat on a second radio as a router ofthe same network. It is configured from the coordinator's settings (as in the ZLOE satellite
spike), with
NodeRole::Routerand no stack changes.multicast group.
unknown-deviceafter 3 s.
Request, reply and report
sequenceDiagram participant C as IP client participant G as zbr gateway participant Z as Zigbee light participant M as Multicast group C->>G: hdr(ack-req, seq) + ZCL (TSN 17)<br/>to device address G->>G: policy check, EUI-64 to NWK<br/>(NWK_addr_req if unknown) G->>Z: APS unicast, TSN rewritten 17 to 128 Z-->>G: APS ack G-->>C: hdr(ack, seq) Z-->>G: ZCL response (TSN 128) G-->>C: hdr(seq) + ZCL (TSN 17)<br/>from device address Z-->>G: Report Attributes (bound, unsolicited) G-->>M: hdr(unsolicited) + ZCL<br/>from device addressFindings
IPV6_PKTINFOplusIPV6_FREEBIND, andSO_REUSEADDRfor local group listeners.from zigpy.
Moving the binding takes state updates away from ZHA, and keeping both bindings doubles
the traffic. This is the main open design question.
multicast group. It should drop them.
Details, setup and logs:
spike/zbr/SPIKE.mdandspike/zbr/*.log.Hardware
ESP32-C6 boards running the stock OpenThread RCP firmware as radios, a ZBOSS on/off light
as the test device, and zigpy-ziggurat 1.2.1. Everything ran in a rootless network namespace.
🤖 Generated with Claude Code