Energy and metering151 — Messages

Matter Cluster 151 — Messages

Matter Cluster 151 (0x0097) Messages: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 151 — Messages Cluster

Matter Cluster 151, also written as 0x0097, is the Messages Cluster. This cluster provides an interface for passing messages to be presented by a device.

Cluster Identity

FieldValue
Cluster ID decimal151
Cluster ID hex0x0097
Cluster nameMessages
Cluster revision (Matter 1.6.1)3
Roleapplication
ScopeEndpoint
PICS codeMESS
Typical endpoint1

Revision history

RevisionChange
1Mandatory global ClusterRevision attribute added
2Updated from SE1.4 version; CCB 1819
3Initial Matter release; renamed from EnergyMessaging to Messages

Shadow Path Format

Cluster 151 values in the device shadow use this format:

endpoint_id / 151 / attribute_id

Example:

{
  "1/151/0": []
}
PartMeaning
1Endpoint ID
151Messages cluster
0Messages attribute

Cluster 151 Features

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

BitCodeFeatureConformanceMeaning
0CONFReceivedConfirmationOThis feature indicates that the device can get confirmation from a user that the message was received.
1RESPConfirmationResponse[CONF]This feature indicates that the device is capable of presenting a list of responses to the user and recording the user's choice of response.
2RPLYConfirmationReply[CONF]This feature indicates that the device is capable of collecting a free-form text response to a message.
3PROTProtectedMessagesOThis feature indicates that the device is capable of requiring the user to authenticate before viewing a message; e.g. entering a PIN or password before viewing a message with billing information.

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


Data Types

FutureMessagePreferenceEnum

A display device may include this preference in the MessageComplete event as a hint to clients about how to handle future similar messages.

ValueNameConformanceMeaning
0AllowedMSimilar messages are allowed
1IncreasedMSimilar messages should be sent more often
2ReducedMSimilar messages should be sent less often
3DisallowedMSimilar messages should not be sent
4BannedMNo further messages should be sent

MessagePriorityEnum

Priority should be used to decide which messages to show when the number of eligible messages is larger than the device's capacity to present them.

ValueNameConformanceMeaning
0LowMMessage to be transferred with a low level of importance
1MediumMMessage to be transferred with a medium level of importance
2HighMMessage to be transferred with a high level of importance
3CriticalMMessage to be transferred with a critical level of importance

MessageControlBitmap (bitmap)

This data type is derived from map16, and indicates control information related to a message.

BitNameConformanceMeaning
0ConfirmationRequiredCONFMessage requires confirmation from user
1ResponseRequiredRESPMessage requires response from user
2ReplyMessageRPLYMessage supports reply message from user
3MessageConfirmedCONFMessage has already been confirmed
4MessageProtectedPROTMessage required PIN/password protection

MessageResponseOptionStruct (struct)

This represents a possible response to a message.

FieldNameTypeConformanceConstraintMeaning
0MessageResponseIDuint32Mmin 1—
1LabelstringMmax length 32Indicates the text for this option; e.g.

MessageStruct (struct) — fabric-scoped

This represents a single message.

FieldNameTypeConformanceConstraintMeaning
0MessageIDmessage-idMallowed: 16—
1PriorityMessagePriorityEnumM—Indicates the priority level for this message.
2MessageControlMessageControlBitmapM—Indicates control information related to the message.
3StartTimeepoch-s (nullable)M—Indicates the time in UTC at which the message becomes available to be presented.
4Durationuint64 (nullable)M—Indicates the amount of time, in milliseconds, after the StartTime during which the message is available to be presented.
5MessageTextstringMmax length 256Indicates a string containing the message to be presented.
6Responseslist of MessageResponseOptionStructRESPmax 4 entriesIndicates a list of potential responses to the message.

Cluster 151 Attributes

Cluster 151 defines 2 attributes 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
00x0000Messageslist of MessageStructMR (read: view, fabric-scoped)——
10x0001ActiveMessageIDslist of message-idMR (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; 3 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — Messages

Path example:

1/151/0

Indicates a list of queued messages. In addition to filtering based upon fabric, to preserve user privacy, the server may further limit the set of messages returned in a read request. At minimum, the server returns to a client those messages that the client itself created/submitted.

PropertyValue
Typelist of MessageStruct
ConformanceM
AccessR (read: view, fabric-scoped)
Constraintmax 8 entries

Each entry is a MessageStruct (see Data Types).

Example:

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

Attribute 1 / 0x0001 — ActiveMessageIDs

Path example:

1/151/1

No condensed specification text is available for ActiveMessageIDs; use the type, conformance and constraint below together with the cluster description above.

PropertyValue
Typelist of message-id
ConformanceM
AccessR (read: view)
Constraintmax 8 entries

Example:

{
  "1/151/1": []
}

Cluster 151 Commands

Cluster 151 has 2 client-to-server commands and 0 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00PresentMessagesRequestclient → serverMstatusOn receipt, this must cause the message in the passed fields to be appended to the Messages attribute.
10x01CancelMessagesRequestclient → serverMstatusThis command will cancel the message IDs specified.

AcceptedCommandList

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

endpoint_id / 151 / 65529
{
  "1/151/65529": [
    0,
    1
  ]
}

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

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

Purpose

On receipt, this must cause the message in the passed fields to be appended to the Messages attribute. If appending the message would cause the number of messages to be greater than the capacity of the list, the device must NOT append any message to Messages, and returns a status code of RESOURCE_EXHAUSTED. When displaying a message in response to this command, an indication (ex. visual) of the origin node of the command is provided. This could be in the form of a friendly name label which uniquely identifies the node to the user.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command namePresentMessagesRequest
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0MessageIDmessageIDmessage-idMallowed: 16—
1PrioritypriorityMessagePriorityEnumM—Indicates the priority level for this message. See Priority.
2MessageControlmessageControlMessageControlBitmapM—Indicates control information related to the message. See MessageControl.
3StartTimestartTimeepoch-s (nullable)M—Indicates the time in UTC at which the message becomes available to be presented. A null value indicates "now." See StartTime.
4Durationdurationuint64 (nullable)M—Indicates the amount of time, in milliseconds, after the StartTime during which the message is available to be presented. A null value indicates "until changed".
5MessageTextmessageTextstringMmax length 256Indicates a string containing the message to be presented. See MessageText.
6Responsesresponseslist of MessageResponseOptionStructRESPmax 4 entriesIndicates a list of potential responses to the message. The entries in this list has unique values of MessageResponseID.

Priority values (MessagePriorityEnum): 0 = Low, 1 = Medium, 2 = High, 3 = Critical

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 151,
    "command_name": "PresentMessagesRequest",
    "payload": {
      "messageID": 0,
      "priority": 0,
      "messageControl": 0,
      "startTime": 0,
      "duration": 1,
      "messageText": "example"
    }
  }
}

Command: CancelMessagesRequest

Purpose

This command will cancel the message IDs specified.

Command Identity

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

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0MessageIDsmessageIDslist of message-idMmax 8 entries—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 151,
    "command_name": "CancelMessagesRequest",
    "payload": {
      "messageIDs": []
    }
  }
}

Cluster 151 Events

IDHexEventPriorityConformanceDescription
00x00MessageQueuedinfoMThis event is generated when a message is added to the messages attribute.
10x01MessagePresentedinfoMThis event is generated when the message is presented to the user.
20x02MessageCompleteinfoMThis event is generated when the message is confirmed by the user, or when the Duration field of the message has elapsed without confirmation.

Event 0 — MessageQueued

This event is generated when a message is added to the messages attribute.

IDFieldTypeConformanceMeaning
0MessageIDmessage-idM—

Event 1 — MessagePresented

This event is generated when the message is presented to the user.

IDFieldTypeConformanceMeaning
0MessageIDmessage-idM—

Event 2 — MessageComplete

This event is generated when the message is confirmed by the user, or when the Duration field of the message has elapsed without confirmation.

IDFieldTypeConformanceMeaning
0MessageIDmessage-idM—
1ResponseIDuint32 (nullable)RESP—
2Replystring (nullable)RPLYIndicates a user-provided reply to the message. If there was no reply, or the message did not have the ReplyRequired bit set, this field is null.
3FutureMessagesPreferenceFutureMessagePreferenceEnum (nullable)M—

SmartphoneKey Notes

  • Cluster 151 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/151/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.