Summary
The generic matter-switch subscription path stores its computed attributes_seen table in fields.SUBSCRIBED_ATTRIBUTES_KEY because the Edge Lua refresh handler uses that field to determine which attributes to read.
The camera subdriver builds the same attributes_seen structure in CameraUtils.subscribe(), but currently never stores it.
As a result, the camera-specific subscription set is not registered for the normal refresh path.
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
The main matter-switch subscription implementation explicitly documents and stores the field:
-- The refresh capability command handler in the lua libs uses this key
-- to determine which attributes to read.
device:set_field(fields.SUBSCRIBED_ATTRIBUTES_KEY, attributes_seen)
The camera subdriver similarly builds attributes_seen:
but ends with:
if #subscribe_request.info_blocks > 0 then
device:send(subscribe_request)
end
without storing attributes_seen.
The camera profile includes the standard refresh capability:
Reproduction
This can be reproduced directly from the driver code:
- Let a camera device run
CameraUtils.subscribe().
- Observe that the function builds the camera subscription map in
attributes_seen.
- Compare it with the normal
switch_utils.subscribe() path.
- The camera path does not update
fields.SUBSCRIBED_ATTRIBUTES_KEY.
- Invoke the standard
refresh capability.
The refresh handler therefore cannot use the camera subscription set in the same way as the normal Matter Switch path.
Expected behavior
A camera's standard Refresh command should read the same camera attributes that the camera subdriver considers subscribed/managed.
Suggested change
At the end of CameraUtils.subscribe(), before sending the subscription request, mirror the existing generic Matter Switch behavior:
device:set_field(fields.SUBSCRIBED_ATTRIBUTES_KEY, attributes_seen)
if #subscribe_request.info_blocks > 0 then
device:send(subscribe_request)
end
No camera-specific refresh implementation should be necessary.
G350 evidence
The G350 exercises a large camera subscription set including:
- occupancy;
- privacy;
- night vision;
- speaker/microphone state;
- PTZ;
- stream settings;
- WebRTC-related camera state.
The tested camera driver included the SUBSCRIBED_ATTRIBUTES_KEY fix and continued to operate normally on the real G350.
This issue was identified primarily by comparing the two driver subscription paths; no isolated user-visible "Refresh failed" log was required to prove the bookkeeping discrepancy.
Affected files
src/sub_drivers/camera/camera_utils/utils.lua
src/test/test_matter_camera.lua
Suggested regression coverage
After CameraUtils.subscribe():
- inspect
fields.SUBSCRIBED_ATTRIBUTES_KEY;
- verify that it contains representative camera attributes, e.g.:
Occupancy;
NightVision;
- a privacy attribute;
MPTZPosition;
- verify that the contents match the attributes added to the subscription request.
Scope
This is a small generic driver consistency fix and is independent of the Aqara device.
Summary
The generic
matter-switchsubscription path stores its computedattributes_seentable infields.SUBSCRIBED_ATTRIBUTES_KEYbecause the Edge Lua refresh handler uses that field to determine which attributes to read.The camera subdriver builds the same
attributes_seenstructure inCameraUtils.subscribe(), but currently never stores it.As a result, the camera-specific subscription set is not registered for the normal refresh path.
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
The main
matter-switchsubscription implementation explicitly documents and stores the field:switch_utils/utils.lualines 582-587The camera subdriver similarly builds
attributes_seen:camera_utils/utils.lualines 298-338but ends with:
without storing
attributes_seen.The camera profile includes the standard
refreshcapability:profiles/camera.ymllines 53-56Reproduction
This can be reproduced directly from the driver code:
CameraUtils.subscribe().attributes_seen.switch_utils.subscribe()path.fields.SUBSCRIBED_ATTRIBUTES_KEY.refreshcapability.The refresh handler therefore cannot use the camera subscription set in the same way as the normal Matter Switch path.
Expected behavior
A camera's standard Refresh command should read the same camera attributes that the camera subdriver considers subscribed/managed.
Suggested change
At the end of
CameraUtils.subscribe(), before sending the subscription request, mirror the existing generic Matter Switch behavior:No camera-specific refresh implementation should be necessary.
G350 evidence
The G350 exercises a large camera subscription set including:
The tested camera driver included the
SUBSCRIBED_ATTRIBUTES_KEYfix and continued to operate normally on the real G350.This issue was identified primarily by comparing the two driver subscription paths; no isolated user-visible "Refresh failed" log was required to prove the bookkeeping discrepancy.
Affected files
src/sub_drivers/camera/camera_utils/utils.luasrc/test/test_matter_camera.luaSuggested regression coverage
After
CameraUtils.subscribe():fields.SUBSCRIBED_ATTRIBUTES_KEY;Occupancy;NightVision;MPTZPosition;Scope
This is a small generic driver consistency fix and is independent of the Aqara device.