Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rgbw,dimming light and water sensor #724

Merged
merged 9 commits into from
Mar 28, 2024

Conversation

sengled-gezhu
Copy link
Contributor

Add three Sengled zigbee devices:

  1. Add Sengled water leak sensor E1L-G7K
    Add the init.lua file to the path ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-water-leak-sensor\src\sengled.
    Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-water-leak-sensor\fingerprints.yml file, a new device type E1L-G7K is added.
  2. Add Sengled zigbee rgbw bulb E23-N13.
    Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-switch\src\rgbw-bulb\init.lua file, a new device type E23-N13 is added.
    Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-switch\fingerprints.yml file, a new device type E23-N13 is added.
  3. Add Sengled dimming light bulb E23-N11.
    Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-switch\src\zigbee-dimming-light\init.lua file, a new device type E23-N11 is added.
    Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-switch\fingerprints.yml file, a new device type E23-N11 is added.

@CLAassistant
Copy link

CLAassistant commented May 12, 2023

CLA assistant check
All committers have signed the CLA.

@lelandblue lelandblue requested a review from greens May 16, 2023 14:40
@github-actions
Copy link

github-actions bot commented May 16, 2023

Channel deleted.

@github-actions
Copy link

github-actions bot commented May 16, 2023

Unit Test Results

     50 files     323 suites   0s ⏱️
1 518 tests 1 518 ✔️ 0 💤 0
2 608 runs  2 608 ✔️ 0 💤 0

Results for commit 0004e19.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 16, 2023

zigbee-switch_coverage.xml

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/enbrighten-metering-dimmer/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/init.lua 72%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/multi-switch-no-master/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/aurora-relay/init.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/ge-link-bulb/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/version/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/jasco/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/preferences.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara-light/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/wallhero/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-metering-plug-power-consumption-report/init.lua 74%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/vimar/init.lua 70%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/init.lua 86%

zigbee-water-leak-sensor_coverage.xml

File Coverage
All files 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/enbrighten-metering-dimmer/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/init.lua 72%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/multi-switch-no-master/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/aurora-relay/init.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/ge-link-bulb/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/version/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/jasco/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/preferences.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara-light/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/wallhero/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-metering-plug-power-consumption-report/init.lua 74%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/vimar/init.lua 70%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/init.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/frient/init.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-water-leak-sensor/src/thirdreality/init.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against c1f2936

Copy link
Contributor

@greens greens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to require the new sub-driver in the base driver or the code will not be loaded: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/SmartThings/zigbee-water-leak-sensor/src/init.lua#L55

@sengled-gezhu
Copy link
Contributor Author

Add Sengled water leak sensor E1L-G7K

  1. Modified ~\SmartThingsEdgeDrivers\drivers\SmartThings\zigbee-water-leak-sensor\src\init.lua file, sub-driver named "sengled" is added.

@sengled-gezhu
Copy link
Contributor Author

sengled-gezhu commented May 18, 2023 via email

@sengled-gezhu
Copy link
Contributor Author

sengled-gezhu commented May 18, 2023 via email

@lelandblue
Copy link
Contributor

lelandblue commented Sep 8, 2023

Hello @sengled-gezhu

Can you please resolve the conflicts on this PR and also sign the CLA?

Also - We need you to write tests for the additional code that your adding.

Thank you for making these improvements so this can progress forward.

@sengled-gezhu
Copy link
Contributor Author

sengled-gezhu commented Sep 9, 2023 via email

@lelandblue
Copy link
Contributor

Thank you. Please also provide unit tests that cover the changes that your looking to add. We require that tests be provided of the new code that is being contributed. Please this page for more information. https://developer.smartthings.com/docs/devices/hub-connected/test-your-driver

@lelandblue
Copy link
Contributor

Hello @sengled-gezhu In order for this to proceed we need you to add unit test coverage for the changes that your proposing in the init file. Test coverage is in the form of adding unit tests, in a .test file in a new commit on the PR. This is similar to the discussion we have been having with PR : 716.

Thank you for your communication.

@sengled-gezhu
Copy link
Contributor Author

1.For rgbw and dimming light, We did not add a subdirectory driver, so we can simply follow the default process for authentication.
2.For water leak sensor device, we have added a. text file to the test directory.

@sengled-gezhu
Copy link
Contributor Author

sengled-gezhu commented Nov 6, 2023 via email

Copy link

github-actions bot commented Nov 6, 2023

Test Results

     54 files     347 suites   0s ⏱️
1 622 tests 1 622 ✔️ 0 💤 0
2 851 runs  2 851 ✔️ 0 💤 0

Results for commit 3c6cc74.

♻️ This comment has been updated with latest results.

@lelandblue
Copy link
Contributor

Hello @sengled-gezhu Please see the recent comments on this PR, thank you.

@sengled-gezhu
Copy link
Contributor Author

Hello @lelandblue,
Is there any problem with the certification of Sengled's lights and water leak sensor? Do you need me to do anything?

@lelandblue
Copy link
Contributor

lelandblue commented Nov 8, 2023

Yes @sengled-gezhu. You need to provide a profile name in the fingerprint file for the sengled/E23-N11 device. As it is written today, this device would not work when levering your changes. I have left a review and mentioned to you in that line where the code change needs to occur.

We cannot proceed with out that change.

@sengled-gezhu
Copy link
Contributor Author

Hello @lelandblue,
In the ...drivers\SmartThings\zigbee-switch\fingerprints.yml file, we have added the profile names for our dimming-light, where E23-N11 is the dimming-light, as follows:

  • id: "sengled/E23-N11"
    deviceLabel: Sengled Light par38
    manufacturer: sengled
    model: E23-N11
    deviceProfileName: on-off-level

local PowerConfiguration = clusters.PowerConfiguration

local FINGERPRINTS = {
{ mfr = "SENGLED", model = "E1L-G7K" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ mfr = "SENGLED", model = "E1L-G7K" }
{ mfr = "sengled", model = "E1L-G7K" }

Your tests are failing here because the capitalization does not match.

I'd also like to point out that you could have avoided a subdriver entirely here by just adding the relevant info to this file: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/SmartThings/zigbee-water-leak-sensor/src/configurations.lua

If you feel that a 5 minute maximum reporting interval for your sensor is necessary and won't negatively impact your battery life too much, though, you can continue to use this sub-driver.

@sengled-gezhu
Copy link
Contributor Author

Hello, @greens,
We have updated the [drivers/SmartThings/zigbee-water-leak-sensor/src/sengled/init.lua] file content, as follows:
{ mfr = "sengled", model = "E1L-G7K" }

@sengled-gezhu
Copy link
Contributor Author

sengled-gezhu commented Nov 10, 2023 via email

@lelandblue lelandblue merged commit 18116b2 into SmartThingsCommunity:main Mar 28, 2024
10 checks passed
yejinze pushed a commit to yejinze/SmartThingsEdgeDrivers that referenced this pull request Apr 7, 2024
* add rgbw,dimming light and water sensor

* modify init.lua

* add a .text file for sengled water leak sensor.

* Update drivers/SmartThings/zigbee-water-leak-sensor/src/sengled/init.lua

Co-authored-by: Steven Green <[email protected]>

* Update drivers/SmartThings/zigbee-water-leak-sensor/src/init.lua

Co-authored-by: Steven Green <[email protected]>

* add profile name for E23-N11

* add zigbee-water leak sensor

---------

Co-authored-by: lelandblue <[email protected]>
Co-authored-by: Steven Green <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants