PowerSourceConfiguration Cluster
Cluster ID: 0x002E |
Endpoint: Endpoint 0 (Root Node)
PowerSourceConfiguration is an extremely simple Cluster — only one attribute, no commands. Its sole purpose is to tell you: which Endpoints hold this device's power information and their priority order.
These two Clusters work as partners with a clear division of labor:
- PowerSourceConfiguration (this page) — on Endpoint 0, answers "where is the power information": which Endpoints host a PowerSource Cluster and their priority order
- PowerSource (0x002F) — on functional Endpoints, answers "what is the power status": battery level, charging state, voltage, etc.
Typical App flow: first read PowerSourceConfiguration to get the endpoint list → then read PowerSource on each corresponding Endpoint for actual data.
Attribute Overview
PowerSourceConfiguration has only one attribute, which is mandatory.
| ID | Name | Type | Access | Description |
|---|---|---|---|---|
0x00 |
Sources | list<endpoint-no> | Read-only | List of endpoints hosting PowerSource Cluster, sorted by priority |
Sources (Power Endpoint List)
An ordered list where each element is an Endpoint number pointing to an endpoint hosting a PowerSource Cluster. The list order represents priority: the first element is the primary power source, followed by backup sources in order.
A device may have multiple power sources (mains + battery, USB + solar), with each source's detailed information on a different Endpoint. The Sources list serves as a "directory" of these Endpoints, so the App doesn't need to iterate all Endpoints to guess which has power information — simply read this list to know which Endpoints to query for data.
An empty list means the device hasn't reported any power information. Endpoint numbers in the list align with the Descriptor Cluster's PartsList.
Commands
PowerSourceConfiguration has no commands. It is a purely read-only configuration Cluster; all information is obtained by reading the Sources attribute.
Example Data
Reading the PowerSourceConfiguration Cluster on Endpoint 0:
{
// --- Attributes ---
"0x0": [1, 2] // Sources = [Endpoint 1, Endpoint 2]
// Priority: Endpoint 1 is primary, Endpoint 2 is backup
}
Scenario 1: Single Power Source Device (Battery Door Lock)
A battery-powered smart door lock with only one power source. PowerSourceConfiguration's Sources list contains only one Endpoint; the App goes directly to that Endpoint to read PowerSource for battery level.
// Scenario 1: Simple device with only one power source (e.g. battery door lock)
// Endpoint 0 — PowerSourceConfiguration
{
"0x0": [1] // Sources = [Endpoint 1]
// Only one power source; see details in Endpoint 1's PowerSource Cluster
}
// Endpoint 1 — PowerSource (read battery level here)
{
"0x0": 1, // Status = Active
"0x1": 0, // Order = 0 (only power source)
"0x2": "Battery",
"0xC": 180 // BatPercentRemaining = 180 → actual 90%
}
For devices with only one power source, the Sources list length is 1 and App logic can be simplified — just read the first Endpoint's PowerSource directly, no need for priority display or switching logic.
Scenario 2: Dual Power Source Device (UPS Gateway)
A gateway device supporting both mains and built-in battery power. PowerSourceConfiguration lists two Endpoints; the first is mains (primary), the second is battery (backup). During power outage, the device automatically switches to battery, and the App can display the current power status accordingly.
// Scenario 2: Dual power source device (e.g. UPS-powered gateway)
// Endpoint 0 — PowerSourceConfiguration
{
"0x0": [1, 2] // Sources = [Endpoint 1, Endpoint 2]
// Endpoint 1 has higher priority (primary), Endpoint 2 is backup
}
// Endpoint 1 — PowerSource (primary: mains)
{
"0x0": 1, // Status = Active (currently powering)
"0x1": 0, // Order = 0 (highest priority)
"0x2": "Mains" // Description = "Mains"
}
// Endpoint 2 — PowerSource (backup: built-in battery)
{
"0x0": 0, // Status = Unspecified (on standby)
"0x1": 1, // Order = 1 (secondary priority)
"0x2": "Battery",
"0xC": 200 // BatPercentRemaining = 200 → actual 100%
}
In dual power source scenarios, the App can handle it as follows:
- Read the Sources list and iterate each Endpoint's PowerSource
- Check each source's
Statusattribute to find the currentlyActiveone - If the primary source (first in list) is not Active, the device is using backup power and the user should be notified
- Subscribe to each PowerSource's
Statuschanges for real-time power switching awareness