General and node management4 — Groups

Matter Cluster 4 — Groups

Matter Cluster 4 (0x0004) Groups: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 4 — Groups Cluster

Matter Cluster 4, also written as 0x0004, is the Groups Cluster. Starting with the release of Matter when the Groupcast Cluster becomes certifiable, that cluster supersedes this Groups Cluster. Groups created on devices prior to that Matter release remain operational via the PerGroup feature in the Groupcast Cluster. All new group management operations should be performed through the Groupcast Cluster.

Cluster Identity

FieldValue
Cluster ID decimal4
Cluster ID hex0x0004
Cluster nameGroups
Cluster revision (Matter 1.6.1)4
Roleutility
ScopeEndpoint
PICS codeG
Typical endpoint1

Revision history

RevisionChange
1Mandatory global ClusterRevision attribute added; CCB 1745 2100
2CCB 2289
3CCB 2310 2704
4New data model format and notation

Shadow Path Format

Cluster 4 values in the device shadow use this format:

endpoint_id / 4 / attribute_id

Example:

{
  "1/4/0": 0
}
PartMeaning
1Endpoint ID
4Groups cluster
0NameSupport attribute

Cluster 4 Features

The FeatureMap attribute (1/4/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.

BitCodeFeatureConformanceMeaning
0GNGroupNamesOThe ability to store a name for a group

Example: FeatureMap = 0 means no optional feature is enabled; 1 means every feature listed above is enabled.


Data Types

NameSupportBitmap (bitmap)

BitNameConformanceMeaning
7GroupNamesMThe ability to store a name for a group.

Cluster 4 Attributes

Cluster 4 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
00x0000NameSupportNameSupportBitmapMR (read: view)——

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; 4 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — NameSupport

Path example:

1/4/0

This attribute provides legacy, read-only access to whether the Group Names feature is supported. The most significant bit, bit 7 (GroupNames), is equal to bit 0 of the FeatureMap attribute (GN Feature). All other bits is 0.

PropertyValue
TypeNameSupportBitmap
ConformanceM
AccessR (read: view)
Constraintdesc

Bits (NameSupportBitmap):

BitNameMeaning
7GroupNamesThe ability to store a name for a group.

Example:

{
  "1/4/0": 0
}

Cluster 4 Commands

Cluster 4 has 6 client-to-server commands and 4 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00AddGroupclient → serverMAddGroupResponseThe AddGroup command allows a client to add group membership in a particular group for the server endpoint.
00x00AddGroupResponseserver → clientM—The AddGroupResponse is sent by the Groups cluster server in response to an AddGroup command.
10x01ViewGroupclient → serverMViewGroupResponseThe ViewGroup command allows a client to request that the server responds with a ViewGroupResponse command containing the name string for a particular group.
10x01ViewGroupResponseserver → clientM—The ViewGroupResponse command is sent by the Groups cluster server in response to a ViewGroup command.
20x02GetGroupMembershipclient → serverMGetGroupMembershipResponseThe GetGroupMembership command allows a client to inquire about the group membership of the server endpoint, in a number of ways.
20x02GetGroupMembershipResponseserver → clientM—The GetGroupMembershipResponse command is sent by the Groups cluster server in response to a GetGroupMembership command.
30x03RemoveGroupclient → serverMRemoveGroupResponseThe RemoveGroup command allows a client to request that the server removes the membership for the server endpoint, if any, in a particular group.
30x03RemoveGroupResponseserver → clientM—The RemoveGroupResponse command is generated by the server in response to the receipt of a RemoveGroup command.
40x04RemoveAllGroupsclient → serverMstatusThe RemoveAllGroups command allows a client to direct the server to remove all group associations for the server endpoint.
50x05AddGroupIfIdentifyingclient → serverMstatusThe AddGroupIfIdentifying command allows a client to add group membership in a particular group for the server endpoint, on condition that the endpoint is identifying itself.

AcceptedCommandList

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

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

Before sending a Cluster 4 command, check that the command ID exists in endpoint/4/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": 4,
    "command_name": "AddGroup",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 4, always use "cluster_id": 4. 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: AddGroup

Purpose

The AddGroup command allows a client to add group membership in a particular group for the server endpoint.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameAddGroup
Directionclient → server
ConformanceM
ResponseAddGroupResponse
Access(invoke: manage, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupIDgroupIDgroup-idMmin 1—
1GroupNamegroupNamestringMmax length 16This field may be set to a human-readable name for the group. If the client has no name for the group, the GroupName field is set to the empty string.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "AddGroup",
    "payload": {
      "groupID": 1,
      "groupName": "example"
    }
  }
}

The device answers with AddGroupResponse (see below).


Command: AddGroupResponse

Purpose

The AddGroupResponse is sent by the Groups cluster server in response to an AddGroup command.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameAddGroupResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0Statusstatusenum8MdescThis field is set according to the Effect on Receipt section of the AddGroup command.
1GroupIDgroupIDgroup-idMmin 1—

Command: ViewGroup

Purpose

The ViewGroup command allows a client to request that the server responds with a ViewGroupResponse command containing the name string for a particular group.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameViewGroup
Directionclient → server
ConformanceM
ResponseViewGroupResponse
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupIDgroupIDgroup-idMmin 1—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "ViewGroup",
    "payload": {
      "groupID": 1
    }
  }
}

The device answers with ViewGroupResponse (see below).


Command: ViewGroupResponse

Purpose

The ViewGroupResponse command is sent by the Groups cluster server in response to a ViewGroup command.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameViewGroupResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0Statusstatusenum8MdescThis field is according to the Effect on Receipt section of the ViewGroup command.
1GroupIDgroupIDgroup-idMmin 1—
2GroupNamegroupNamestringMmax length 16If the status is SUCCESS, and group names are supported, this field is set to the group name associated with that group in the Group Table; otherwise it is set to the empty string.

Command: GetGroupMembership

Purpose

The GetGroupMembership command allows a client to inquire about the group membership of the server endpoint, in a number of ways.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameGetGroupMembership
Directionclient → server
ConformanceM
ResponseGetGroupMembershipResponse
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupListgroupListlist of group-idM——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "GetGroupMembership",
    "payload": {
      "groupList": []
    }
  }
}

The device answers with GetGroupMembershipResponse (see below).


Command: GetGroupMembershipResponse

Purpose

The GetGroupMembershipResponse command is sent by the Groups cluster server in response to a GetGroupMembership command.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameGetGroupMembershipResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0Capacitycapacityuint8 (nullable)M—This field contains the remaining capacity of the Group Table of the node.
1GroupListgroupListlist of group-idM—The GroupList field contains either the group IDs of all the groups in the Group Table for which the server endpoint is a member of the group (in the case where the GroupList field of the received GetGroupMembership command was empty), or the group IDs of all …

Command: RemoveGroup

Purpose

The RemoveGroup command allows a client to request that the server removes the membership for the server endpoint, if any, in a particular group.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameRemoveGroup
Directionclient → server
ConformanceM
ResponseRemoveGroupResponse
Access(invoke: manage, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupIDgroupIDgroup-idMmin 1—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "RemoveGroup",
    "payload": {
      "groupID": 1
    }
  }
}

The device answers with RemoveGroupResponse (see below).


Command: RemoveGroupResponse

Purpose

The RemoveGroupResponse command is generated by the server in response to the receipt of a RemoveGroup command.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameRemoveGroupResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0Statusstatusenum8MdescThis field is according to the Effect on Receipt section of the RemoveGroup command.
1GroupIDgroupIDgroup-idMmin 1—

Command: RemoveAllGroups

Purpose

The RemoveAllGroups command allows a client to direct the server to remove all group associations for the server endpoint.

Command Identity

FieldValue
Command ID4
Command hex0x04
Command nameRemoveAllGroups
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: manage, fabric-scoped)

Payload Fields

This command has no payload fields.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "RemoveAllGroups",
    "payload": {}
  }
}

Command: AddGroupIfIdentifying

Purpose

The AddGroupIfIdentifying command allows a client to add group membership in a particular group for the server endpoint, on condition that the endpoint is identifying itself. Identifying functionality is controlled using the Identify cluster,. For correct operation of the AddGroupIfIdentifying command, any endpoint that supports the Groups server cluster must also support the Identify server cluster. This command might be used to assist configuring group membership in the absence of a commissioning tool.

Command Identity

FieldValue
Command ID5
Command hex0x05
Command nameAddGroupIfIdentifying
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: manage, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupIDgroupIDgroup-idMmin 1—
1GroupNamegroupNamestringMmax length 16This field may be set to a human-readable name for the group. If the client has no name for the group, the GroupName field is set to the empty string.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 4,
    "command_name": "AddGroupIfIdentifying",
    "payload": {
      "groupID": 1,
      "groupName": "example"
    }
  }
}

Cluster 4 Events

Cluster 4 defines no events.


SmartphoneKey Notes

  • Cluster 4 is present on SmartphoneKey devices or hubs today. See Matter Bridge Clusters — Detailed Reference and Matter Device Attributes & Commands for the values the bridge actually reports.
  • Shadow paths follow endpoint/4/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.