Skip to content

Make sure Check in after boot waits for the operational network and mDNS to become active - #40

Merged
ivmarkov merged 1 commit into
masterfrom
check-in-after-boot
Oct 26, 2026
Merged

ivmarkov merged 1 commit into
masterfrom
check-in-after-boot

Conversation

@ivmarkov

@ivmarkov ivmarkov commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Also, port the SIT and LIT tests from rs-matter-embassy

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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(...) plus configure_sed/run_icd so 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) and temp_sensor_battery_thread (LIT, deep sleep) examples, with supporting Cargo.toml/README.md/CHANGELOG.md entries.
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

@ivmarkov
ivmarkov merged commit 8ca81d4 into master Oct 26, 2026
6 checks passed
@ivmarkov
ivmarkov deleted the check-in-after-boot branch November 2, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants