Skip to content

Matter Switch: Add subdriver for Third Reality MK1 #2109

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented May 1, 2025

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

Description of Change

Add new profile and a subdriver to support the Third Reality keyboard, which contains 12 matter-enabled buttons.

Summary of Testing

Tested on device and with new unit tests.

Copy link

github-actions bot commented May 1, 2025

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

github-actions bot commented May 1, 2025

Channel deleted.

Copy link

github-actions bot commented May 1, 2025

Test Results

   66 files    427 suites   0s ⏱️
2 186 tests 2 186 ✅ 0 💤 0 ❌
3 734 runs  3 734 ✅ 0 💤 0 ❌

Results for commit d1f994d.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 1, 2025

File Coverage
All files 92%
/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/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded-cluster-utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/third-reality-mk1/init.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against d1f994d

@nickolas-deboom nickolas-deboom changed the title Matter Switch: Add 13 button profile Matter Switch: Add subdriver for 12 button device May 1, 2025
@nickolas-deboom nickolas-deboom changed the title Matter Switch: Add subdriver for 12 button device Matter Switch: Add subdriver for 12 button keyboard May 1, 2025
@ldeora
Copy link

ldeora commented May 1, 2025

Is there a reason why the profiles for 9, 10 and 11 buttons are intentionally omitted? A device like the 3rd Reality MK1 Keyboard would work out of the box with these profiles. The device and the platform are Matter certified after all...

@nickolas-deboom
Copy link
Contributor Author

Is there a reason why the profiles for 9, 10 and 11 buttons are intentionally omitted? A device like the 3rd Reality MK1 Keyboard would work out of the box with these profiles. The device and the platform are Matter certified after all...

This PR is specifically meant for supporting the 3rd Reality MK1.

@nickolas-deboom nickolas-deboom changed the title Matter Switch: Add subdriver for 12 button keyboard Matter Switch: Add subdriver for Third Reality MK1 May 1, 2025
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch 3 times, most recently from 7a822d1 to ccbdbbd Compare May 1, 2025 17:52
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch 2 times, most recently from 52e5174 to bc937cc Compare May 8, 2025 15:35
@nickolas-deboom nickolas-deboom changed the base branch from main to matter-switch-update-field-names May 8, 2025 15:35
@nickolas-deboom nickolas-deboom requested a review from ctowns May 8, 2025 15:36
@nickolas-deboom nickolas-deboom force-pushed the matter-switch-update-field-names branch 2 times, most recently from 49ba419 to ea07e1b Compare May 9, 2025 18:37
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch from ac5d0a0 to 02b2f8a Compare May 9, 2025 18:40
@nickolas-deboom nickolas-deboom force-pushed the matter-switch-update-field-names branch from ea07e1b to 653030b Compare May 9, 2025 18:47
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch from 02b2f8a to 07b6e65 Compare May 12, 2025 20:13
@nickolas-deboom nickolas-deboom force-pushed the matter-switch-update-field-names branch from 653030b to ea1236c Compare May 13, 2025 15:40
Base automatically changed from matter-switch-update-field-names to main May 13, 2025 15:48
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch 2 times, most recently from 2e69acd to 064c7a6 Compare May 13, 2025 18:40
Copy link
Contributor

@hcarter-775 hcarter-775 left a comment

Choose a reason for hiding this comment

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

left a comment about simplifying added, otherwise this looks good to go imo since it's been thoroughly tested.

@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch from 0845feb to da87d06 Compare May 14, 2025 16:18
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch from 51595c4 to 26ccc71 Compare May 14, 2025 16:39
Add new profile and a subdriver to support the Third Reality keyboard, which contains 12 matter-enabled buttons.
@nickolas-deboom nickolas-deboom force-pushed the add-new-button-profile branch from 26ccc71 to d1f994d Compare May 14, 2025 16:40
@nickolas-deboom nickolas-deboom merged commit 1910944 into main May 14, 2025
12 checks passed
@nickolas-deboom nickolas-deboom deleted the add-new-button-profile branch May 14, 2025 16:44
end

-- override subscribe function to prevent subscribing to additional events from the main driver
local function subscribe(device)
Copy link
Contributor

@hcarter-775 hcarter-775 May 14, 2025

Choose a reason for hiding this comment

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

was this required? The main driver's subscribe handling will do the same thing, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

The only reason this would be important would be in the case that the FW for this device updates to handle more robust button presses and will necessitate changes in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's true.

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.

4 participants