Skip to content

Matter Cam: Exclude zoneManagement when USERDEFINED is absent#3126

Open
samadDotDev wants to merge 1 commit into
mainfrom
matter-cam/per-zone-sens
Open

Matter Cam: Exclude zoneManagement when USERDEFINED is absent#3126
samadDotDev wants to merge 1 commit into
mainfrom
matter-cam/per-zone-sens

Conversation

@samadDotDev

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix

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

When USERDEFINED feature is absent from the ZoneManagement cluster, most of the zone management is unavailable from the ecosystem perspective. The commands we have in the capability for create/update/remove zone don’t work either (as the corresponding commands on the cluster aren’t available).

Until we define requirements and design a UX for how the zones should look like in SmartThings when this feature is absent, we should exclude this capability from the profile to ensure that the currently available camera plugin doesn’t display the Zone menu which doesn’t work (as it heavily depends on the UX where users are able to create/edit/delete zones from smartthings).

Down the line, we can introduce a new variant in supportedFeatures attribute of the capability, and document on relevant commands that these will only be available if the given feature is present, and use a different UX when then feature is absent.

This has showed up with the beta firmware of a camera partner which supports zone management cluster without this feature, and has rendered an unusable zone setting in the plugin.

Summary of Completed Tests

  • Added/modified unit tests with and without the feature
  • Tested on that camera hardware before and after the change.
    • Updated the driver on the existing device, observed that the capability in profile and the zone setting UI in plugin was removed as expected for the camera that had zone management without this feature. Also observed a different camera retaining this setting, that had zone management with this feature.
    • Onboarded a new camera with this driver and observed that the capability was not included.

@samadDotDev samadDotDev added the CGAI Contains code that was generated by AI label Jul 16, 2026
@CLAassistant

CLAassistant commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Test Results

   73 files  ±0    538 suites  ±0   0s ⏱️ ±0s
3 194 tests +2  3 194 ✅ +2  0 💤 ±0  0 ❌ ±0 
5 195 runs  +2  5 195 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 9a906a6. ± Comparison against base commit 4a06ba8.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
Zone Management setSensitivity command should handle global sensitivity when per-zone sensitivity is unsupported
Zone Management trigger reports should omit sensitivity when per-zone sensitivity is unsupported, even if provided by client
Camera profile should include zoneManagement when USER_DEFINED feature is present
Camera profile should not include zoneManagement when USER_DEFINED feature is missing
Zone Management setSensitivity command should be ignored when zoneManagement capability is not exposed
Zone Management trigger command should be ignored when zoneManagement capability is not exposed

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

File Coverage
All files 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 75%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua 52%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_garage_door/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/Descriptor/server/attributes/PartsList.lua 54%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/hager/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/Descriptor/init.lua 70%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/Descriptor/types/init.lua 62%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 9a906a6

@samadDotDev
samadDotDev force-pushed the matter-cam/per-zone-sens branch from d9b3eb5 to 9a906a6 Compare July 16, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CGAI Contains code that was generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants