Repository navigation
Conversation
…file - Introduce subdriver for Schlage Sense Pro (Aliro) door lock with UWB support - Add lock-modular-uwb-settings profile supporting lockUwbApproachSettings and lockUwbModeSettings - Implement scaffold for Matter Manufacturer-Specific Cluster communication - Link subdriver lifecycle and modular profile matching in matter-lock - Add unit and integration tests covering subdriver matcher, lifecycle, commands, and attribute reports
|
Duplicate profile check: Warning - duplicate profiles detected. |
|
Profile category check: ✅ Passed - all profiles have a category defined. |
|
matter-lock_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 34b47b7 |
Test Results 73 files 546 suites 0s ⏱️ Results for commit 34b47b7. ♻️ This comment has been updated with latest results. |
- In schlage-sense-pro device_init, automatically upgrade previously onboarded locks missing lockUwbApproachSettings to lock-modular-uwb-settings - In match_profile_modular, check supports_capability_by_id for lockUwbApproachSettings - In can_handle, support hybrid matching on Vendor ID alongside Product ID or custom cluster - Clean up comment references to match lock-modular-uwb-settings profile name - Add unit test covering device_init migration on driver update
- Revert changes to src/init.lua, keeping the base driver completely generic - Move all profiling, doConfigure shadowing, and battery/feature attribute handling into schlage-sense-pro subdriver - Follows the self-contained subdriver architecture from matter-sensor and matter-switch - Verify all 177 matter-lock unit tests pass
Sharing match_profile_modular avoids a second profile and keeps battery, unlatch, and capability-change checks on one path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@hcarter-775 Thanks again for the review. The comments are addressed in 34b47b7, and the threads are resolved. Could you take another look when you have a chance? |
| } | ||
|
|
||
| ------------------------------------------------------------------------------------- | ||
| -- Fallback Capability Builders (Pre-27R1 Compatibility) |
There was a problem hiding this comment.
We shouldn't actually need this stuff below, I don't think. The capability definitions themselves are not dependent on any R1 stuff, and are available in this exact state already, today. I'd suggest removing this for ease of understanding, since it's not needed.
| --- 1. Confluence: "Schlage Sense Pro (Aliro) - UWB Configuration and Feature Support" (Page 5350097136) | ||
| --- 2. Confluence: "Action plan for Schlage UWB configuration" (Page 5392597723) |
There was a problem hiding this comment.
I recommend we remove the confluence documents, since this is a customer-facing repo
| --- | ||
| --- Supports both initial onboarding and OTA driver updates for previously onboarded locks. |
There was a problem hiding this comment.
remove this line? Seems unclear what it is describing to me
| local function match_profile(driver, device, ignore_static_profiling) | ||
| if profiling_data_still_required(device) then return end | ||
| if version.api >= 15 and version.rpc >= 9 then | ||
| match_profile_modular(driver, device) | ||
| elseif ignore_static_profiling ~= true then | ||
| match_profile_switch(driver, device) | ||
| end | ||
| device_configuration.match_profile(driver, device, ignore_static_profiling) |
There was a problem hiding this comment.
nit: since you're just calling match_profile in match_profile, maybe we should just explicitly put this call (device_configuration.match_profile) in the locations currently calling match_profile? Btw, thanks for cleaning this up!
| --- Register extra optional capabilities contributed by a subdriver. | ||
| --- The provider is called with the device and returns a list of capability ids, or nil. | ||
| --- @param provider fun(device: Device): string[]|nil | ||
| function device_configuration.register_optional_capabilities(provider) |
There was a problem hiding this comment.
I'm not sure this special handling that always adds the Schlage capabilities is actually being processed anymore? Could you double check this works as you expect, given my recent suggestions about cleaning up the match_profile logic?
Check all that apply
Type of Change
Checklist
Description of Change
This PR adds the Schlage Sense Pro (Aliro) UWB settings subdriver.
lockUwbApproachSettingsandlockUwbModeSettingsare optional capabilities on the existinglock-modularandlock-modular-embedded-unlatchprofiles. The Schlage fingerprint stays onlock-modular.Modular profiling lives in
device_configuration.luaand is shared with the base driver, including the battery field, unlatch profile, and optional-capability change guard. The subdriver registers the two UWB capabilities for Allegion vendor0x1236/ product0x3800(or the custom UWB cluster). Previously onboarded locks pick up the capabilities on init when either one is missing.Cluster reads and writes live in
schlage_utils.lua. If neither the custom cluster nor DoorLock is present, the endpoint lookup returns nil and the write is skipped.Summary of Completed Tests
python3 tools/run_driver_tests.py -vv -f "matter-lock": 178/178 passedluacheck --config .github/workflows/.luacheckrcon the modified Lua files: 0 warnings / 0 errors