Skip to content

Matter Thermostat: Fix issues found during testing #2099

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented Apr 28, 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

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

This PR addresses three issues found during testing with an air purifier device:

  • Add an optional argument to component_to_endpoint to specify a cluster ID. The previous implementation checked for the presence of airPurifierFanMode within this function, which fails to account for situations where a device supports both the FanControl and Thermostat clusters on different endpoints.
  • Remove thermostatOperatingState from a profile that is not supposed to include it
  • Implement handling for the resetFilter capability command

Summary of Completed Tests

Tested on air purifier device

Copy link

Copy link

github-actions bot commented Apr 28, 2025

Test Results

   66 files    426 suites   0s ⏱️
2 176 tests 2 176 ✅ 0 💤 0 ❌
3 722 runs  3 722 ✅ 0 💤 0 ❌

Results for commit 57ed44b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 28, 2025

File Coverage
All files 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 87%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/embedded-cluster-utils.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 57ed44b

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

@nickolas-deboom nickolas-deboom force-pushed the fix/matter-thermostat-component-to-endpoint-mapping-improvement branch 2 times, most recently from 69c96a8 to 4167e8c Compare April 30, 2025 16:12
@hcarter-775
Copy link
Contributor

Have you tested this on older FW? Also, since the changes to filterStatus are 1.4 changes, we need to change the lowest allowed lua libs version from the 1.2 release to the 1.4 release version.

@nickolas-deboom
Copy link
Contributor Author

Have you tested this on older FW? Also, since the changes to filterStatus are 1.4 changes, we need to change the lowest allowed lua libs version from the 1.2 release to the 1.4 release version.

I added test cases to cover lua libs API < 10, which allows the embedded clusters to be utilized. Also as discussed the filter reset command change was on the capabilities side rather than in the spec.

Add an optional argument to component_to_endpoint to specify a cluster
ID. The previous implementation checked for the presence of airPurifierFanMode
within this function, which fails to account for situations where a
device supports both the FanControl and Thermostat clusters on different
endpoints.
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-thermostat-component-to-endpoint-mapping-improvement branch from f00fbac to 57ed44b Compare May 8, 2025 19:31
@@ -35,14 +35,6 @@ components:
version: 1
- id: tvocHealthConcern
version: 1
- id: thermostatOperatingState
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this meant to be included in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

we could pull it into a separate one, but yes, this is also part of the improvements found by testing the same device

@@ -1686,6 +1681,15 @@ local function set_water_heater_mode(driver, device, cmd)
end
end

local function reset_filter_state(driver, device, cmd)
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding this handler is a good idea, but is this meant to be included in this PR or a separate PR? I would either move this to it's own PR or make it clear in the PR description/title that this PR is doing more than just improving component-to-endpoint mapping.

Similar to the thermostat operating state being removed from the profile above.

Copy link
Contributor Author

@nickolas-deboom nickolas-deboom May 8, 2025

Choose a reason for hiding this comment

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

I will update the title & description, this PR was meant to address all of the issues found during testing.

@nickolas-deboom nickolas-deboom changed the title Improve Matter Thermostat component to endpoint mapping Matter Thermostat: Fix issues found during testing May 8, 2025
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.

3 participants