Summary
The matter-switch camera subdriver currently relies mainly on cluster presence and FeatureMap when deciding which camera attributes to subscribe to, which SmartThings capability features to advertise, and which Matter commands may be sent.
That is not sufficient for Matter camera clusters because many attributes and commands are optional even when the corresponding feature is present.
A real Matter 1.5.1 camera exposed this clearly:
CameraAvStreamManagement has the Night Vision feature and the NightVision attribute, but does not advertise NightVisionIllum.
CameraAvSettingsUserLevelManagement supports mechanical pan/tilt/zoom/presets but does not advertise Digital PTZ or DPTZStreams.
- nevertheless the current driver subscribes to
NightVisionIllum whenever nightVision is enabled and includes DPTZStreams whenever videoStreamSettings is enabled.
videoStreamSettings.supportedFeatures currently adds perStreamViewports from the AVSM VIDEO feature alone, although per-stream viewport control is a Digital PTZ function.
The driver already subscribes to AVSM AttributeList, but the current handler only uses it for status-light detection. It does not cache the full list. It does not currently subscribe to or use AcceptedCommandList.
Environment / verification
Verified against SmartThingsCommunity/SmartThingsEdgeDrivers main at commit
60bbf2716412fdf04fd59f967bdd37be6995d664 (2026-08-12).
Real-device validation used:
- Aqara Camera Hub G350
- VID/PID:
0x115F / 0x3013
- firmware:
4.5.70 / 4005070
- reported Matter SpecificationVersion:
1.5.1
- Camera device type:
0x0142
- Camera endpoint in this device: endpoint 2
The proposed changes are generic Matter-camera changes. No Aqara VID/PID fingerprint or proprietary Aqara cluster handling is required.
Current behavior
Current camera subscriptions include optional attributes unconditionally once the SmartThings capability is present:
The driver subscribes to AVSM AttributeList, but not AcceptedCommandList, and does not subscribe to AV Settings AttributeList / AcceptedCommandList:
The AVSM AttributeList handler currently extracts only the two status-light attributes:
perStreamViewports is currently advertised whenever AVSM has VIDEO:
The capability handlers also expose commands based on capability/feature presence rather than the endpoint's actual AcceptedCommandList.
Reproduction
- Join a Matter camera that exposes:
- AVSM
VIDEO and NIGHT_VISION;
NightVision;
- no
NightVisionIllum;
- mechanical PTZ;
- no Digital PTZ;
- no
DPTZStreams.
- Let the camera subdriver profile and subscribe.
- Inspect the generated SmartThings state and Matter subscription paths.
On the G350, the Matter metadata is:
CameraAvStreamManagement FeatureMap = 0x041F
Audio
Video
Snapshot
Privacy
Speaker
NightVision
CameraAvSettingsUserLevelManagement FeatureMap = 0x001E
MechanicalPan
MechanicalTilt
MechanicalZoom
MechanicalPresets
NO DigitalPTZ
AVSM AttributeList:
NightVision present
NightVisionIllum absent
AV Settings AttributeList:
DPTZStreams absent
Before the test-driver fix, SmartThings nevertheless reported:
"videoStreamSettings": {
"supportedFeatures": {
"value": [
"liveStreaming",
"clipRecording",
"perStreamViewports"
]
}
}
That is inconsistent with the endpoint's advertised feature/attribute model.
Expected behavior
Once the endpoint's global metadata is known:
- only attributes actually present in
AttributeList should be subscribed/read/written;
- commands absent from
AcceptedCommandList should not be sent;
perStreamViewports should be exposed only when the camera actually implements Digital PTZ / the required DPTZ model;
- absence of optional metadata should not disable otherwise supported functionality before the global lists have been received.
Suggested change
Cache the complete global lists for the camera clusters, for example:
-- conceptual helpers
camera_utils.update_attribute_list(device, cluster_id, elements)
camera_utils.update_accepted_command_list(device, cluster_id, elements)
camera_utils.attribute_supported(device, cluster_id, attribute_id)
camera_utils.command_supported(device, cluster_id, command_id)
Recommended compatibility semantics:
list not received yet -> unknown -> preserve existing behavior
list received -> authoritative -> filter/gate against it
Subscribe to:
CameraAvStreamManagement.attributes.AttributeList
CameraAvStreamManagement.attributes.AcceptedCommandList
CameraAvSettingsUserLevelManagement.attributes.AttributeList
CameraAvSettingsUserLevelManagement.attributes.AcceptedCommandList
Then:
- filter the camera subscription map against the cached AttributeList when known;
- add
DPTZStreams only when the Digital PTZ feature exists and the attribute is advertised;
- add
perStreamViewports only when Digital PTZ is supported;
- gate writes to optional camera attributes against AttributeList when known;
- gate camera commands against AcceptedCommandList when known.
Do not make an unknown list equivalent to "unsupported"; metadata reporting can arrive after profile initialization.
G350 evidence
The G350's real endpoint proves that a standards-compliant camera may implement a non-maximal combination of Matter camera options:
NightVision feature: yes
NightVision attribute: yes
NightVisionIllum: no
Mechanical PTZ: yes
Mechanical presets: yes
Digital PTZ: no
DPTZStreams: no
The test driver using AttributeList/AcceptedCommandList filtering remained operational on the G350 and removed the incorrect perStreamViewports advertisement.
The G350 advertises these AV Settings accepted commands:
0x00 MPTZSetPosition
0x01 MPTZRelativeMove
0x02 MPTZMoveToPreset
0x03 MPTZSavePreset
0x04 MPTZRemovePreset
and does not advertise the Digital PTZ commands.
Affected files
At minimum:
src/sub_drivers/camera/camera_utils/fields.lua
src/sub_drivers/camera/camera_utils/utils.lua
src/sub_drivers/camera/camera_utils/device_configuration.lua
src/sub_drivers/camera/camera_handlers/attribute_handlers.lua
src/sub_drivers/camera/camera_handlers/capability_handlers.lua
src/sub_drivers/camera/init.lua
src/test/test_matter_camera.lua
Suggested regression coverage
Add a second camera fixture whose feature set mirrors the G350 rather than the current all-features test camera:
AVSM: Audio | Video | Snapshot | Privacy | Speaker | NightVision
AV Settings: MechanicalPan | MechanicalTilt | MechanicalZoom | MechanicalPresets
No DigitalPTZ
No NightVisionIllum
No DPTZStreams
Verify:
NightVision is subscribed;
NightVisionIllum is not subscribed once AttributeList is known;
DPTZStreams is not subscribed;
perStreamViewports is not advertised;
- commands absent from AcceptedCommandList are ignored;
- behavior remains permissive before the global lists arrive.
Scope
This is not an Aqara-specific request. The G350 is simply a real Matter camera that exposed assumptions in the generic optional-feature handling.
Summary
The
matter-switchcamera subdriver currently relies mainly on cluster presence andFeatureMapwhen deciding which camera attributes to subscribe to, which SmartThings capability features to advertise, and which Matter commands may be sent.That is not sufficient for Matter camera clusters because many attributes and commands are optional even when the corresponding feature is present.
A real Matter 1.5.1 camera exposed this clearly:
CameraAvStreamManagementhas the Night Vision feature and theNightVisionattribute, but does not advertiseNightVisionIllum.CameraAvSettingsUserLevelManagementsupports mechanical pan/tilt/zoom/presets but does not advertise Digital PTZ orDPTZStreams.NightVisionIllumwhenevernightVisionis enabled and includesDPTZStreamswhenevervideoStreamSettingsis enabled.videoStreamSettings.supportedFeaturescurrently addsperStreamViewportsfrom the AVSMVIDEOfeature alone, although per-stream viewport control is a Digital PTZ function.The driver already subscribes to AVSM
AttributeList, but the current handler only uses it for status-light detection. It does not cache the full list. It does not currently subscribe to or useAcceptedCommandList.Environment / verification
Verified against
SmartThingsCommunity/SmartThingsEdgeDriversmainat commit60bbf2716412fdf04fd59f967bdd37be6995d664(2026-08-12).Real-device validation used:
0x115F / 0x30134.5.70/40050701.5.10x0142The proposed changes are generic Matter-camera changes. No Aqara VID/PID fingerprint or proprietary Aqara cluster handling is required.
Current behavior
Current camera subscriptions include optional attributes unconditionally once the SmartThings capability is present:
camera_utils/utils.lualines 183-240NightVisionandNightVisionIllumDPTZStreamsundervideoStreamSettingsThe driver subscribes to AVSM
AttributeList, but notAcceptedCommandList, and does not subscribe to AV SettingsAttributeList/AcceptedCommandList:camera_utils/utils.lualines 298-338The AVSM AttributeList handler currently extracts only the two status-light attributes:
camera_handlers/attribute_handlers.lualines 450-476perStreamViewportsis currently advertised whenever AVSM hasVIDEO:camera_utils/device_configuration.lualines 87-100The capability handlers also expose commands based on capability/feature presence rather than the endpoint's actual
AcceptedCommandList.Reproduction
VIDEOandNIGHT_VISION;NightVision;NightVisionIllum;DPTZStreams.On the G350, the Matter metadata is:
Before the test-driver fix, SmartThings nevertheless reported:
That is inconsistent with the endpoint's advertised feature/attribute model.
Expected behavior
Once the endpoint's global metadata is known:
AttributeListshould be subscribed/read/written;AcceptedCommandListshould not be sent;perStreamViewportsshould be exposed only when the camera actually implements Digital PTZ / the required DPTZ model;Suggested change
Cache the complete global lists for the camera clusters, for example:
Recommended compatibility semantics:
Subscribe to:
Then:
DPTZStreamsonly when the Digital PTZ feature exists and the attribute is advertised;perStreamViewportsonly when Digital PTZ is supported;Do not make an unknown list equivalent to "unsupported"; metadata reporting can arrive after profile initialization.
G350 evidence
The G350's real endpoint proves that a standards-compliant camera may implement a non-maximal combination of Matter camera options:
The test driver using AttributeList/AcceptedCommandList filtering remained operational on the G350 and removed the incorrect
perStreamViewportsadvertisement.The G350 advertises these AV Settings accepted commands:
and does not advertise the Digital PTZ commands.
Affected files
At minimum:
src/sub_drivers/camera/camera_utils/fields.luasrc/sub_drivers/camera/camera_utils/utils.luasrc/sub_drivers/camera/camera_utils/device_configuration.luasrc/sub_drivers/camera/camera_handlers/attribute_handlers.luasrc/sub_drivers/camera/camera_handlers/capability_handlers.luasrc/sub_drivers/camera/init.luasrc/test/test_matter_camera.luaSuggested regression coverage
Add a second camera fixture whose feature set mirrors the G350 rather than the current all-features test camera:
Verify:
NightVisionis subscribed;NightVisionIllumis not subscribed once AttributeList is known;DPTZStreamsis not subscribed;perStreamViewportsis not advertised;Scope
This is not an Aqara-specific request. The G350 is simply a real Matter camera that exposed assumptions in the generic optional-feature handling.