Skip to content

Conversation

hcarter-775
Copy link
Contributor

@hcarter-775 hcarter-775 commented Aug 18, 2025

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

Gate pre-0.58 logic for modular profiling. It is confirmed that these versions have been bumped in 0.58.

Summary of Completed Tests

Test Devices Used: VDA versions of all affected device types (Air Quality Sensor, Air Purifier, Thermostat, and Room Air Conditioner)

Tests Completed:

  1. For each of the above device types, when run on the 0.58.x Hub firmware it was confirmed through logs that the proper subscriptions were handled for each device's particular capability-attribute mapping. Further, extra debug logic was included to ensure the proper profile was directly being serialized into lua.
  2. Testing with the AP and AQS VDA, when run on the released 0.57 Hub firmware, it was confirmed through subscription logs that when moving from the previous production driver to this change, the correct subscription continues to hold.

Copy link

Copy link

github-actions bot commented Aug 18, 2025

Test Results

   69 files    449 suites   0s ⏱️
2 331 tests 2 329 ✅ 0 💤 2 ❌
3 923 runs  3 921 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 89618f1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 18, 2025

matter-sensor_coverage.xml

File Coverage
All files 87%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/bosch-button-contact/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 45%

matter-thermostat_coverage.xml

File Coverage
All files 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/bosch-button-contact/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 45%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 90%
/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 89618f1

table.insert(total_supported_capabilities[MAIN_COMPONENT_IDX][CAPABILITIES_LIST_IDX], capabilities.firmwareUpdate.ID)

device:set_field(SUPPORTED_COMPONENT_CAPABILITIES, total_supported_capabilities, { persist = true })
if version.api < 15 and version.rpc < 9 then
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a brief comment indicating why this is needed and why we can't just rely on the the check for FW57 that is is done before calling into this function? Also could you create a ticket to eventually remove the old workaround entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done and done

Copy link
Contributor

@ctowns ctowns left a comment

Choose a reason for hiding this comment

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

Can you provide more detail in the "Summary of Completed Testing" section? One good test would be to do an A/B comparison between the subscription request that is sent out for a modular device with this change and without this change to confirm they are the same.

Also, could you test with a device that is onboarded to the existing production driver, then updates to this driver and confirm that the device sends out the correct subscription upon driver restart? It would be good to smoke test this case on 57 vs 58 FW versions.

table.insert(total_supported_capabilities[MAIN_COMPONENT_IDX][CAPABILITIES_LIST_IDX], capabilities.refresh.ID)
table.insert(total_supported_capabilities[MAIN_COMPONENT_IDX][CAPABILITIES_LIST_IDX], capabilities.firmwareUpdate.ID)

device:set_field(SUPPORTED_COMPONENT_CAPABILITIES, total_supported_capabilities, { persist = true })
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to remove this table for drivers that no longer would need it after the hub updates to 58, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's true, table removal logic added in latest commit

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