Cameras1364 — WebRTC Transport Requestor

Matter Cluster 1364 — WebRTC Transport Requestor

Matter Cluster 1364 (0x0554) WebRTC Transport Requestor: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 1364 — WebRTC Transport Requestor Cluster

Matter Cluster 1364, also written as 0x0554, is the WebRTC Transport Requestor Cluster. The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider that implements the WebRTC Transport Provider Cluster.

Cluster Identity

FieldValue
Cluster ID decimal1364
Cluster ID hex0x0554
Cluster nameWebRTC Transport Requestor
Cluster revision (Matter 1.6.1)2
Roleapplication
ScopeEndpoint
PICS codeWEBRTCR
Typical endpoint1

Revision history

RevisionChange
1Initial version of the WebRTC Transport Requestor Cluster
2Add multi stream support

Shadow Path Format

Cluster 1364 values in the device shadow use this format:

endpoint_id / 1364 / attribute_id

Example:

{
  "1/1364/0": []
}
PartMeaning
1Endpoint ID
1364WebRTC Transport Requestor cluster
0CurrentSessions attribute

Cluster 1364 Attributes

Cluster 1364 defines 1 attribute plus the global attributes. Conformance: M mandatory, O optional, a feature code means "mandatory when that feature is present", square brackets mean "optional when …".

IDHexAttributeTypeConformanceAccessQualitiesDefault
00x0000CurrentSessionslist of WebRTCSessionStructMR (read: admin, fabric-sensitive)——

Global attributes

IDHexAttributeMeaning
655280xFFF8GeneratedCommandListResponse command IDs this server generates.
655290xFFF9AcceptedCommandListCommand IDs this server accepts.
655310xFFFBAttributeListAttribute IDs implemented.
655320xFFFCFeatureMapImplemented optional features (see above).
655330xFFFDClusterRevisionCluster revision implemented; 2 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — CurrentSessions

Path example:

1/1364/0

This attribute is a list of WebRTCSessionStruct, which represents all the active WebRTC Sessions on this Node.

PropertyValue
Typelist of WebRTCSessionStruct
ConformanceM
AccessR (read: admin, fabric-sensitive)

Example:

{
  "1/1364/0": []
}

Cluster 1364 Commands

Cluster 1364 has 4 client-to-server commands and 0 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00Offerclient → serverMstatusThis command provides the stream requestor with WebRTC session details.
10x01Answerclient → serverMstatusThis command provides the stream requestor with the WebRTC session details (i.e.
20x02ICECandidatesclient → serverMstatus—
30x03Endclient → serverMstatusThis command notifies the stream requestor that the provider has ended the WebRTC session.

AcceptedCommandList

The AcceptedCommandList attribute lists the command IDs the endpoint actually implements:

endpoint_id / 1364 / 65529
{
  "1/1364/65529": [
    0,
    1,
    2,
    3
  ]
}

Before sending a Cluster 1364 command, check that the command ID exists in endpoint/1364/65529. Optional commands are only present when the matching feature is set in FeatureMap.


Bridge Command Payload Format

The bridge accepts Matter commands in this structure:

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1364,
    "command_name": "Offer",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 1364, always use "cluster_id": 1364. Payload keys are the command field names in lowerCamelCase. Octet-string fields are base64-encoded. timed_request_timeout_ms is required for timed commands and ignored otherwise.


Command: Offer

Purpose

This command provides the stream requestor with WebRTC session details. It is sent following the receipt of a SolicitOffer command or a re-offer initiated by the Provider. This command must respond with a response status of NOT_FOUND if the WebRTCSessionID does not match an entry in CurrentSessions, or if the matching entry's associated fabric and PeerNodeID do not match the accessing fabric and the Peer Node ID entry stored in the Secure Session Context of the session this command was received on.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameOffer
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1SDPsdpstringM——
2ICEServersiceServerslist of ICEServerStructOmax 10 entries—
3ICETransportPolicyiceTransportPolicystringOmax length 16—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1364,
    "command_name": "Offer",
    "payload": {
      "webRTCSessionID": 0,
      "sdp": "example"
    }
  }
}

Command: Answer

Purpose

This command provides the stream requestor with the WebRTC session details (i.e. Session ID and SDP answer), It is the next command in the Offer/Answer flow to the ProvideOffer command. This command must respond with a response status of NOT_FOUND if the WebRTCSessionID does not match an entry in CurrentSessions, or if the matching entry's associated fabric and PeerNodeID do not match the accessing fabric and the Peer Node ID entry stored in the Secure Session Context of the session this command was received on.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameAnswer
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1SDPsdpstringM——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1364,
    "command_name": "Answer",
    "payload": {
      "webRTCSessionID": 0,
      "sdp": "example"
    }
  }
}

Command: ICECandidates

Purpose

ICECandidates is a client-to-server command of the WebRTC Transport Requestor cluster.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameICECandidates
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1ICECandidatesiceCandidateslist of ICECandidateStructMmin 1 entries—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1364,
    "command_name": "ICECandidates",
    "payload": {
      "webRTCSessionID": 0,
      "iceCandidates": []
    }
  }
}

Command: End

Purpose

This command notifies the stream requestor that the provider has ended the WebRTC session.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameEnd
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1ReasonreasonWebRTCEndReasonEnumM—This field is one of the values in WebRTCEndReasonEnum.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1364,
    "command_name": "End",
    "payload": {
      "webRTCSessionID": 0,
      "reason": 0
    }
  }
}

Cluster 1364 Events

Cluster 1364 defines no events.


SmartphoneKey Notes

  • Cluster 1364 is not currently exposed by SmartphoneKey devices. This page documents the Matter 1.6.1 specification so that future devices can be interpreted without changes to the backend.
  • Shadow paths follow endpoint/1364/attribute; attribute values that the device reports as unreadable are written as n/a.
  • Attribute IDs, command IDs and enum values on this page come from the CSA Matter 1.6.1 data model; descriptions are condensed from the specification text.