ElectricalPowerMeasurement Cluster
Cluster ID: 0x0090 |
Endpoint: Electrical device function endpoint
ElectricalPowerMeasurement is used for real-time measurement of electrical power parameters — voltage, current, active power, reactive power, apparent power, frequency, power factor, and more. It is a core measurement Cluster in the Matter energy management ecosystem, suitable for smart plugs, power meters, EV chargers, power monitoring panels, and other devices requiring precise electrical data.
All voltage values are in mV (millivolts), current in mA (milliamps), power in mW (milliwatts), and frequency in mHz (millihertz).
A device returning 220300 for voltage actually means 220.3 V; returning 334856 for power actually means 334.856 W.
You must divide by 1000 when displaying values, otherwise users will see absurdly large numbers.
This Cluster uses the Feature bitmap to distinguish between DC (DIRC) and AC (ALTC) scenarios. Attributes such as ReactiveCurrent, ApparentCurrent, ReactivePower, ApparentPower, the RMS series, Frequency, and PowerFactor are only available when the ALTC (alternating current) feature is enabled. DC devices (such as solar panels, batteries) only report basic attributes like Voltage, ActiveCurrent, and ActivePower.
Attributes
ElectricalPowerMeasurement has 19 application-level attributes, organized into four groups: basic information, real-time measurements, RMS measurements, and harmonics data. Click an attribute ID to jump to the detailed description for its group.
| ID | Name | Type | Group | Required Feature |
|---|---|---|---|---|
0x0000 |
PowerMode | PowerModeEnum | Basic Info | None |
0x0001 |
NumberOfMeasurementTypes | uint8 | Basic Info | None |
0x0002 |
Accuracy | list<MeasurementAccuracyStruct> | Basic Info | None |
0x0003 |
Ranges | list<MeasurementRangeStruct> | Basic Info | None |
0x0004 |
Voltage | int64 (mV) | Real-time | None |
0x0005 |
ActiveCurrent | int64 (mA) | Real-time | None |
0x0006 |
ReactiveCurrent | int64 (mA) | Real-time | ALTC |
0x0007 |
ApparentCurrent | int64 (mA) | Real-time | ALTC |
0x0008 |
ActivePower | int64 (mW) | Real-time | None |
0x0009 |
ReactivePower | int64 (mW) | Real-time | ALTC |
0x000A |
ApparentPower | int64 (mW) | Real-time | ALTC |
0x000B |
RMSVoltage | int64 (mV) | RMS | ALTC |
0x000C |
RMSCurrent | int64 (mA) | RMS | ALTC |
0x000D |
RMSPower | int64 (mW) | RMS | ALTC |
0x000E |
Frequency | int64 (mHz) | RMS | ALTC |
0x000F |
HarmonicCurrents | list<HarmonicMeasurementStruct> | Harmonics & Supplementary | HARM |
0x0010 |
HarmonicPhases | list<HarmonicMeasurementStruct> | Harmonics & Supplementary | HARM |
0x0011 |
PowerFactor | int64 | Harmonics & Supplementary | ALTC |
0x0012 |
NeutralCurrent | int64 (mA) | Harmonics & Supplementary | POLY |
Basic Information (0x0000 ~ 0x0003)
Describes the device's power mode, number of supported measurement types, accuracy declarations, and historical measurement ranges.
| ID | Name | Type | Description |
|---|---|---|---|
0x0000 |
PowerMode | PowerModeEnum | The device's power supply type: Unknown / DC / AC (see enum below). Mandatory |
0x0001 |
NumberOfMeasurementTypes | uint8 | Total number of measurement types supported by the device, corresponding to the length of the Accuracy list. Mandatory |
0x0002 |
Accuracy | list<MeasurementAccuracyStruct> | Lists each measurement type the device supports along with its accuracy range. Each element contains MeasurementType, whether it is measured, accuracy intervals, etc. Mandatory |
0x0003 |
Ranges | list<MeasurementRangeStruct> | Statistics of min/max values and start/end timestamps recorded over a period of time for each measurement type. Optional |
The Accuracy attribute tells you what the device can measure and how precisely. The app should read this attribute first,
then decide which measurement values to display. If a measurement type is not in the Accuracy list, the corresponding attribute should not be used even if it exists.
Real-time Measurements (0x0004 ~ 0x000A)
Instantaneous voltage, current, and power values from the device. All values are Nullable — a null return means the data is currently invalid.
| ID | Name | Unit | Description |
|---|---|---|---|
0x0004 |
Voltage | mV | Instantaneous voltage. 220300 = 220.3 V. Optional, Nullable |
0x0005 |
ActiveCurrent | mA | Instantaneous active current. 1520 = 1.52 A. Optional, Nullable |
0x0006 |
ReactiveCurrent | mA | Instantaneous reactive current. AC devices only. Requires ALTC, Nullable |
0x0007 |
ApparentCurrent | mA | Instantaneous apparent current (vector sum of active + reactive). Requires ALTC, Nullable |
0x0008 |
ActivePower | mW | Instantaneous active power (the portion that performs actual work). 334856 = 334.856 W. Mandatory, Nullable |
0x0009 |
ReactivePower | mW | Instantaneous reactive power (the portion that does no effective work). Actual unit is mVAR. Requires ALTC, Nullable |
0x000A |
ApparentPower | mW | Instantaneous apparent power (total of active + reactive). Actual unit is mVA. Requires ALTC, Nullable |
Active Power = the actual energy consumed, what you pay for on your electricity bill.
Reactive Power = the "back and forth" caused by inductors/capacitors; does no effective work but occupies line capacity.
Apparent Power = the vector sum of both, representing the total load capacity of the line.
Relationship: ApparentPower² = ActivePower² + ReactivePower²
RMS Measurements (0x000B ~ 0x000E)
RMS (Root Mean Square) measurements for AC power — the effective values of alternating current. For a pure sine wave, RMS value = peak value / √2. All attributes in this group require the ALTC feature.
| ID | Name | Unit | Description |
|---|---|---|---|
0x000B |
RMSVoltage | mV | AC voltage effective value. Household 220V corresponds to approximately 220000. Nullable |
0x000C |
RMSCurrent | mA | AC current effective value. Nullable |
0x000D |
RMSPower | mW | AC power effective value. Nullable |
0x000E |
Frequency | mHz | AC frequency. 50000 = 50.0 Hz (e.g. Europe/China), 60000 = 60.0 Hz (e.g. US/Japan). Nullable |
Harmonics & Supplementary Attributes (0x000F ~ 0x0012)
Harmonic analysis data, power factor, and neutral current. Harmonic attributes require the HARM feature, power factor requires ALTC, and neutral current requires POLY.
| ID | Name | Required Feature | Description |
|---|---|---|---|
0x000F |
HarmonicCurrents | HARM | List of current amplitudes for each harmonic order (HarmonicMeasurementStruct), used for power quality analysis. Nullable |
0x0010 |
HarmonicPhases | HARM | List of phase angles for each harmonic order (HarmonicMeasurementStruct). Nullable |
0x0011 |
PowerFactor | ALTC | Ratio of active power to apparent power, expressed as percentage multiplied by 100. 9960 = 99.60%. Range: -10000 ~ 10000. Nullable |
0x0012 |
NeutralCurrent | POLY | Current in the neutral wire of a polyphase system. This value is significant when three-phase loads are unbalanced. Nullable |
Power factor = active power / apparent power. The closer to 100% (i.e. 10000), the higher the energy utilization efficiency. Pure resistive loads (electric kettles) are close to 100%, while devices with motors (air conditioners, refrigerators) typically range from 80% to 95%. A negative value indicates the device is feeding energy back to the grid (e.g. a solar inverter).
Enum Definitions
PowerModeEnum (Power Mode)
MeasurementTypeEnum (Measurement Type)
Used in Accuracy and Ranges to identify the specific measurement type:
Events
ElectricalPowerMeasurement defines one event, used for periodically reporting the statistical range of each measurement type over a time period. This is the primary way to obtain historical peak and valley data.
MeasurementPeriodRanges
Priority: INFO | Trigger: Automatically reported when the device completes a measurement period
The event contains a Ranges field of type list<MeasurementRangeStruct>,
where each element records the minimum value, maximum value, start/end timestamps, and other statistics for a measurement type within that period.
Both the attribute Ranges (0x0003) and the event MeasurementPeriodRanges contain MeasurementRangeStruct lists,
but they serve different purposes: the attribute records cumulative ranges (overall extremes since the device started running),
while the event reports per-period ranges (extremes within the most recent time window). Apps should subscribe to the event to build historical trend charts.
Feature Bitmap
ElectricalPowerMeasurement declares the device's electrical measurement capabilities through FeatureMap (0xFFFC).
Different Feature combinations determine which attributes are available:
A device is either DC (DIRC) or AC (ALTC) — it cannot declare both. POLY and HARM only take effect on top of ALTC. After reading the FeatureMap, apps should decide which attributes to display accordingly — do not request RMS data from DC devices.
Commands
ElectricalPowerMeasurement is a read-only Server Cluster with no commands. The device is responsible for collecting electrical data and updating attributes; the app only needs to Read or Subscribe to obtain data.
Example Data
Electrical data reported by a smart plug with the ALTC (AC) feature enabled:
{
// --- ElectricalPowerMeasurement Cluster (Endpoint 1) ---
// --- Basic Information ---
"0x0000": 2, // PowerMode = AC (Alternating Current)
"0x0001": 5, // NumberOfMeasurementTypes = 5
// --- Real-time Measurements ---
"0x0004": 220300, // Voltage = 220300 mV → 220.3 V
"0x0005": 1520, // ActiveCurrent = 1520 mA → 1.52 A
"0x0008": 334856, // ActivePower = 334856 mW → 334.856 W
"0x0009": 28700, // ReactivePower = 28700 mW → 28.7 VAR
"0x000A": 336100, // ApparentPower = 336100 mW → 336.1 VA
// --- RMS Measurements (AC only) ---
"0x000B": 219800, // RMSVoltage = 219800 mV → 219.8 V
"0x000C": 1530, // RMSCurrent = 1530 mA → 1.53 A
"0x000D": 335200, // RMSPower = 335200 mW → 335.2 W
"0x000E": 50000, // Frequency = 50000 mHz → 50.0 Hz
// --- Power Factor ---
"0x0011": 9960 // PowerFactor = 9960 → 99.60%
}
MeasurementPeriodRanges event example — voltage and power range statistics over a 1-hour period:
{
// MeasurementPeriodRanges Event
// Reported when the device completes a measurement period, containing statistical ranges for each measurement type
"MeasurementPeriodRanges": {
"Ranges": [
{
"MeasurementType": 1, // Voltage
"Min": 218500, // Minimum 218.5 V
"Max": 222100, // Maximum 222.1 V
"StartTimestamp": 1695600000,
"EndTimestamp": 1695603600
},
{
"MeasurementType": 5, // ActivePower
"Min": 280000, // Minimum 280.0 W
"Max": 350000, // Maximum 350.0 W
"StartTimestamp": 1695600000,
"EndTimestamp": 1695603600
}
]
}
}
Key logic for processing device return values:
{`// Device return values (int64, Nullable)
val voltageRaw: Long? = 220300 // mV
val powerRaw: Long? = 334856 // mW
val freqRaw: Long? = 50000 // mHz
val pfRaw: Long? = 9960 // percentage x 100
// Convert to human-readable values
val voltageV = voltageRaw?.let { it / 1000.0 } // → 220.3 V
val powerW = powerRaw?.let { it / 1000.0 } // → 334.856 W
val freqHz = freqRaw?.let { it / 1000.0 } // → 50.0 Hz
val powerFactor = pfRaw?.let { it / 100.0 } // → 99.60%
// Handle null when displaying
val display = voltageV?.let { String.format("%.1f V", it) } ?: "--"`}
Common Scenarios
Scenario 1: Smart Plug Real-time Power Monitoring Dashboard
- Read
FeatureMap (0xFFFC)to confirm the device supports ALTC (AC) - Read
Accuracy (0x0002)to determine which measurement types the device supports and their precision - Subscribe to core attributes:
ActivePower (0x0008),RMSVoltage (0x000B),RMSCurrent (0x000C), with a reasonable reporting interval (e.g. 5 to 30 seconds) - Display on the UI: Voltage 220.3 V, Current 1.52 A, Power 334.9 W, Power Factor 99.6%
- Optional: Subscribe to the
MeasurementPeriodRangesevent to record historical peaks for trend charts - Handle
nullvalues — display "--" instead of 0, since 0 and "no data" have different meanings
Scenario 2: Home Power Consumption Anomaly Alerts
- Subscribe to
ActivePower (0x0008)andRMSCurrent (0x000C)for continuous monitoring - Set alert thresholds: trigger when power exceeds 2200 W (10A × 220V) or current exceeds 10000 mA
- Use the precision values in
Accuracyfor debouncing — if precision is ±5%, leave margin around the threshold - Send push notifications when alerts trigger; in severe cases, link to the OnOff Cluster for automatic power cutoff protection
- Optional: Monitor
PowerFactor (0x0011); a sustained power factor below 70% may indicate device malfunction