SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
269 stars 463 forks source link

Add batteryLevel capability to the matter lock driver #1608

Closed hcarter-775 closed 2 months ago

hcarter-775 commented 3 months ago

Check all that apply

Type of Change

Checklist

Description of Change Jira Ticket: https://smartthings.atlassian.net/browse/CHAD-13915

batteryLevel is a capability that was added for Matter 1.2, and is useful for cases where the BatPercentRemaining attribute of the PowerSource cluster does not exist, but the BatChargeLevel attribute does.

Summary of Completed Tests

A real-life device example: https://smartthings.atlassian.net/browse/WWSTCERT-3507

github-actions[bot] commented 3 months ago

Duplicate profile check: Passed - no duplicate profiles detected.

github-actions[bot] commented 3 months ago

Channel deleted.

github-actions[bot] commented 3 months ago

Test Results

   61 files    379 suites   0s :stopwatch: 1 852 tests 1 852 :white_check_mark: 0 :zzz: 0 :x: 3 208 runs  3 208 :white_check_mark: 0 :zzz: 0 :x:

Results for commit fce33335.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 3 months ago

File Coverage
All files 93% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/aqara-lock/init.lua 96% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 92% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lock_utils.lua 97% :white_check_mark:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against fce33335c033ab33ff1ae6e7d4874dab71479c4b

nickolas-deboom commented 2 months ago

These changes look good to me except I don't see logic in the driver that would cause a device to join the new profiles based on its supported capabilities - I'm just wondering how the new profiles would get selected?

hcarter-775 commented 2 months ago

These changes look good to me except I don't see logic in the driver that would cause a device to join the new profiles based on its supported capabilities - I'm just wondering how the new profiles would get selected?

@nickolas-deboom yeah, right now there's not really any complex configuration logic in matter-lock, so the only way that most profiles in this driver (the new ones included) can be used is with manual WWST fingerprinting. There is some action item open about redoing this logic but for now, that's what we have.

For example, the WWST device that tested with these changes was fingerprinted with one of the new profiles.

hcarter-775 commented 2 months ago

LGTM! Is there a ticket for the eventual dynamic configuration of battLev devices?

Yes, there is. See this ticket. It's pretty barebones but it's on the docket.