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

New Device (Matter Switch) Shin Dong A ES productId: 0x1000 #1872

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lelandblue
Copy link
Contributor

@lelandblue lelandblue commented Jan 14, 2025

Type of Change

  • [ X ] WWST Certification Request
  • Bug fix
  • New feature
  • Refactor

Checklist

  • [ X ] 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

The purpose of this PR is to add a device to SmartThings for WWST Certification.

Summary of Completed Tests

Further testing is planned as part of the WWST Process
Link to CSA site on the Product.

The device is for a Shing Dong-A ES device that has multiple endpoints.
VID: 0x156B
PID: 0x1000
Matter Device Type according to the CSA (103)

The changes I made include adding the fingerprint and also adding an override for end point 2 on the device so it shows up as a "switch" instead of a "plug".

Adding an override, so that end point 2 on the device uses switch-binary and does not use plug-binary
Copy link

Copy link

github-actions bot commented Jan 14, 2025

File Coverage
All files 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/aqara-cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded-cluster-utils.lua 38%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 2e18057

Copy link

github-actions bot commented Jan 14, 2025

Test Results

   64 files  ±0    404 suites  ±0   0s ⏱️ ±0s
2 009 tests ±0  2 009 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 471 runs  ±0  3 471 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2e18057. ± Comparison against base commit ad6cc1c.

♻️ This comment has been updated with latest results.

@@ -153,6 +153,7 @@ local device_type_attribute_map = {
local child_device_profile_overrides = {
{ vendor_id = 0x1321, product_id = 0x000C, child_profile = "switch-binary" },
{ vendor_id = 0x1321, product_id = 0x000D, child_profile = "switch-binary" },
{ vendor_id = 0x156B, product_id = 0x1000, child_profile = "switch-binary" }, -- Shin Dong-A ES Smart Switch
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might override the profile for every child device, including endpoints 3-6 which should use a color temperature light profile

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah you are right, for some reason I thought this was only for overriding switch vs plug, but you're right this would apply to all the child devices.

We could make it so it just applies to the switch/plug types though as I think that is the only situation where this would be used. Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah makes sense! Should that be in a separate PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah we can put it in a separate PR in case it needs to be used by another device before this one completes cert (unlikely, but might as well)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok that sounds good, I'll put something together!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Depending on the deployment of that change too, we may need to update this PR to be rebased so that the partner can also get that experience as well

We are asking them to test with this driver sharing link, so it would b best to have that in there too

Thanks @ctowns and @nickolas-deboom

Copy link
Contributor

Choose a reason for hiding this comment

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

I made a PR to address this here: #1874

Copy link
Contributor

Choose a reason for hiding this comment

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

#1874 has been merged

Copy link

Choose a reason for hiding this comment

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

I don't know if I should post this here, but [email protected] says that support requests are no longer be monitored.
I checked out what you discussed and I think the profile we initially set up makes more sense.
The reason for this is that the switch directly controls the lights and plugs through relays inside the switch, not the IoT lights and plugs.
So Endpoints 1 and 2 are better labeled as plugs.
Also, Endpoints 3 through 6 can be viewed as lights.
This is because the switch directly controls the dimming and color temperature of the lights.
Please review again.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case it sounds like we can remove this device from the child_device_profile_overrides list and change the fingerprint to "plug-binary" instead of "switch-binary". That way the first endpoint will join as a plug and the remaining end points will have child devices created based on their device type. cc @lelandblue @ctowns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants