Matter Cluster 145 — Electrical Energy Measurement
Matter Cluster 145 (0x0091) Electrical Energy Measurement: attributes, commands, events, data types, shadow paths and bridge payload examples.
Matter Cluster 145 — Electrical Energy Measurement Cluster
Matter Cluster 145, also written as 0x0091, is the Electrical Energy Measurement Cluster.
This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server.
Cluster Identity
| Field | Value |
|---|---|
| Cluster ID decimal | 145 |
| Cluster ID hex | 0x0091 |
| Cluster name | Electrical Energy Measurement |
| Cluster revision (Matter 1.6.1) | 2 |
| Role | application |
| Scope | Endpoint |
| PICS code | EEM |
| Typical endpoint | 1 |
Revision history
| Revision | Change |
|---|---|
| 1 | Initial revision |
| 2 | Added support for apparent and reactive energy measurement |
Shadow Path Format
Cluster 145 values in the device shadow use this format:
endpoint_id / 145 / attribute_id
Example:
{
"1/145/0": {
"measurementType": 1,
"measured": true,
"minMeasuredValue": 1,
"maxMeasuredValue": 1
}
}
| Part | Meaning |
|---|---|
1 | Endpoint ID |
145 | Electrical Energy Measurement cluster |
0 | Accuracy attribute |
Cluster 145 Features
The FeatureMap attribute (1/145/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.
| Bit | Code | Feature | Conformance | Meaning |
|---|---|---|---|---|
| 0 | IMPE | ImportedEnergy | O | Measurement of energy imported by the server |
| 1 | EXPE | ExportedEnergy | O | Measurement of energy provided by the server |
| 2 | CUME | CumulativeEnergy | O | Measurements are cumulative |
| 3 | PERE | PeriodicEnergy | O | Measurements are periodic |
| 4 | APPE | ApparentEnergy | P, O | Measurements report apparent energy |
| 5 | REAE | ReactiveEnergy | P, O | Measurements report reactive energy |
Example: FeatureMap = 0 means no optional feature is enabled; 63 means every feature listed above is enabled.
Data Types
MeasurementTypeEnum
| Value | Name | Conformance | Meaning |
|---|---|---|---|
| 0 | Unspecified | M | — |
| 1 | Voltage | M | Voltage in millivolts (mV) |
| 2 | ActiveCurrent | M | Active current in milliamps (mA) |
| 3 | ReactiveCurrent | M | Reactive current in milliamps (mA) |
| 4 | ApparentCurrent | M | Apparent current in milliamps (mA) |
| 5 | ActivePower | M | Active power in milliwatts (mW) |
| 6 | ReactivePower | M | Reactive power in millivolt-amps reactive (mVAR) |
| 7 | ApparentPower | M | Apparent power in millivolt-amps (mVA) |
| 8 | RMSVoltage | M | Root mean squared voltage in millivolts (mV) |
| 9 | RMSCurrent | M | Root mean squared current in milliamps (mA) |
| 10 | RMSPower | M | Root mean squared power in milliwatts (mW) |
| 11 | Frequency | M | AC frequency in millihertz (mHz) |
| 12 | PowerFactor | M | Power Factor ratio in +/- 1/100ths of a percent. |
| 13 | NeutralCurrent | M | AC neutral current in milliamps (mA) |
| 14 | ElectricalEnergy | M | Electrical energy in milliwatt-hours (mWh) |
| 15 | ReactiveEnergy | M | Reactive power in millivolt-amp-hours reactive (mVARh) |
| 16 | ApparentEnergy | M | Apparent power in millivolt-amp-hours (mVAh) |
CumulativeEnergyResetStruct (struct)
This struct represents the times at which cumulative measurements were last zero, either due to initialization of the device, or an internal reset of the cumulative value.
| Field | Name | Type | Conformance | Constraint | Meaning |
|---|---|---|---|---|---|
| 0 | ImportedResetTimestamp | epoch-s (nullable) | [IMPE] | — | Indicates the timestamp in UTC when the value of the Energy field on the CumulativeEnergyImported attribute was most recently zero. |
| 1 | ExportedResetTimestamp | epoch-s (nullable) | [EXPE] | — | Indicates the timestamp in UTC when the value of the Energy field on the CumulativeEnergyExported attribute was most recently zero. |
| 2 | ImportedResetSystime | systime-ms (nullable) | [IMPE] | — | Indicates the time elapsed since boot when the value of the Energy field on the CumulativeEnergyImported attribute was most recently zero. |
| 3 | ExportedResetSystime | systime-ms (nullable) | [EXPE] | — | Indicates the time elapsed since boot when the value of the Energy field on the CumulativeEnergyExported attribute was most recently zero. |
EnergyMeasurementStruct (struct)
This struct indicates the amount of energy measured during a given measurement period. A server which does not have the ability to determine the time in UTC, or has not yet done so, must use the system time fields to specify the measurement period and observation times.
| Field | Name | Type | Conformance | Constraint | Meaning |
|---|---|---|---|---|---|
| 0 | Energy | energy-mWh | M | 0 to 4611686018427387904 | This field is the reported energy. |
| 1 | StartTimestamp | epoch-s | desc | — | Indicates the timestamp in UTC of the beginning of the period during which the value of the Energy field was measured. |
| 2 | EndTimestamp | epoch-s | desc | min compute | Indicates the timestamp in UTC of the end of the period during which the value of the Energy field was measured. |
| 3 | StartSystime | systime-ms | desc | — | Indicates the time elapsed since boot at the beginning of the period during which the value of the Energy field was measured. |
| 4 | EndSystime | systime-ms | desc | min compute | Indicates the time elapsed since boot at the end of the period during which the value of the Energy field was measured. |
| 5 | ApparentEnergy | energy-mVAh | P, APPE | 0 to 4611686018427387904 | Indicates the reported apparent energy. |
| 6 | ReactiveEnergy | energy-mVARh | P, REAE | 0 to 4611686018427387904 | This field is the reported reactive energy. |
MeasurementAccuracyRangeStruct (struct)
| Field | Name | Type | Conformance | Constraint | Meaning |
|---|---|---|---|---|---|
| 0 | RangeMin | int64 | M | -4611686018427387904 to 4611686018427387904 | — |
| 1 | RangeMax | int64 | M | -4611686018427387904 to 4611686018427387904 | — |
| 2 | PercentMax | percent100ths | O | — | — |
| 3 | PercentMin | percent100ths | [PercentMax] | max PercentTypical | — |
| 4 | PercentTypical | percent100ths | [PercentMin] | PercentMin to PercentMax | — |
| 5 | FixedMax | uint64 | O | max compute | — |
| 6 | FixedMin | uint64 | [FixedMax] | max FixedMax | — |
| 7 | FixedTypical | uint64 | [FixedMin] | FixedMin to FixedMax | — |
MeasurementAccuracyStruct (struct)
| Field | Name | Type | Conformance | Constraint | Meaning |
|---|---|---|---|---|---|
| 0 | MeasurementType | MeasurementTypeEnum | M | — | — |
| 1 | Measured | bool | M | — | — |
| 2 | MinMeasuredValue | int64 | M | -4611686018427387904 to 4611686018427387904 | — |
| 3 | MaxMeasuredValue | int64 | M | -4611686018427387904 to 4611686018427387904 | — |
| 4 | AccuracyRanges | list of MeasurementAccuracyRangeStruct | M | min 1 entries | — |
Cluster 145 Attributes
Cluster 145 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 …".
| ID | Hex | Attribute | Type | Conformance | Access | Qualities | Default |
|---|---|---|---|---|---|---|---|
| 0 | 0x0000 | Accuracy | MeasurementAccuracyStruct | M | R (read: view) | — | — |
| 1 | 0x0001 | CumulativeEnergyImported | EnergyMeasurementStruct | IMPE & CUME | R (read: view) | nullable, quiet reporting | — |
| 2 | 0x0002 | CumulativeEnergyExported | EnergyMeasurementStruct | EXPE & CUME | R (read: view) | nullable, quiet reporting | — |
| 3 | 0x0003 | PeriodicEnergyImported | EnergyMeasurementStruct | IMPE & PERE | R (read: view) | nullable, quiet reporting | — |
| 4 | 0x0004 | PeriodicEnergyExported | EnergyMeasurementStruct | EXPE & PERE | R (read: view) | nullable, quiet reporting | — |
| 5 | 0x0005 | CumulativeEnergyReset | CumulativeEnergyResetStruct | [CUME] | R (read: view) | nullable | null |
Global attributes
| ID | Hex | Attribute | Meaning |
|---|---|---|---|
| 65528 | 0xFFF8 | GeneratedCommandList | Response command IDs this server generates. |
| 65529 | 0xFFF9 | AcceptedCommandList | Command IDs this server accepts. |
| 65531 | 0xFFFB | AttributeList | Attribute IDs implemented. |
| 65532 | 0xFFFC | FeatureMap | Implemented optional features (see above). |
| 65533 | 0xFFFD | ClusterRevision | Cluster revision implemented; 2 for a Matter 1.6.1 device. |
Attribute Details
Attribute 0 / 0x0000 — Accuracy
Path example:
1/145/0
Indicates the accuracy of energy measurement by this server. The value of the MeasurementType field on this MeasurementAccuracyStruct is ElectricalEnergy.
| Property | Value |
|---|---|
| Type | MeasurementAccuracyStruct |
| Conformance | M |
| Access | R (read: view) |
Value is a MeasurementAccuracyStruct struct (see Data Types).
Example:
{
"1/145/0": {
"measurementType": 1,
"measured": true,
"minMeasuredValue": 1,
"maxMeasuredValue": 1
}
}
Attribute 1 / 0x0001 — CumulativeEnergyImported
Path example:
1/145/1
Indicates the most recent measurement of cumulative energy imported by the server over the lifetime of the device, and the timestamp of when the measurement was recorded. The reporting interval of this attribute is manufacturer dependent. The server may choose to omit publication of deltas considered not meaningful. The server must NOT mark this attribute ready for report if the last time this was done was more recently than 1 second ago.
| Property | Value |
|---|---|
| Type | EnergyMeasurementStruct |
| Conformance | IMPE & CUME |
| Access | R (read: view) |
| Qualities | nullable, quiet reporting |
Value is a EnergyMeasurementStruct struct (see Data Types).
Example:
{
"1/145/1": {
"energy": 1,
"startTimestamp": 0,
"endTimestamp": 0,
"startSystime": 0
}
}
Attribute 2 / 0x0002 — CumulativeEnergyExported
Path example:
1/145/2
Indicates the most recent measurement of cumulative energy exported by the server over the lifetime of the device, and the timestamp of when the measurement was recorded. The reporting interval of this attribute is manufacturer dependent. The server may choose to omit publication of deltas considered not meaningful. The server must NOT mark this attribute ready for report if the last time this was done was more recently than 1 second ago.
| Property | Value |
|---|---|
| Type | EnergyMeasurementStruct |
| Conformance | EXPE & CUME |
| Access | R (read: view) |
| Qualities | nullable, quiet reporting |
Value is a EnergyMeasurementStruct struct (see Data Types).
Example:
{
"1/145/2": {
"energy": 1,
"startTimestamp": 0,
"endTimestamp": 0,
"startSystime": 0
}
}
Attribute 3 / 0x0003 — PeriodicEnergyImported
Path example:
1/145/3
Indicates the most recent measurement of energy imported by the server and the period during which it was measured. The reporting interval of this attribute is manufacturer dependent. The server may choose to omit publication of deltas considered not meaningful. The server must NOT mark this attribute ready for report if the last time this was done was more recently than 1 second ago.
| Property | Value |
|---|---|
| Type | EnergyMeasurementStruct |
| Conformance | IMPE & PERE |
| Access | R (read: view) |
| Qualities | nullable, quiet reporting |
Value is a EnergyMeasurementStruct struct (see Data Types).
Example:
{
"1/145/3": {
"energy": 1,
"startTimestamp": 0,
"endTimestamp": 0,
"startSystime": 0
}
}
Attribute 4 / 0x0004 — PeriodicEnergyExported
Path example:
1/145/4
Indicates the most recent measurement of energy exported by the server and the period during which it was measured. The reporting interval of this attribute is manufacturer dependent. The server may choose to omit publication of deltas considered not meaningful. The server must NOT mark this attribute ready for report if the last time this was done was more recently than 1 second ago.
| Property | Value |
|---|---|
| Type | EnergyMeasurementStruct |
| Conformance | EXPE & PERE |
| Access | R (read: view) |
| Qualities | nullable, quiet reporting |
Value is a EnergyMeasurementStruct struct (see Data Types).
Example:
{
"1/145/4": {
"energy": 1,
"startTimestamp": 0,
"endTimestamp": 0,
"startSystime": 0
}
}
Attribute 5 / 0x0005 — CumulativeEnergyReset
Path example:
1/145/5
Indicates when cumulative measurements were most recently zero.
| Property | Value |
|---|---|
| Type | CumulativeEnergyResetStruct |
| Conformance | [CUME] |
| Access | R (read: view) |
| Qualities | nullable |
| Default | null |
Value is a CumulativeEnergyResetStruct struct (see Data Types).
Example:
{
"1/145/5": {
"importedResetTimestamp": 0,
"exportedResetTimestamp": 0,
"importedResetSystime": 0,
"exportedResetSystime": 0
}
}
Cluster 145 Commands
Cluster 145 defines no commands. It is read (and, for writable attributes, written) through attribute access only.
Cluster 145 Events
| ID | Hex | Event | Priority | Conformance | Description |
|---|---|---|---|---|---|
| 0 | 0x00 | CumulativeEnergyMeasured | info | CUME | This event is generated when the server takes a snapshot of the cumulative energy imported by the server, exported from the server, or both, but not more frequently than the rate mentioned in the … |
| 1 | 0x01 | PeriodicEnergyMeasured | info | PERE | This event is generated when the server reaches the end of a reporting period for imported energy, exported energy, or both. |
Event 0 — CumulativeEnergyMeasured
This event is generated when the server takes a snapshot of the cumulative energy imported by the server, exported from the server, or both, but not more frequently than the rate mentioned in the description above of the related attribute.
| ID | Field | Type | Conformance | Meaning |
|---|---|---|---|---|
| 0 | EnergyImported | EnergyMeasurementStruct | CUME & IMPE | This field is the value of CumulativeEnergyImported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both. |
| 1 | EnergyExported | EnergyMeasurementStruct | CUME & EXPE | This field is the value of CumulativeEnergyExported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both. |
Event 1 — PeriodicEnergyMeasured
This event is generated when the server reaches the end of a reporting period for imported energy, exported energy, or both.
| ID | Field | Type | Conformance | Meaning |
|---|---|---|---|---|
| 0 | EnergyImported | EnergyMeasurementStruct | PERE & IMPE | This field is the value of PeriodicEnergyImported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both. |
| 1 | EnergyExported | EnergyMeasurementStruct | PERE & EXPE | This field is the value of PeriodicEnergyExported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both. |
SmartphoneKey Notes
- Cluster 145 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/145/attribute; attribute values that the device reports as unreadable are written asn/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.