Energy and metering145 — Electrical Energy Measurement

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

FieldValue
Cluster ID decimal145
Cluster ID hex0x0091
Cluster nameElectrical Energy Measurement
Cluster revision (Matter 1.6.1)2
Roleapplication
ScopeEndpoint
PICS codeEEM
Typical endpoint1

Revision history

RevisionChange
1Initial revision
2Added 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
  }
}
PartMeaning
1Endpoint ID
145Electrical Energy Measurement cluster
0Accuracy 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.

BitCodeFeatureConformanceMeaning
0IMPEImportedEnergyOMeasurement of energy imported by the server
1EXPEExportedEnergyOMeasurement of energy provided by the server
2CUMECumulativeEnergyOMeasurements are cumulative
3PEREPeriodicEnergyOMeasurements are periodic
4APPEApparentEnergyP, OMeasurements report apparent energy
5REAEReactiveEnergyP, OMeasurements report reactive energy

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


Data Types

MeasurementTypeEnum

ValueNameConformanceMeaning
0UnspecifiedM—
1VoltageMVoltage in millivolts (mV)
2ActiveCurrentMActive current in milliamps (mA)
3ReactiveCurrentMReactive current in milliamps (mA)
4ApparentCurrentMApparent current in milliamps (mA)
5ActivePowerMActive power in milliwatts (mW)
6ReactivePowerMReactive power in millivolt-amps reactive (mVAR)
7ApparentPowerMApparent power in millivolt-amps (mVA)
8RMSVoltageMRoot mean squared voltage in millivolts (mV)
9RMSCurrentMRoot mean squared current in milliamps (mA)
10RMSPowerMRoot mean squared power in milliwatts (mW)
11FrequencyMAC frequency in millihertz (mHz)
12PowerFactorMPower Factor ratio in +/- 1/100ths of a percent.
13NeutralCurrentMAC neutral current in milliamps (mA)
14ElectricalEnergyMElectrical energy in milliwatt-hours (mWh)
15ReactiveEnergyMReactive power in millivolt-amp-hours reactive (mVARh)
16ApparentEnergyMApparent 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.

FieldNameTypeConformanceConstraintMeaning
0ImportedResetTimestampepoch-s (nullable)[IMPE]—Indicates the timestamp in UTC when the value of the Energy field on the CumulativeEnergyImported attribute was most recently zero.
1ExportedResetTimestampepoch-s (nullable)[EXPE]—Indicates the timestamp in UTC when the value of the Energy field on the CumulativeEnergyExported attribute was most recently zero.
2ImportedResetSystimesystime-ms (nullable)[IMPE]—Indicates the time elapsed since boot when the value of the Energy field on the CumulativeEnergyImported attribute was most recently zero.
3ExportedResetSystimesystime-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.

FieldNameTypeConformanceConstraintMeaning
0Energyenergy-mWhM0 to 4611686018427387904This field is the reported energy.
1StartTimestampepoch-sdesc—Indicates the timestamp in UTC of the beginning of the period during which the value of the Energy field was measured.
2EndTimestampepoch-sdescmin computeIndicates the timestamp in UTC of the end of the period during which the value of the Energy field was measured.
3StartSystimesystime-msdesc—Indicates the time elapsed since boot at the beginning of the period during which the value of the Energy field was measured.
4EndSystimesystime-msdescmin computeIndicates the time elapsed since boot at the end of the period during which the value of the Energy field was measured.
5ApparentEnergyenergy-mVAhP, APPE0 to 4611686018427387904Indicates the reported apparent energy.
6ReactiveEnergyenergy-mVARhP, REAE0 to 4611686018427387904This field is the reported reactive energy.

MeasurementAccuracyRangeStruct (struct)

FieldNameTypeConformanceConstraintMeaning
0RangeMinint64M-4611686018427387904 to 4611686018427387904—
1RangeMaxint64M-4611686018427387904 to 4611686018427387904—
2PercentMaxpercent100thsO——
3PercentMinpercent100ths[PercentMax]max PercentTypical—
4PercentTypicalpercent100ths[PercentMin]PercentMin to PercentMax—
5FixedMaxuint64Omax compute—
6FixedMinuint64[FixedMax]max FixedMax—
7FixedTypicaluint64[FixedMin]FixedMin to FixedMax—

MeasurementAccuracyStruct (struct)

FieldNameTypeConformanceConstraintMeaning
0MeasurementTypeMeasurementTypeEnumM——
1MeasuredboolM——
2MinMeasuredValueint64M-4611686018427387904 to 4611686018427387904—
3MaxMeasuredValueint64M-4611686018427387904 to 4611686018427387904—
4AccuracyRangeslist of MeasurementAccuracyRangeStructMmin 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 …".

IDHexAttributeTypeConformanceAccessQualitiesDefault
00x0000AccuracyMeasurementAccuracyStructMR (read: view)——
10x0001CumulativeEnergyImportedEnergyMeasurementStructIMPE & CUMER (read: view)nullable, quiet reporting—
20x0002CumulativeEnergyExportedEnergyMeasurementStructEXPE & CUMER (read: view)nullable, quiet reporting—
30x0003PeriodicEnergyImportedEnergyMeasurementStructIMPE & PERER (read: view)nullable, quiet reporting—
40x0004PeriodicEnergyExportedEnergyMeasurementStructEXPE & PERER (read: view)nullable, quiet reporting—
50x0005CumulativeEnergyResetCumulativeEnergyResetStruct[CUME]R (read: view)nullablenull

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

PropertyValue
TypeMeasurementAccuracyStruct
ConformanceM
AccessR (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.

PropertyValue
TypeEnergyMeasurementStruct
ConformanceIMPE & CUME
AccessR (read: view)
Qualitiesnullable, 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.

PropertyValue
TypeEnergyMeasurementStruct
ConformanceEXPE & CUME
AccessR (read: view)
Qualitiesnullable, 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.

PropertyValue
TypeEnergyMeasurementStruct
ConformanceIMPE & PERE
AccessR (read: view)
Qualitiesnullable, 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.

PropertyValue
TypeEnergyMeasurementStruct
ConformanceEXPE & PERE
AccessR (read: view)
Qualitiesnullable, 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.

PropertyValue
TypeCumulativeEnergyResetStruct
Conformance[CUME]
AccessR (read: view)
Qualitiesnullable
Defaultnull

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

IDHexEventPriorityConformanceDescription
00x00CumulativeEnergyMeasuredinfoCUMEThis 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 …
10x01PeriodicEnergyMeasuredinfoPEREThis 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.

IDFieldTypeConformanceMeaning
0EnergyImportedEnergyMeasurementStructCUME & IMPEThis field is the value of CumulativeEnergyImported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both.
1EnergyExportedEnergyMeasurementStructCUME & EXPEThis 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.

IDFieldTypeConformanceMeaning
0EnergyImportedEnergyMeasurementStructPERE & IMPEThis field is the value of PeriodicEnergyImported attribute at the timestamp indicated in its EndTimestamp field, EndSystime field, or both.
1EnergyExportedEnergyMeasurementStructPERE & EXPEThis 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 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.