Skip to content

Conversation

@hcarter-775
Copy link
Contributor

Context: In the matter camera subdriver, the webrtc capability should be included if the WebRTCTransportProvider clusters is implemented as SERVER and if WebRTCTransportRequestor is implemented as CLIENT; this commit adds a check for the former which is currently missing from the subdriver.

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

In the matter camera subdriver, the webrtc capability should be included
if the `WebRTCTransportProvider` clusters is implemented as `SERVER` and
if `WebRTCTransportRequestor` is implemented as `CLIENT`; this commit
adds a check for the former which is currently missing from the subdriver.
@github-actions
Copy link

github-actions bot commented Nov 20, 2025

Channel deleted.

@github-actions
Copy link

Test Results

   71 files    468 suites   0s ⏱️
2 455 tests 2 455 ✅ 0 💤 0 ❌
4 168 runs  4 168 ✅ 0 💤 0 ❌

Results for commit b031f29.

@github-actions
Copy link

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%
/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_utils/utils.lua 91%
/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/fields.lua 99%
/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 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against b031f29

@hcarter-775 hcarter-775 merged commit 16bd622 into beta Nov 20, 2025
11 checks passed
@hcarter-775 hcarter-775 deleted the matter-camera-hotfix branch November 20, 2025 17:14

local camera_endpoints = switch_utils.get_endpoints_by_device_type(device, fields.DEVICE_TYPE_ID.CAMERA)
if #camera_endpoints > 0 then
if #device:get_endpoints(clusters.WebRTCTransportProvider.ID, {cluster_type = "SERVER"}) > 0 and
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this check here instead of just on the camera endpoint?

Copy link
Contributor

@nickolas-deboom nickolas-deboom Nov 20, 2025

Choose a reason for hiding this comment

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

We wanted to enforce the cluster types here for WebRTCTransportProvider as SERVER and WebRTCTransportRequestor as CLIENT, which is why this check was moved out of the loop. Note that each device type (except for Camera Controller, which is not currently supported by the subdriver anyways) that includes WebRTCTransportProvider / WebRTCTransportRequestor also includes CameraAVStreamManagement as a mandatory cluster, so this check as it is currently should be sufficient for now.

This will be improved by #2570, which will check the cluster type for the other clusters as well and also moves the WebRTCTransport check back. I'd like to get more testing done on that PR which is why it wasn't included in this hotfix.

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.

5 participants