Skip to content

Add Schlage Sense Pro UWB settings on modular lock profiles - #3303

Open
Kwang-Hui wants to merge 7 commits into
SmartThingsCommunity:mainfrom
Kwang-Hui:feature/schlage-sense-pro-uwb
Open

Kwang-Hui wants to merge 7 commits into
SmartThingsCommunity:mainfrom
Kwang-Hui:feature/schlage-sense-pro-uwb

Conversation

@Kwang-Hui

@Kwang-Hui Kwang-Hui commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

This PR adds the Schlage Sense Pro (Aliro) UWB settings subdriver.

lockUwbApproachSettings and lockUwbModeSettings are optional capabilities on the existing lock-modular and lock-modular-embedded-unlatch profiles. The Schlage fingerprint stays on lock-modular. The driver uses the published capability definitions directly.

Modular profiling lives in device_configuration.lua and 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 vendor 0x1236 / product 0x3800 (or the custom UWB cluster). Previously onboarded locks pick up the capabilities on init when either one is missing. The base driver calls device_configuration.match_profile directly.

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 passed before the embedded capability schemas were removed from the test. The test now uses the capability definitions fetched for the run.
  • luacheck --config .github/workflows/.luacheckrc on the modified Lua files: 0 warnings / 0 errors

…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
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Duplicate profile check: Warning - duplicate profiles detected.
lock-modular-embedded-unlatch.yml == lock-modular.yml

@github-actions

Copy link
Copy Markdown

Profile category check: ✅ Passed - all profiles have a category defined.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

matter-lock_coverage.xml

File Coverage
All files 90% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 90% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lock_utils.lua 89% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/device_configuration.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/schlage-sense-pro/can_handle.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/unmigrated-matter-lock/init.lua 92% ✅

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 9718d88

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Test Results

   73 files    546 suites   0s ⏱️
3 318 tests 3 317 ✅ 0 💤 0 ❌ 1 🔥
5 318 runs  5 317 ✅ 0 💤 0 ❌ 1 🔥

For more details on these errors, see this check.

Results for commit 9718d88.

♻️ 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>
@Kwang-Hui Kwang-Hui changed the title Add Schlage Sense Pro UWB subdriver and lock-modular-uwb-settings profile Add Schlage Sense Pro UWB settings on modular lock profiles Oct 28, 2026
@Kwang-Hui

Copy link
Copy Markdown
Contributor Author

@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?

Kwang-Hui and others added 2 commits November 2, 2026 11:29
…rectly

Removes the local capability fallback and calls device_configuration.match_profile from each profiling site. The Schlage optional capabilities are still applied inside that shared match.

Co-authored-by: Cursor <cursoragent@cursor.com>
The test harness loads the published definitions, so a second copy in the test is unnecessary.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants