SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
269 stars 463 forks source link

Fixed known issues with Aqara Door and Window Sensor T1 and Aqara Wat… #1611

Open Hongming6 opened 2 months ago

Hongming6 commented 2 months ago

…er Leak Sensor

Check all that apply

Type of Change

Checklist

Description of Change

Summary of Completed Tests

github-actions[bot] commented 2 months ago

Invitation URL: https://bestow-regional.api.smartthings.com/invite/r3Myd9RA59jp

github-actions[bot] commented 2 months ago

Test Results

   61 files    378 suites   0s :stopwatch: 1 851 tests 1 851 :white_check_mark: 0 :zzz: 0 :x: 3 207 runs  3 207 :white_check_mark: 0 :zzz: 0 :x:

Results for commit f8872308.

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

github-actions[bot] commented 2 months ago

zigbee-contact_coverage.xml

File Coverage
All files 98% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/init.lua 98% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/smartsense-multi/init.lua 95% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/multi-sensor/init.lua 97% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/aqara/init.lua 91% :white_check_mark:

zigbee-water-leak-sensor_coverage.xml

File Coverage
All files 97% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/init.lua 98% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/smartsense-multi/init.lua 95% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/multi-sensor/init.lua 97% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/aqara/init.lua 91% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/aqara/init.lua 91% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/thirdreality/init.lua 95% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/frient/init.lua 86% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/init.lua 96% :white_check_mark:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against f88723083843ef921403f6a78f9aaea58abe46a3

Hongming6 commented 2 months ago

Lua Script Modification for Aqara Door and Window Sensor T1 and Aqara Water Sensor

Hello everyone! This PR contains a Lua script modification addressing issues with the Aqara Door and Window Sensor T1 and Aqara Water Sensor, reported by an online user.

Issue Background

Many Korean users reported that the device is often offline. After investigating and capturing the gateway LOG, we found that the offline state is caused by another reason. We also found out that the scripts we wrote sometimes execute the relevant handles of src/init.lua even if the device does not support the necessary cluster/attribute configuration. This led to issues such as “UNSUPPORTED_ATTRIBUTE (PowerConfiguration cluster)/UNREPORTABLE_ATTRIBUTE (IAS region cluster)” in the gateway logs.

The user's message log and gateway LOG:

I received feedback from a Korean user stating that their Aqara door sensor always goes 'offline' after reboarding. When I checked their hub log, I observed the sensor responding with 'UNSUPPORTED_ATTRIBUTE (PowerConfiguration cluster)/UNREPORTABLE_ATTRIBUTE (IAS zone cluster)'.

LOG.txt

Reason and Explanation for Modification

  1. The key component of the driver is the zigbee_water_driver_template in src/init.lua. Fingerprint matching will download and execute the driver's init/added handlers.
  2. The subdriver under Aqara only defines init and added handlers, so it reuses the handlers in src/init.lua except for the init/added parts.
  3. Capabilities also include default handlers defined in lua_lib, not in src/init.lua. When utilizing capabilities, if we do not define their handlers, the default handlers will be executed.

PR Changes

  1. Block filtering Cluster/attribute configurations not supported by the device and manually issue IAS/enrolled commands.
  2. Remove the code configuring the private attribute 0009 as the flood device does not support it.

If you have any questions or encounter issues with the code changes, please leave a comment below. Thank you!

lelandblue commented 1 month ago

Is this pull request still needed?

Hongming6 commented 1 month ago

Is this pull request still needed?

This PR needs to be retained and is currently being analyzed by Samsung Korea colleagues.