Appliances336 — Service Area

Matter Cluster 336 — Service Area

Matter Cluster 336 (0x0150) Service Area: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 336 — Service Area Cluster

Matter Cluster 336, also written as 0x0150, is the Service Area Cluster. This cluster provides an interface for controlling the areas where a device should operate, for reporting the status at each area, and for querying the current area. The device may operate at one area at a time, as in the case of a mobile device, such as a robot. Other devices may operate at (service) multiple areas simultaneously, as in the case of a sensor that can monitor multiple areas.

Cluster Identity

FieldValue
Cluster ID decimal336
Cluster ID hex0x0150
Cluster nameService Area
Cluster revision (Matter 1.6.1)2
Roleapplication
ScopeEndpoint
PICS codeSEAR
Typical endpoint1

Revision history

RevisionChange
1Initial revision
2Rename InitialTimeEstimate to EstimatedTime

Shadow Path Format

Cluster 336 values in the device shadow use this format:

endpoint_id / 336 / attribute_id

Example:

{
  "1/336/0": []
}
PartMeaning
1Endpoint ID
336Service Area cluster
0SupportedAreas attribute

Cluster 336 Features

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

BitCodeFeatureConformanceMeaning
0SELRUNSelectWhileRunningOThe device allows changing the selected areas while running
1PROGProgressReportingOThe device implements the progress reporting feature
2MAPSMapsOThe device has map support

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


Data Types

OperationalStatusEnum

ValueNameConformanceMeaning
0PendingMThe device has not yet started operating at the given area, or has not finished operating at that area but it is not currently operating at the area
1OperatingMThe device is currently operating at the given area
2SkippedMThe device has skipped the given area, before or during operating at it, due to a SkipArea command, due an out of band command (e.g. from the vendor's application), due to a vendor specific reason, such as a time limit used by the device, or due the device ending operating unsuccessfully
3CompletedMThe device has completed operating at the given area

SelectAreasStatus

ValueNameConformanceMeaning
0SuccessMAttempting to operate in the areas identified by the entries of the NewAreas field is allowed and possible, the SelectedAreas attribute is set to the value of the NewAreas field
1UnsupportedAreaMThe value of at least one of the entries of the NewAreas field doesn't match any entries in the SupportedAreas attribute
2InvalidInModeMThe received request cannot be handled due to the current mode of the device
3InvalidSetMThe set of values is invalid. For example, areas on different floors, that a robot knows it can't reach on its own

SkipAreaStatus

ValueNameConformanceMeaning
0SuccessMSkipping the area is allowed and possible, or the device was operating at the last available area and has stopped
1InvalidAreaListMThe SelectedAreas attribute is empty.
2InvalidInModeMThe received request cannot be handled due to the current mode of the device. For example, the CurrentArea attribute is null or the device is not operating
3InvalidSkippedAreaMThe SkippedArea field doesn't match an entry in the SupportedAreas list

AreaInfoStruct (struct)

The data from this structure indicates the name and/or semantic data describing an area, as detailed below. This data type includes the LocationInfo field, with the following fields: LocationName, FloorNumber, AreaType.

FieldNameTypeConformanceConstraintMeaning
0LocationInfoLocationDescriptorStruct (nullable)M—Indicates the name of the area, floor number and/or area type.
1LandmarkInfoLandmarkInfoStruct (nullable)M—Indicates an association with a landmark.

AreaStruct (struct)

This is a struct representing an area known to the server.

FieldNameTypeConformanceConstraintMeaning
0AreaIDuint32M——
1MapIDuint32 (nullable)Mdesc—
2AreaInfoAreaInfoStructM—This field contains data describing the area.

LandmarkInfoStruct (struct)

The data from this structure indicates a landmark and position relative to the landmark.

FieldNameTypeConformanceConstraintMeaning
0LandmarkTagtagM—Indicates that the area is associated with a landmark.
1RelativePositionTagtag (nullable)M—This field identifies the position of the area relative to a landmark.

MapStruct (struct)

This is a struct representing a map.

FieldNameTypeConformanceConstraintMeaning
0MapIDuint32M——
1NamestringMmax length 64This field represents a human understandable map description.

ProgressStruct (struct)

This is a struct indicating the progress.

FieldNameTypeConformanceConstraintMeaning
0AreaIDuint32M——
1StatusOperationalStatusEnumM—Indicates the operational status of the device regarding the area indicated by the AreaID field.
2TotalOperationalTimeelapsed-s (nullable)O—Indicates the total operational time, in seconds, from when the device started to operate at the area indicated by the AreaID field, until the operation finished, due to completion or due to skipping, including any time …
3EstimatedTimeelapsed-s (nullable)O—Indicates the estimated time for the operation, in seconds, from when the device will start operating at the area indicated by the AreaID field, until the operation completes, excluding any time spent while not …

Cluster 336 Attributes

Cluster 336 defines 6 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
00x0000SupportedAreaslist of AreaStructMR (read: view)—MS
10x0001SupportedMapslist of MapStructMAPSR (read: view)—MS
20x0002SelectedAreaslist of uint32MR (read: view)—empty
30x0003CurrentAreauint32descR (read: view)nullablenull
40x0004EstimatedEndTimeepoch-s[CurrentArea]R (read: view)nullable, quiet reportingnull
50x0005Progresslist of ProgressStructPROGR (read: view)—empty

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 — SupportedAreas

Path example:

1/336/0

This attribute contains the list of areas that can be included in the SelectedAreas attribute's list. Each item in this list represents a unique area, as indicated by the AreaID field of AreaStruct. Each entry in this list has a unique value for the AreaID field. If the SupportedMaps attribute is not empty, each entry in this list has a unique value for the combination of the MapID and AreaInfo fields.

PropertyValue
Typelist of AreaStruct
ConformanceM
AccessR (read: view)
Constraintmax 255 entries
DefaultMS

Each entry is a AreaStruct (see Data Types).

Example:

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

Attribute 1 / 0x0001 — SupportedMaps

Path example:

1/336/1

This attribute contains the list of supported maps. A map is a full or a partial representation of a home, known to the device. For example: - a single level home may be represented using a single map - a two level home may be represented using two maps, one for each level - a single level home may be represented using two maps, each including a different set of rooms, such as "map of living room and kitchen" and "map of bedrooms and hallway" - a single level home may be represented using one map for the indoor areas (living room, bedrooms etc.) and one for the outdoor areas (garden, swimming pool etc.) Each map includes one or more areas - see the SupportedAreas attribute.

PropertyValue
Typelist of MapStruct
ConformanceMAPS
AccessR (read: view)
Constraintmax 255 entries
DefaultMS

Each entry is a MapStruct (see Data Types).

Example:

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

Attribute 2 / 0x0002 — SelectedAreas

Path example:

1/336/2

Indicates the set of areas where the device should attempt to operate. The mobile devices may travel without operating across any areas while attempting to reach the areas indicated by the SelectedAreas attribute. For example, a robotic vacuum cleaner may drive without cleaning when traveling without operating. If this attribute is empty, the device is not constrained to operate in any specific areas.

PropertyValue
Typelist of uint32
ConformanceM
AccessR (read: view)
Constraintdesc
Defaultempty

Example:

{
  "1/336/2": []
}

Attribute 3 / 0x0003 — CurrentArea

Path example:

1/336/3

If the device is mobile, this attribute indicates the area where the device is currently located, regardless of whether it is operating or not, such as while traveling between areas. If the device is not mobile and can operate at multiple areas sequentially, this attribute indicates the area which is currently being serviced, or the area which is currently traversed by the device. For example, a camera device may use this attribute to indicate which area it currently takes video of (serviced area) or which area it currently has in view but not taking video of (e.g. an area which is traversed while panning).

PropertyValue
Typeuint32
Conformancedesc
AccessR (read: view)
Qualitiesnullable
Constraintdesc
Defaultnull

Example:

{
  "1/336/3": 1
}

Attribute 4 / 0x0004 — EstimatedEndTime

Path example:

1/336/4

Indicates the estimated Epoch time for completing operating at the area indicated by the CurrentArea attribute, in seconds. A value of 0 means that the operation has completed. When this attribute is null, that represents that there is no time currently defined until operation completion. This may happen, for example, because no operation is in progress or because the completion time is unknown.

PropertyValue
Typeepoch-s
Conformance[CurrentArea]
AccessR (read: view)
Qualitiesnullable, quiet reporting
Defaultnull

Example:

{
  "1/336/4": 0
}

Attribute 5 / 0x0005 — Progress

Path example:

1/336/5

Indicates the operating status at one or more areas. Each entry in this list has a unique value for the AreaID field. For each entry in this list, the AreaID field must match an entry on the SupportedAreas attribute's list. When this attribute is empty, that represents that no progress information is currently available.

PropertyValue
Typelist of ProgressStruct
ConformancePROG
AccessR (read: view)
Constraintmax 255 entries
Defaultempty

Each entry is a ProgressStruct (see Data Types).

Example:

{
  "1/336/5": []
}

Cluster 336 Commands

Cluster 336 has 2 client-to-server commands and 2 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00SelectAreasclient → serverMSelectAreasResponseThis command is used to select a set of device areas, where the device is to operate.
10x01SelectAreasResponseserver → clientM—This command is sent by the device on receipt of the SelectAreas command.
20x02SkipAreaclient → server[CurrentArea | Progress]SkipAreaResponseThis command is used to skip the given area, and to attempt operating at other areas on the SupportedAreas attribute list.
30x03SkipAreaResponseserver → clientSkipArea—This command is sent by the device on receipt of the SkipArea command.

AcceptedCommandList

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

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

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

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

Purpose

This command is used to select a set of device areas, where the device is to operate. On receipt of this command the device must respond with a SelectAreasResponse command.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameSelectAreas
Directionclient → server
ConformanceM
ResponseSelectAreasResponse
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NewAreasnewAreaslist of uint32MdescThis field indicates which areas the device is to operate at.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 336,
    "command_name": "SelectAreas",
    "payload": {
      "newAreas": []
    }
  }
}

The device answers with SelectAreasResponse (see below).


Command: SelectAreasResponse

Purpose

This command is sent by the device on receipt of the SelectAreas command.

Command Identity

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

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0StatusstatusSelectAreasStatusM—If the Status field is set to Success or UnsupportedArea, the server may use a non-empty string for the StatusText field to provide additional information.
1StatusTextstatusTextstringMmax length 256—

Status values (SelectAreasStatus): 0 = Success, 1 = UnsupportedArea, 2 = InvalidInMode, 3 = InvalidSet


Command: SkipArea

Purpose

This command is used to skip the given area, and to attempt operating at other areas on the SupportedAreas attribute list. On receipt of this command the device must respond with a SkipAreaResponse command.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameSkipArea
Directionclient → server
Conformance[CurrentArea | Progress]
ResponseSkipAreaResponse
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0SkippedAreaskippedAreauint32MdescThe SkippedArea field indicates the area to be skipped. The SkippedArea field must match an entry in the SupportedAreas list.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 336,
    "command_name": "SkipArea",
    "payload": {
      "skippedArea": 1
    }
  }
}

The device answers with SkipAreaResponse (see below).


Command: SkipAreaResponse

Purpose

This command is sent by the device on receipt of the SkipArea command.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameSkipAreaResponse
Directionserver → client (response)
ConformanceSkipArea

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0StatusstatusSkipAreaStatusM—If the Status field is set to Success or InvalidAreaList, the server may use a non-empty string for the StatusText field to provide additional information.
1StatusTextstatusTextstringMmax length 256—

Status values (SkipAreaStatus): 0 = Success, 1 = InvalidAreaList, 2 = InvalidInMode, 3 = InvalidSkippedArea


Cluster 336 Events

Cluster 336 defines no events.


SmartphoneKey Notes

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