Energy and metering149 — Commodity Price

Matter Cluster 149 — Commodity Price

Matter Cluster 149 (0x0095) Commodity Price: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 149 — Commodity Price Cluster

Matter Cluster 149, also written as 0x0095, is the Commodity Price Cluster. The Commodity Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises.

Cluster Identity

FieldValue
Cluster ID decimal149
Cluster ID hex0x0095
Cluster nameCommodity Price
Cluster revision (Matter 1.6.1)4
Roleapplication
ScopeEndpoint
PICS codeSEPR
Typical endpoint1

Revision history

RevisionChange
1Mandatory global ClusterRevision attribute added
2Updated from SE1.4 version; CCB 1447 2964 2965
3CCBs 2043 2706 2810 2912 3566
4Initial Matter revision

Shadow Path Format

Cluster 149 values in the device shadow use this format:

endpoint_id / 149 / attribute_id

Example:

{
  "1/149/0": 0
}
PartMeaning
1Endpoint ID
149Commodity Price cluster
0TariffUnit attribute

Cluster 149 Features

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

BitCodeFeatureConformanceMeaning
0FOREForecastingOForecasts upcoming pricing

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


Data Types

CommodityPriceDetailBitmap (bitmap)

BitNameConformanceMeaning
0DescriptionMA textual description of a price; e.g. the name of a rate plan.
1ComponentsMA breakdown of the component parts of a price; e.g. generation, delivery, etc.

CommodityPriceComponentStruct (struct)

This represents a component of a given price; it is only used in the Components field.

FieldNameTypeConformanceConstraintMeaning
0PricemoneyM—Indicates the component price of the commodity per TariffUnit, with the currency indicated by the currency of the Price field of the parent CommodityPriceStruct.
1SourceTariffPriceTypeEnumM—Indicates the source of the price component.
2DescriptionstringOmax length 32Indicates a description of the pricing plan yielding the value of the Price field.
3TariffComponentIDuint32O——

CommodityPriceStruct (struct)

This represents a price over a given period.

FieldNameTypeConformanceConstraintMeaning
0PeriodStartepoch-sM—Indicates the beginning timestamp in UTC of the period covered by the price indicated in the Price field, or the price level indicated in the Price Level field, or both.
1PeriodEndepoch-s (nullable)Mmin computeIndicates the ending timestamp in UTC of the period covered by the price indicated in the Price field, or the price level indicated in the Price Level field, or both.
2PricemoneyO—Indicates the price of the commodity per TariffUnit.
3PriceLevelint16O—Indicates the tariff price level.
4DescriptionstringOmax length 32Indicates a description of the pricing plan yielding the value of the Price field, or the Price Level field.
5Componentslist of CommodityPriceComponentStruct[Price]max 10 entriesIndicates a list of the components that comprise the value in the Price field.

Cluster 149 Attributes

Cluster 149 defines 4 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
00x0000TariffUnitTariffUnitEnumMR (read: view)——
10x0001CurrencyCurrencyStructMR (read: view)nullable—
20x0002CurrentPriceCommodityPriceStructMR (read: view)nullable—
30x0003PriceForecastlist of CommodityPriceStructFORER (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 — TariffUnit

Path example:

1/149/0

Indicates the unit of measure for all pricing reported by this cluster.

PropertyValue
TypeTariffUnitEnum
ConformanceM
AccessR (read: view)

Example:

{
  "1/149/0": 0
}

Attribute 1 / 0x0001 — Currency

Path example:

1/149/1

Indicates the currency for all pricing reported by this cluster. If the current currency is unknown, or cannot be determined, the value is null.

PropertyValue
TypeCurrencyStruct
ConformanceM
AccessR (read: view)
Qualitiesnullable

Example:

{
  "1/149/1": 0
}

Attribute 2 / 0x0002 — CurrentPrice

Path example:

1/149/2

Indicates the current price. If the current price is unknown, or cannot be determined, the value is null. The Description and Components fields is omitted in this attribute's value.

PropertyValue
TypeCommodityPriceStruct
ConformanceM
AccessR (read: view)
Qualitiesnullable

Value is a CommodityPriceStruct struct (see Data Types).

Example:

{
  "1/149/2": {
    "periodStart": 1,
    "periodEnd": 1,
    "price": 1,
    "priceLevel": 100
  }
}

Attribute 3 / 0x0003 — PriceForecast

Path example:

1/149/3

Indicates the forecast of upcoming price changes. If the forecast is unable to be determined, this list is empty. The list entries is in time order: - All entries except the last one has a non-null PeriodEnd. - For all entries except the first one, PeriodStart is greater than the previous entry's PeriodEnd. The Description and Components fields is omitted from CommodityPriceStructs in this attribute's value.

PropertyValue
Typelist of CommodityPriceStruct
ConformanceFORE
AccessR (read: view)
Constraintmax 56 entries

Each entry is a CommodityPriceStruct (see Data Types).

Example:

{
  "1/149/3": []
}

Cluster 149 Commands

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

IDHexCommandDirectionConformanceResponseDescription
00x00GetDetailedPriceRequestclient → serverOGetDetailedPriceResponseOn receipt, this must generate a GetDetailedPrice Response command.
10x01GetDetailedPriceResponseserver → clientGetDetailedPriceRequest—This command is generated in response to a GetDetailedPrice Request command.
20x02GetDetailedForecastRequestclient → server[FORE]GetDetailedForecastResponseOn receipt, this must generate a GetDetailedForecast Response command.
30x03GetDetailedForecastResponseserver → clientGetDetailedForecastRequest—This command is generated in response to a GetDetailedForecast Request command.

AcceptedCommandList

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

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

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

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

Purpose

On receipt, this must generate a GetDetailedPrice Response command.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameGetDetailedPriceRequest
Directionclient → server
ConformanceO
ResponseGetDetailedPriceResponse
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0DetailsdetailsCommodityPriceDetailBitmapM—Indicates which fields on the CommodityPriceStruct in the GetDetailedPriceResponseCurrentPrice field will be included.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 149,
    "command_name": "GetDetailedPriceRequest",
    "payload": {
      "details": 0
    }
  }
}

The device answers with GetDetailedPriceResponse (see below).


Command: GetDetailedPriceResponse

Purpose

This command is generated in response to a GetDetailedPrice Request command.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameGetDetailedPriceResponse
Directionserver → client (response)
ConformanceGetDetailedPriceRequest

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0CurrentPricecurrentPriceCommodityPriceStruct (nullable)M—Indicates the current price. Unlike the value returned from the CurrentPrice attribute, the Description and Components fields may be populated based on the value of the GetDetailedPriceRequestDetails field.

Command: GetDetailedForecastRequest

Purpose

On receipt, this must generate a GetDetailedForecast Response command.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameGetDetailedForecastRequest
Directionclient → server
Conformance[FORE]
ResponseGetDetailedForecastResponse
Access(invoke: operate)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0DetailsdetailsCommodityPriceDetailBitmapM—Indicates which fields on the CommodityPriceStructs in the GetDetailedForecastResponsePriceForecast field will be included.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 149,
    "command_name": "GetDetailedForecastRequest",
    "payload": {
      "details": 0
    }
  }
}

The device answers with GetDetailedForecastResponse (see below).


Command: GetDetailedForecastResponse

Purpose

This command is generated in response to a GetDetailedForecast Request command.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameGetDetailedForecastResponse
Directionserver → client (response)
ConformanceGetDetailedForecastRequest

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0PriceForecastpriceForecastlist of CommodityPriceStructMmax 56 entriesIndicates the current forecast of upcoming price changes.

Cluster 149 Events

IDHexEventPriorityConformanceDescription
00x00PriceChangeinfoOThis event is generated when the value of the CurrentPrice attribute changes.

Event 0 — PriceChange

This event is generated when the value of the CurrentPrice attribute changes.

IDFieldTypeConformanceMeaning
0CurrentPriceCommodityPriceStruct (nullable)MThis field is the new value of the CurrentPrice attribute.

SmartphoneKey Notes

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