Skip to content

[Aqara] Aqara Dual Relay Module T2 - #3146

Open
seojune79 wants to merge 6 commits into
SmartThingsCommunity:mainfrom
seojune79:Aqara-Dual-Relay-Module-T2
Open

[Aqara] Aqara Dual Relay Module T2#3146
seojune79 wants to merge 6 commits into
SmartThingsCommunity:mainfrom
seojune79:Aqara-Dual-Relay-Module-T2

Conversation

@seojune79

@seojune79 seojune79 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • 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

Summary of Completed Tests

@github-actions

Copy link
Copy Markdown

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

zigbee-switch_coverage.xml

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/frient/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/laisiao/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/configurations/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/firstled-io/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/color_temp_range_handlers/init.lua 71%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/preferences.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/frient-IO/init.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/frient-IO/unbind_request.lua 71%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/inovelli/vzm30-sn/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/inovelli/vzm32-sn/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/inovelli/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/tuya-multi/can_handle.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara-light/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zll-polling/init.lua 81%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/version/init.lua 94%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 6d0eb03

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Test Results

   73 files    541 suites   0s ⏱️
3 258 tests 3 258 ✅ 0 💤 0 ❌
5 247 runs  5 247 ✅ 0 💤 0 ❌

Results for commit 6d0eb03.

♻️ This comment has been updated with latest results.

Comment thread drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/init.lua Outdated
Comment thread drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/init.lua
Comment thread drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/fingerprints.lua Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should include the firmwareUpdate capability like the other device profiles do. This allows the device FW version to be displayed to the user in the app.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since this device does not support firmware updates in the SmartThings environment, I have removed the firmwareUpdate capability from the device profile as suggested by Samsung.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the device supports reporting its firmware version, I think we should still have it (which pretty much all zigbee devices do support).

Comment thread drivers/SmartThings/zigbee-switch/profiles/aqara-dual-relay-module-unified.yml Outdated
data_type = data_types.Uint8,
value_map = { rocker = 0x01, rebound = 0x02 },
},
-- External switch wiring type (same attribute as stse.electricSwitchType, with an extra "nc"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this needed? Can we add the nc variant t othe existing electricSwitchType preference?

Since they map to the same attribute, this could get confusing in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we add the 'nc' variant to the existing electricSwitchType preference, I am wondering if there will be any impact or side effects on devices that previously did not support the 'nc' variant.
I would appreciate it if you could share your thoughts on whether this might cause any issues regarding backward compatibility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your concern is valid; adding the variant to the preference will expose it for all devices that have the preference even if they do not support it. IMO this is probably okay, but would depend on how existing devices that do not support it handle the nc option being set in the attribute write. If the attribute write is rejected and it is essentially a no-op (what I would expect), then we can just add text in the preference definition that the option may not be supported.

IMO, we should combine them, but I am curious if @hcarter-775 or @tpmanley have any thoughts

Comment thread drivers/SmartThings/zigbee-switch/src/aqara/init.lua Outdated
local SUPPORTED_INTERLOCK = { "normal", "interlock" }
local COMPONENT_DEVICE_MODE = "devicemode"
-- Relay working modes mapped to their raw device values. dry_contact_open_pulse_mode (raw 2) is
-- intentionally not exposed; the remaining modes keep their original device values (on_off stays 3).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the reason for not exposing this? The mode capability can take arbitrary strings, so it could be represented.

If a device reports this mode, the driver silently drops it, and then the device state is no longer correct; this seems misleading to the user. Although I am not sure I fully understand these modes, so perhaps I am wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Mode support varies depending on the device using this driver, which is why I separated them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will some devices report dry_contact_open_pulse_mode?

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Profile category check: ✅ Passed - all profiles have a category defined.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants