DeviceEnergyManagement Cluster
Cluster ID: 0x0098 |
Endpoint: Device endpoint with energy management capabilities
DeviceEnergyManagement (DEM) is a core energy management Cluster introduced in Matter 1.4, enabling Energy Management Systems (EMS) to negotiate power adjustments, forecast energy usage plans, and optimize energy consumption with various energy-consuming or generating devices. It applies to EV chargers (EVSE), heat pumps, battery storage, solar systems, dishwashers, washing machines, and other ESA (Energy Smart Appliance) devices.
ESA is a core concept in the Matter energy management ecosystem, referring to smart devices with energy awareness and management capabilities.
Each ESA identifies its device category via ESAType, reports its current state via ESAState,
and declares its energy usage plan to the EMS through Forecast. The EMS uses this information to issue power adjustments, time adjustments, and other optimization commands.
All power attributes in the DeviceEnergyManagement Cluster are in milliwatts (mW).
For example, AbsMaxPower = 7200000 means a maximum power of 7.2 kW (7200 W).
Always perform unit conversion when reading or writing power attributes.
Commands
DeviceEnergyManagement Cluster has 8 commands, each corresponding to different Feature capabilities. The EMS (Energy Management System) uses these commands to adjust the device's power, start time, operating state, and energy forecast. Click a command ID in the table below to jump to its detailed description.
| ID | Name | Description | Required Feature |
|---|---|---|---|
0x00 |
PowerAdjustRequest | Request the device to adjust to a specified power level | PA |
0x01 |
CancelPowerAdjustRequest | Cancel an ongoing power adjustment | PA |
0x02 |
StartTimeAdjustRequest | Request adjustment of the forecast start time | STA |
0x03 |
PauseRequest | Request the device to pause operation | PAU |
0x04 |
ResumeRequest | Request the device to resume operation | PAU |
0x05 |
ModifyForecastRequest | Modify the device's energy forecast | FA |
0x06 |
RequestConstraintBasedForecast | Request the device to regenerate its forecast based on constraints | CON |
0x07 |
CancelRequest | Cancel all ongoing optimization requests | STA | PAU | FA | CON |
PowerAdjustRequest -- Power Adjustment Request (0x00)
Requests the device to adjust to a target power level for a specified duration. The EMS uses this command to reduce device power during peak pricing periods
or increase power during off-peak periods to optimize energy costs. Upon success, ESAState changes to PowerAdjustActive (3).
| Parameter | Type | Description |
|---|---|---|
| Power | int64 | Target power in mW. Must be within the device's PowerAdjustmentCapability range |
| Duration | uint32 | Adjustment duration in seconds. Must be within the device's declared minDuration ~ maxDuration range |
| Cause | AdjustmentCauseEnum | Adjustment cause: 0 = LocalOptimization, 1 = GridOptimization |
Usage Scenarios
During peak pricing, the EMS sends PowerAdjustRequest(Power=1400000, Duration=7200, Cause=1) to the EVSE,
reducing charging power from 7.2 kW to 1.4 kW for 2 hours. The device continues charging at reduced power during the adjustment
and automatically restores normal power when the duration expires.
CancelPowerAdjustRequest -- Cancel Power Adjustment (0x01)
Cancels an ongoing power adjustment; the device immediately returns to normal operating state. No parameters.
On success, ESAState changes from PowerAdjustActive back to Online.
Usage Scenarios
The EMS previously requested reduced power operation, but grid load has dropped suddenly and the restriction is no longer needed. Send CancelPowerAdjustRequest to let the device resume full-speed operation.
StartTimeAdjustRequest -- Start Time Adjustment (0x02)
Requests the device to shift the start time in its Forecast to a specified time. Used to move the device's operating period from peak to off-peak without changing total energy consumption.
| Parameter | Type | Description |
|---|---|---|
| RequestedStartTime | epoch-s | Requested new start time (UTC timestamp) |
| Cause | AdjustmentCauseEnum | Adjustment cause: 0 = LocalOptimization, 1 = GridOptimization |
Usage Scenarios
A washing machine is scheduled to start at 18:00, but the EMS detects that 18:00-20:00 is peak hours.
Send StartTimeAdjustRequest(RequestedStartTime=UTC timestamp for 22:00, Cause=1)
to defer the wash cycle to the 22:00 off-peak period. The device will automatically start at the new time.
PauseRequest -- Pause Operation (0x03)
Requests the device to pause its current operation. Only applicable to devices supporting pause (PAU Feature).
On success, ESAState changes to Paused (4).
| Parameter | Type | Description |
|---|---|---|
| Duration | uint32 | Pause duration in seconds. The device automatically resumes operation when expired |
| Cause | AdjustmentCauseEnum | Pause cause: 0 = LocalOptimization, 1 = GridOptimization |
Usage Scenarios
A dishwasher is running and the EMS detects the grid load is about to peak.
Send PauseRequest(Duration=1800, Cause=1) to pause the dishwasher for 30 minutes.
The device maintains its current state during the pause and automatically resumes the wash cycle after 30 minutes.
ResumeRequest -- Resume Operation (0x04)
Requests the device to resume paused operation. No parameters.
On success, ESAState changes from Paused back to Online.
ModifyForecastRequest -- Modify Forecast (0x05)
Modifies the power and time parameters of one or more Slots in the device's current Forecast. The EMS uses this command to directly adjust the device's energy plan, such as reducing the expected power for a certain period.
| Parameter | Type | Description |
|---|---|---|
| ForecastID | uint32 | The Forecast ID to modify; must match the forecastID in the current Forecast attribute |
| SlotAdjustments | list | List of Slot adjustments, each containing fields like SlotIndex, NominalPower, Duration |
| Cause | AdjustmentCauseEnum | Adjustment cause: 0 = LocalOptimization, 1 = GridOptimization |
Usage Scenarios
The EVSE's Forecast shows it will charge at 7.2 kW for 2 hours in Slot 0. The EMS wants to split it into two segments: first charge at 3.6 kW for 1 hour (avoiding peak), then at 7.2 kW for 1 hour. Use ModifyForecastRequest to modify the Slot parameters to implement this segmented charging strategy.
RequestConstraintBasedForecast -- Constraint-Based Forecast Request (0x06)
Provides the device with a set of power/energy constraints and requests it to regenerate its Forecast accordingly. Unlike ModifyForecastRequest which directly modifies parameters, this command tells the device "figure out how to meet these constraints yourself".
| Parameter | Type | Description |
|---|---|---|
| Constraints | list | List of constraints. Each entry contains limits such as StartTime, Duration, NominalPower / MaximumEnergy |
| Cause | AdjustmentCauseEnum | Constraint cause: 0 = LocalOptimization, 1 = GridOptimization |
Usage Scenarios
The EMS knows the grid may be overloaded tomorrow from 14:00-16:00, and sends a constraint to the heat pump: "14:00-16:00 maximum power must not exceed 2 kW". The heat pump adjusts its internal operation plan accordingly, possibly pre-cooling earlier or delaying startup, to ensure it stays within 2 kW during the constrained period.
CancelRequest -- Cancel Request (0x07)
Cancels all currently ongoing optimization requests (StartTimeAdjust, Pause, ModifyForecast, ConstraintBasedForecast); the device returns to its original autonomous operation plan. No parameters. Requires the device to support at least one of the STA, PAU, FA, or CON Features.
Usage Scenarios
The EMS previously issued multiple optimization requests and now needs to release all restrictions to let the device resume autonomous operation. Send CancelRequest to clear all ongoing time adjustments, pauses, and forecast modifications in one go.
Attributes
DeviceEnergyManagement Cluster attributes are organized into three functional groups. Click an attribute ID in the summary table to jump to its detailed description.
| ID | Name | Type | Group | Description |
|---|---|---|---|---|
0x0000 |
ESAType | ESATypeEnum | ESA Basic Info | Device type identifier |
0x0001 |
ESACanGenerate | bool | ESA Basic Info | Whether the device can generate energy |
0x0002 |
ESAState | ESAStateEnum | ESA Basic Info | Current energy management state of the device |
0x0003 |
AbsMinPower | int64 | Power & Adjustment | Absolute minimum power of the device (mW) |
0x0004 |
AbsMaxPower | int64 | Power & Adjustment | Absolute maximum power of the device (mW) |
0x0005 |
PowerAdjustmentCapability | struct / null | Power & Adjustment | Adjustable power range and time limits |
0x0006 |
Forecast | struct / null | Forecast & Optimization | Device's energy consumption/generation forecast plan |
0x0007 |
OptOutState | OptOutStateEnum | Forecast & Optimization | User's optimization opt-out status |
ESA Basic Information (0x0000-0x0002)
Describes the device's type, energy generation capability, and current state. These three attributes are foundational for all DEM devices.
| ID | Name | Type | Description |
|---|---|---|---|
0x0000 |
ESAType Device Type |
ESATypeEnum | Identifies the ESA device type. The EMS uses this value to understand the device's energy characteristics and scheduling strategy. See enum below |
0x0001 |
ESACanGenerate Can Generate Energy |
bool | true means the device can export energy to the grid (e.g. solar inverter, battery storage discharging). false means it only consumes energy |
0x0002 |
ESAState Device State |
ESAStateEnum | Current energy management state of the device. See enum below |
ESATypeEnum Enum Values
ESAStateEnum Enum Values
The device only accepts new optimization commands when ESAState = Online (1).
When in Offline or Fault state, all commands are rejected.
In PowerAdjustActive state, only CancelPowerAdjustRequest can be sent;
in Paused state, only ResumeRequest can be sent.
Power & Adjustment (0x0003-0x0005)
Defines the device's power range and adjustment capabilities. The EMS must read these attributes to confirm the adjustment range before sending a PowerAdjustRequest.
| ID | Name | Type | Description |
|---|---|---|---|
0x0003 |
AbsMinPower Absolute Min Power |
int64 | Absolute minimum power at which the device can operate, in mW. Can be negative (indicating export to grid). 0 means the device can completely stop consuming |
0x0004 |
AbsMaxPower Absolute Max Power |
int64 | Absolute maximum power at which the device can operate, in mW. For example, 7200000 means 7.2 kW |
0x0005 |
PowerAdjustmentCapability Power Adj. Capability |
struct / null | Describes the device's currently acceptable power adjustment range and time limits. null means the device does not currently accept power adjustments. Requires PA Feature |
This attribute is a composite structure containing powerAdjustCapability (power adjustment capability list) and cause (reason).
Each entry in the list defines an adjustment range: minPower / maxPower (power range) and minDuration / maxDuration (time range).
The device can provide multiple non-contiguous power adjustment intervals. When sending a PowerAdjustRequest, parameters must fall within one of these intervals.
Forecast & Optimization (0x0006-0x0007)
The device's energy forecast plan and user opt-out state. Forecast is the most critical data structure in DEM.
| ID | Name | Type | Description |
|---|---|---|---|
0x0006 |
Forecast Energy Forecast |
struct / null | The device's predicted plan for future energy consumption or production. Contains multiple time Slots, each defining a time period and power parameters. null means no forecast is available. Requires PFR or SFR Feature |
0x0007 |
OptOutState Opt-Out State |
OptOutStateEnum | Whether the user has opted out of energy optimization. See enum below |
Forecast contains the following key fields:
forecastID -- unique forecast identifier, incremented on each update
activeSlotNumber -- currently executing Slot number (null means not yet started)
startTime / endTime -- start and end time of the entire forecast
slots -- list of time segments, each Slot contains minDuration, maxDuration, defaultDuration,
nominalPower (nominal power), minPower, maxPower and other parameters
OptOutStateEnum Enum Values
When the user sets OptOutState to opt out, the device rejects the corresponding type of commands from the EMS.
The EMS should check this attribute before sending commands to avoid sending requests that are guaranteed to fail.
In OptOut (3) state, all commands except CancelPowerAdjustRequest and CancelRequest are rejected.
Feature Bitmap
The DeviceEnergyManagement Cluster declares the device's supported energy management capabilities via FeatureMap (0xFFFC). Different Feature combinations determine the available commands and attributes:
PFR (PowerForecastReporting) and SFR (StateForecastReporting) are mutually exclusive -- a device can only choose one forecast reporting mode. PFR is suitable for devices with continuously adjustable power (e.g. EVSE), while SFR is suitable for devices that run fixed programs (e.g. washing machines, dishwashers). The FA and CON Features require at least one of PFR or SFR as a prerequisite.
Example Data
Read result of the DeviceEnergyManagement Cluster for an online EVSE (EV charger):
{
// --- ESA Basic Info ---
"0x0000": 0, // ESAType = EVSE (EV charger)
"0x0001": false, // ESACanGenerate = false (consumes only, does not generate)
"0x0002": 1, // ESAState = Online (running)
// --- Power Range ---
"0x0003": 0, // AbsMinPower = 0 mW (can completely stop consuming)
"0x0004": 7200000, // AbsMaxPower = 7200000 mW (max 7.2 kW)
// --- Power Adjustment Capability ---
"0x0005": { // PowerAdjustmentCapability
"powerAdjustCapability": [
{
"minPower": 1400000, // Min adjustable power 1.4 kW
"maxPower": 7200000, // Max adjustable power 7.2 kW
"minDuration": 60, // Min adjustment duration 60 seconds
"maxDuration": 28800 // Max adjustment duration 8 hours
}
],
"cause": 0 // NoRateChange (no rate change trigger)
},
// --- Forecast ---
"0x0006": { // Forecast
"forecastID": 1,
"activeSlotNumber": 0,
"startTime": 1700000000,
"endTime": 1700028800,
"slots": [
{
"minDuration": 3600,
"maxDuration": 7200,
"defaultDuration": 5400,
"nominalPower": 7200000,
"minPower": 1400000,
"maxPower": 7200000
}
]
},
// --- Opt-Out State ---
"0x0007": 0 // OptOutState = NoOptOut (not opted out of any optimization)
}
All power values are in milliwatts (mW); divide by 1000 to get watts (W), and by another 1000 to get kilowatts (kW).
Forecast and PowerAdjustmentCapability are composite structures that require recursive parsing of nested fields.
A null value means the capability is currently unavailable -- for example, PowerAdjustmentCapability may be null when the device is in Offline state.
Common Scenarios
Scenario 1: EVSE Time-of-Use Charging -- Off-Peak Cost Reduction
- Read
ESAType (0x0000)to confirm it is an EVSE device; readESAState (0x0002)to confirm it isOnline (1) - Read
PowerAdjustmentCapability (0x0005)to get the adjustable power range (e.g. 1.4 kW ~ 7.2 kW) - During peak pricing (18:00-22:00): send
PowerAdjustRequest(Power=1400000, Duration=14400, Cause=1)to reduce to minimum power - Subscribe to
ESAStateand confirm it changes toPowerAdjustActive (3) - After peak ends: send
CancelPowerAdjustRequestto resume full-speed charging, or wait for the Duration to expire for automatic restoration - Subscribe to
Forecast (0x0006)changes throughout to monitor charging progress and estimated completion time
Scenario 2: Dishwasher Delayed Start -- Utilizing Off-Peak Rates
- The user sets the dishwasher to run; the device reports a
Forecastshowing it plans to start immediately - The EMS checks the electricity rate schedule and finds that off-peak rates begin after 23:00
- Send
StartTimeAdjustRequest(RequestedStartTime=UTC timestamp for 23:00, Cause=0)to defer startup - The dishwasher automatically starts the wash cycle at 23:00;
activeSlotNumberinForecastbegins updating - If the user needs the dishwasher sooner, check
OptOutState; the user can opt out via the device panel, or the EMS can sendCancelRequestto cancel the delay