fix(matter): resume Apple Home status after restart - #4
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughMatter firmware now enables persisted subscriptions and subscription-timeout resumption. The build workflow verifies the generated CHIP setting. Startup logging reports whether persistence is enabled and warns about controller state after restarts when it is disabled. ChangesMatter subscription persistence
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change enables Matter subscription persistence and verifies the effective firmware setting, improving status recovery after restart; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What changed
Why
Apple Home watches the lock through a Matter subscription. Without a persisted subscription, a reboot discards it and Apple Home can remain on “Updating…” or “No Response” until it rediscovers the accessory and subscribes again.
The earlier attempt used
CONFIG_CHIP_PERSIST_SUBSCRIPTIONS, which is not a Kconfig symbol. ESP-IDF only warned and ignored it. The supported ESP32 symbol isCONFIG_ENABLE_PERSIST_SUBSCRIPTIONS; the CHIP component maps it tochip_persist_subscriptions = true. connectedhomeip also derives timeout-resumption retries from that argument, which matters because this firmware starts Matter before application-controlled Wi-Fi is connected.Impact
After a restart or temporary network loss, the device can resume Apple Home’s stored Matter subscription instead of waiting for the controller to rebuild it. A device that remains physically powered off still becomes unreachable according to the controller’s normal timeout; firmware cannot report while unpowered.
Validation
./tools/check_consistency.py— 0 problems, 0 notesgit diff --check upstream/main...HEADbuild/esp-idf/chip/args.gncontainschip_persist_subscriptions = trueA full Matter build was not run locally because ESP-IDF is unavailable; the GitHub Matter workflow contains the effective-build guard.
Summary by CodeRabbit
New Features
Bug Fixes
Tests