SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
268 stars 453 forks source link

Add a matter-lock driver for Aqara #1413

Closed HunsupJung closed 4 months ago

HunsupJung commented 5 months ago

As a result of testing the U200 actual device, power source cluster is not supported. this patch removes battery capability. And in the case of Matter door lock, lockAlarm capability will be used instead of tamperAlert capability, so that part has been applied.

github-actions[bot] commented 5 months ago

Channel deleted.

github-actions[bot] commented 5 months ago

Test Results

   59 files    375 suites   0s :stopwatch: 1 807 tests 1 795 :white_check_mark: 0 :zzz: 0 :x: 12 :fire: 3 129 runs  3 117 :white_check_mark: 0 :zzz: 0 :x: 12 :fire:

For more details on these errors, see this check.

Results for commit d0a77c93.

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

github-actions[bot] commented 5 months ago

File Coverage
All files 74% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 71% :x:
/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 d0a77c936e3ea9e7dfbf99220f3f0fa63051754b

ctowns commented 5 months ago

Also it looks like many unit tests are failing because of the new do_configure function. You will need to update these unit tests to account for the change to separate the device_added and do_configure function.

github-actions[bot] commented 5 months ago

Duplicate profile check: Passed - no duplicate profiles detected.

HunsupJung commented 5 months ago

@ctowns Thank you for your review. If DoorLock supports COTA, base-lock with Lock Codes is used, and U200 supports COTA, so I was worried. As you said, I created a sub driver for Aqara product and updated it to include appropriate capabilities.

ctowns commented 5 months ago

@HunsupJung I think we can move all of this functionality to the base driver without needing a sub driver, so I have made that change in the latest commit.

However, on testing this, I see that there is no capability presentation for the lockAlarm capability even though the device is using a profile with the lockAlarm capability. I am using the latest R2 app and I am in developer mode. Is this expected?

Previously, the tamperAlert capability would be visible on the device card and would indicate that there was an alarm on the lock. However, the lockAlarm does not seem to have a presentation. Is plugin work for this capability complete?

I believe this is the ticket for the plugin work, and it is listed as "Not Started" - can you confirm? https://smartthings.atlassian.net/browse/REQ-14908

HunsupJung commented 4 months ago

@ctowns Thank you so much for your review. 👍 You're right. lockAlarm has no presentation. Instead, we will provide notification to users through it.

HunsupJung commented 4 months ago

@tpmanley , @ctowns Thank you so much for your review~! 👍