-
Notifications
You must be signed in to change notification settings - Fork 1
|
We've seen questions from integration developers and users about the removal of OverviewThe SPAN v1 REST API included a The short answer: v1: The
|
| Field | Example Values | Purpose |
|---|---|---|
dsmState |
DSM_ON_GRID, DSM_ISLANDED |
Panel's current operating mode |
dsmGridState |
DSM_GRID_UP, DSM_GRID_DOWN |
Grid availability |
currentRunConfig |
PANEL_ON_GRID, PANEL_OFF_GRID |
Panel run configuration |
dsmState values
| Value | Meaning |
|---|---|
DSM_ON_GRID |
Panel is connected to and operating on the utility grid |
DSM_ISLANDED |
Panel is disconnected from grid, operating on battery or standalone |
DSM_FAULTED_ON_GRID |
Fault condition while grid-connected |
DSM_FAULTED_OFF_GRID |
Fault condition while islanded |
DSM_UNKNOWN |
State not yet determined |
In practice, most clients used dsmState as a simple binary signal: "Is my panel on the grid right now?"
Limitations of dsmState
- Read-only. Clients could observe the state but not request transitions.
- Polling-based. Required periodic REST requests to detect changes.
- Internal naming. The
DSM_prefixed values were opaque labels with no documented semantics beyond what could be inferred from the names.
v2: The dominant-power-source Property
MQTT topic and schema
ebus/5/<serial>/core/dominant-power-source
| Attribute | Value |
|---|---|
| Datatype | enum |
| Format | GRID,BATTERY,PV,GENERATOR,NONE,UNKNOWN |
| Settable | Conditionally (when grid-islandable is true) |
The property's schema is available in the device's $description attribute and via the /api/v2/homie/schema endpoint.
Values
| Value | Meaning |
|---|---|
GRID |
Panel is operating on grid power |
BATTERY |
Panel is islanded, operating on battery |
PV |
Panel is operating on solar (future) |
GENERATOR |
Panel is operating on generator (future) |
NONE |
Panel is islanded with no power source |
UNKNOWN |
State not yet determined or fault condition |
Mapping from v1 to v2
v1 dsmState |
v2 dominant-power-source |
|---|---|
DSM_ON_GRID |
GRID |
DSM_ISLANDED (with battery) |
BATTERY |
DSM_ISLANDED (no battery) |
NONE |
DSM_FAULTED_ON_GRID |
UNKNOWN |
DSM_FAULTED_OFF_GRID |
UNKNOWN |
DSM_UNKNOWN |
UNKNOWN |
The v1 fault states (DSM_FAULTED_ON_GRID, DSM_FAULTED_OFF_GRID) are no longer distinguishable in v2 — both map to UNKNOWN. These states represent hardware conditions that require physical service intervention and are not actionable by API clients.
What's new in v2
Push-based delivery. Clients subscribe to the MQTT topic and receive updates in real time, replacing REST polling.
Bidirectional control. When the panel's core/grid-islandable property is true (indicating the panel is capable of operating off-grid), dominant-power-source becomes settable. Writing a value to the /set topic requests a power mode transition:
- Publishing
GRIDtells the panel to treat the home as grid-connected - Publishing
BATTERYtells the panel to treat the home as islanded on battery
To understand why this matters, it helps to know how the SPAN panel manages circuits during an outage. Each circuit has a configurable shed-priority that determines when it is automatically disconnected to conserve battery:
shed-priority |
Behavior |
|---|---|
OFF_GRID |
Circuit is shed immediately when the panel enters off-grid mode |
SOC_THRESHOLD |
Circuit is shed when battery state of charge drops to a configured threshold |
NEVER |
Circuit is never automatically shed — it stays powered as long as the battery can supply it |
Under normal operation, the battery system (BESS) controls the home's grid connection and reports its state to the panel. The panel uses this information to manage load shedding automatically. During this normal operation, the BESS is authoritative — the panel will not act on /set commands from external clients.
However, if the panel loses communication with the BESS, it no longer receives updates about grid status or battery state of charge. If the panel's last known state was off-grid, it will continue shedding circuits according to their configured priorities — even if the grid has since been restored. The /set capability allows a client to inform the panel that conditions have changed, ensuring that circuits are not unnecessarily kept offline. Publishing GRID to dominant-power-source/set restores normal operation and re-energizes shed circuits.
This gives homeowners and integrations a safeguard: the ability to override the panel's last-known state when the BESS is unreachable, preventing unnecessary disruption to circuits that could otherwise be powered.
This is new capability — the v1 dsmState was read-only.
Extensible values. The enum includes PV and GENERATOR for future power source types that the v1 API had no representation for.
Complementary v2 properties
The v2 API exposes additional properties that provide context beyond what dsmState alone offered:
| Property | Node | Values | Purpose |
|---|---|---|---|
dominant-power-source |
core |
GRID, BATTERY, PV, GENERATOR, NONE, UNKNOWN | Current power regime |
grid-islandable |
core |
boolean | Whether the panel supports off-grid operation |
grid-state |
bess |
UNKNOWN, ON_GRID, OFF_GRID | Grid state from the battery system (when commissioned) |
connected |
bess |
boolean | Whether a battery system is commissioned |
active-power |
lugs-upstream |
float (W) | Real-time power flow at the grid connection |
relay |
core |
UNKNOWN, OPEN, CLOSED | Main relay state |
Migration Summary
Simple migration
For clients that used dsmState as a grid connectivity indicator:
| v1 pattern | v2 equivalent |
|---|---|
Poll GET /api/v1/status, read dsmState |
Subscribe to ebus/5/<serial>/core/dominant-power-source |
dsmState == "DSM_ON_GRID" |
dominant-power-source == "GRID" |
dsmState == "DSM_ISLANDED" |
dominant-power-source == "BATTERY" or "NONE" |
dsmGridState == "DSM_GRID_UP" |
bess/grid-state == "ON_GRID" (when BESS is commissioned) |
Is additional signal derivation needed?
No. The dominant-power-source property directly answers the same question dsmState did: "What power regime is the panel in right now?" A client that subscribes to this single property has all the grid connectivity information that dsmState provided.
Clients that want additional confidence can cross-reference bess/grid-state (if a battery system is commissioned) and lugs-upstream/active-power (real-time grid power flow), but this is optional — dominant-power-source is the authoritative signal.
About the property name
The name dominant-power-source describes the panel's current operating power regime — not a measurement of which source is providing the most watts. When the value is GRID, the panel is grid-connected. When the value is BATTERY, the panel is islanded on battery. It is the direct successor to dsmState.
All reactions
-
👍 1
Replies: 4 comments 2 replies
Yeah the name 'dominant' certainly threw me off. The common meaning of that word does not mean this or that but rather a potential combination or where one power source is on most of the time.
When you say the dominant power source is singular then as long as the grid is up no other value can be possible.
So in effect the dominant power source could never be PV unless there was no battery power and the system was off grid and could operate in that disconnected mode.
There seems to be a hierarchy then:
1 - Grid / Generator (even if PV sending energy to grid)
2 - Battery when grid down
3 - PV (only if battery missing/depleted and panel can run islanded?)
Does SPAN have a relationship with generators (perhaps MLO 40 auto start), I know my 32 panel treats generator as Grid and the user must start the generator as Grid substitute.
A matrix might help.
All reactions
Here is the thinking & context that went into the choice of dominant-power-source:
dominant-power-source is actually describing the grid-forming entity (GFE), not "who is producing the most watts."
The distinction is precise and important:
- Grid-connected: The utility grid is the GFE. It sets voltage and frequency. The BESS and PV are grid-following — they inject/absorb power but don't form the grid. Even if 100% of the home's consumption comes from PV, the grid is still "dominant" because it's the reference that everything else synchronizes to.
- Islanded on battery: The BESS inverter becomes the GFE. It sets voltage and frequency for the home's microgrid. PV (if present) follows the BESS's reference.
- NONE: Islanded with no GFE — nothing is forming a grid for the home.
The name dominant-power-source is trying to say "who is in charge" not "who is producing the most watts."
The word "dominant" actually works in this sense (dominant = controlling, authoritative), but readers bring their own assumption that "power source" means "watt producer" and "dominant" means "biggest."
More than one client developer has been misled by the current name, feel free to suggest alternate names, but at this point, renaming this property would be a breaking change.
Claude suggests: rather than changing the property name, revise and strengthen the name field in the Homie $description schema. Right now it's "Current dominant power source, load-shedding trigger".
Something like "Current grid-forming power source, determines load-shedding behavior" would nudge developers toward the right mental model when they discover the property through the schema.
All reactions
-
👍 1
|
Don thanks, now that I'm not mobile, let me expound with some help. Thanks for the detailed write-up. The migration tables and the The question users are askingMost automations and dashboards built on BESS communication lossThe guide acknowledges that when the panel loses BESS communication, DPS retains UNKNOWN is not actionableWhen DPS reports UNKNOWN, a user asking "is the grid up?" gets no answer. The Generator systemsThe guide lists GENERATOR as a future value. My 32-tab panel treats a running Schema documentationThe eBus schema's What would help mostA matrix of system configurations mapped to expected DPS values would let
If those expected values can be confirmed, integrators can build reliable |
All reactions
|
a bit more for the brain pan... Additional Open Questions
Stale DPS Scenario MatrixThe core problem: the panel depends on BESS for grid state awareness. When BESS
DPS
|
| Direction | Action | Risk | Automation Safe? |
|---|---|---|---|
GRID → BATTERY |
Triggers shedding | Low — conservative, extends runtime | Yes |
GRID → NONE |
Triggers shedding (max) | Low — conservative | Possibly, but BATTERY is more appropriate |
BATTERY → GRID |
Stops shedding | Moderate — if actually off-grid, unmanaged drain reduces runtime | User confirmation recommended |
BATTERY → NONE |
Escalates shedding | Low | Unlikely use case |
* → UNKNOWN |
Behavior undefined | Unknown | No |
* → PV |
Future / undefined | Unknown | No |
* → GENERATOR |
Future / undefined | Unknown | No |
All reactions
|
Thanks for the thorough analysis across your comments. A note on terminology: I'll use DPS as shorthand for the Important: Scope of SPAN APIBefore diving into the technical details, I want to be clear about scope. The SPAN Panel and its integrated BESS/backup support are designed, engineered, tested, and listed to applicable electrical standards (NEC, UL). Load shedding, grid islanding, and MID management are product-level features operating within that certified framework. SPAN API provides best-effort visibility into the panel's state and limited, specific control capabilities — it is intended to let clients understand and track the panel's behavior, not to replace or replicate the panel's built-in control logic. An API client that attempts to implement its own load-shedding decisions, grid-state detection, or other critical automation is operating outside the scope of what SPAN API was designed and engineered for. Such use is entirely at the client developer's and homeowner's own risk and may void the SPAN Panel Limited Warranty. See the SPAN API Scope & Responsibility Model in the SPAN API documentation. The technical discussion in this thread is provided to help integration developers understand how the panel works — it is not a specification for building critical systems on top of SPAN API. DPS HierarchyYou proposed:
That's correct. The hierarchy follows the grid-forming entity (GFE): whichever source is forming the electrical grid that the home is synchronized to. When the utility grid is present, it's the GFE regardless of what PV or battery are doing — they're grid-following. When islanded, the BESS inverter becomes the GFE. UNKNOWN and Fault StatesYou asked:
It's genuinely unavailable via eBus. Both v1 fault states ( For automation purposes, treating Panel-Independent Grid DetectionYou asked whether the panel uses its own measurements to detect grid status, or relies entirely on BESS. The panel has its own voltage monitoring that independently detects grid loss — voltage drop/sag on the main conductors. This is how the panel can respond immediately to an outage without waiting for the BESS to report it. However, this monitoring is on the home side of the Microgrid Interconnect Device (MID) — the component within or alongside the BESS that manages grid disconnect/reconnect. That means:
This is the fundamental reason Note on terminology: in generator installations, the equivalent component is typically an Automatic Transfer Switch (ATS) or Manual Transfer Switch (MTS) — sometimes called a transfer-switch — which is external to both SPAN and the generator. I'll use "MID" when discussing BESS configurations and "transfer-switch" for generator contexts. DPS Update SourceDPS is determined from multiple inputs:
It's not entirely BESS-dependent for detecting outages, but for detecting grid restoration while islanded, the BESS is the only source. Firmware Reclaim After
|
| # | Sequence | DPS (stale) | Detectable via passive signals? | Assessment |
|---|---|---|---|---|
| 1 | BESS comms drop while on-grid, grid stays up | GRID |
N/A | Stale value is coincidentally correct |
| 2 | BESS comms drop while off-grid, grid stays down | BATTERY |
N/A | Stale value is coincidentally correct |
| 3 | Grid restored, BESS comms still down | BATTERY |
No — MID is open, home-side measurements show BESS power only | Only correctable via /set |
| 4 | BESS comms drop while on-grid, then grid drops | GRID |
Yes — MID is still closed, panel's own voltage monitoring detects the outage | Panel self-corrects via voltage sag detection |
| 5 | BESS comms drop while off-grid, then grid restores | BATTERY |
No — same as #3, MID is open | Only correctable via /set |
| 6 | BESS itself fails (comms + battery), grid up | BATTERY or GRID |
Yes — bess/connected = false is a distinct signal |
Detectable, but DPS may still be stale |
The key insight: scenario 4 self-corrects (the panel detects grid loss independently), but scenarios 3 and 5 do not (the panel cannot detect grid restoration while islanded). Your multi-signal derivation doesn't help for 3 and 5 because the signals themselves are measuring the home side of the open MID.
Where Your Multi-Signal Approach Does Help
Your integration's combined signal approach (bess/grid-state + DPS + power-flows/grid + lugs-upstream/active-power) adds genuine value for:
- Transient inconsistencies during normal BESS communication
- Scenario 4 (grid drops while on-grid with BESS comms already lost — MID still closed, power measurements reflect reality)
- Defense-in-depth for edge cases not yet enumerated
But for the core stale-DPS scenarios (3 and 5 — grid restored while islanded, BESS comms lost, MID open) — passive signals cannot help. /set is the only path.
/set Risk by Direction
Your risk analysis on the asymmetry of /set directions is a useful framework. To restate it with the scope caveat at the top of this reply in mind:
GRID→BATTERY(start shedding): The more conservative direction — worst case is unnecessary shedding, which is disruptive but not harmful.BATTERY→GRID(stop shedding): The higher-risk direction — getting this wrong means unmanaged battery drain, and as you correctly noted, this could affect critical equipment. Should require user confirmation or high-confidence corroborating signal.
Configuration Matrix
You and others have asked for a configuration matrix mapping system configurations to expected DPS values. That's a reasonable request — we'll take it under consideration as we continue to develop the API documentation.
Schema Documentation
We agree the $description could better convey the grid-forming-entity semantics — thanks for the suggestion.
Reference Links
- Storage System Integrations with SPAN
- Adding Battery Backup to your SPAN Panel
- Can I install SPAN with a standby generator?
Note: The SPAN eBus/MQTT API discussed in this thread is currently available on the SPAN Panel MAIN 32 model.
All reactions
Super clear now, thanks!