Repository navigation
Make sure Check in after boot waits for the operational network and mDNS to become active - #40
Conversation
d2cd71e to
37cea48
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It adds new public API, unsafe deep/light-sleep hardware logic, and core Thread-driver behavior changes that cannot be compiled or exercised in this environment and have no automated tests, so hardware-level human validation is warranted.
No open issues 🎉
What changed in this PR
This PR enables Thread Intermittently Connected Device (ICD) support in esp-idf-matter so that a node can run as a Sleepy End Device whose polling follows the ICD power mode, and it implements the previously-stubbed mDNS resolve/browse loops over the OpenThread DNS client so remote Matter services (e.g. ICD Check-In clients, subscribers) can finally be discovered after boot. It also ports two battery-powered Thread examples (SIT and LIT ICDs) from rs-matter-embassy. The Thread driver and SED keep-alive math are a faithful adaptation of the reference implementation in sysgrok/rs-matter-embassy (minus CSL, which esp-idf-svc does not expose), and the constants match OpenThread defaults.
Changes:
- Add
EspMatterThread::with_icd(...)plusconfigure_sed/run_icdso the Thread node is configured as a SED and re-applies polling intervals as the ICD power mode changes. - Implement SRP registration alongside DNS-client resolve/browse in
EspMatterThreadSrp, gated on the OpenThread DNS client being enabled and an SRP server being present. - Add
trv_battery_thread(SIT, light sleep) andtemp_sensor_battery_thread(LIT, deep sleep) examples, with supportingCargo.toml/README.md/CHANGELOG.mdentries.
| File | Description |
|---|---|
| src/wireless/thread.rs | Adds with_icd, SED configuration and the ICD-following poll loop raced against the driver task. |
| src/thread.rs | Replaces the resolve/browse TODO with SRP registration + DNS-client resolve/browse loops (cfg-gated). |
| examples/trv_battery_thread.rs | New SIT ICD radiator-valve example using automatic light sleep. |
| examples/temp_sensor_battery_thread.rs | New LIT ICD temperature-sensor example using deep sleep and RTC-RAM state. |
| Cargo.toml | Registers the two new examples with their required features. |
| README.md | Documents the extra features needed to build the battery examples. |
| CHANGELOG.md | Notes the new API, examples and mDNS resolve/browse capability. |
I verified the SED keep-alive constants (CHILD_TIMEOUT_DEFAULT_S=240, CHILD_SUPERVISION_INTERVAL_S=129, CHILD_SUPERVISION_CHECK_TIMEOUT_DEFAULT_S=190) and the child_timeout_s/child_supervision_check_timeout_s math against the authoritative rs-matter-embassy source and its unit tests, confirmed IcdNetParams field names (poll_interval_ms, max_poll_interval_ms) against rs-matter, and confirmed the cfg-gated imports and borrow handling in src/thread.rs are sound. I found no concrete defects to flag.
Review effort: Balanced
Also, port the SIT and LIT tests from
rs-matter-embassy