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) 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. |
Beta Was this translation helpful? Give feedback.
-
|
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 |
Beta Was this translation helpful? Give feedback.
-
|
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.
Beta Was this translation helpful? Give feedback.
-
|
Super clear now, thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We've seen questions from integration developers and users about the removal of
dsmStatein the eBus/Homie API — particularly from those who relied on it as a single "green light" signal for grid connectivity in dashboards and automations. This is a fair concern, and we want to be transparent about what changed, why, and how to get the same information (and more) from the v2 API.Overview
The SPAN v1 REST API included a
dsmStatefield in the/api/v1/statusresponse that reported the panel's grid connectivity state. With the v2 API (MQTT/Homie 5.0), this field is replaced by the Homie propertycore/dominant-power-source.The short answer:
dominant-power-sourceis a direct replacement fordsmStatewith cleaner naming, real-time push delivery, and the addition of bidirectional control. No information was lost. Read on for the details.v1: The
dsmStateFieldThe
/api/v1/statusresponse included three related fields:dsmStateDSM_ON_GRID,DSM_ISLANDEDdsmGridStateDSM_GRID_UP,DSM_GRID_DOWNcurrentRunConfigPANEL_ON_GRID,PANEL_OFF_GRIDdsmStatevaluesDSM_ON_GRIDDSM_ISLANDEDDSM_FAULTED_ON_GRIDDSM_FAULTED_OFF_GRIDDSM_UNKNOWNIn practice, most clients used
dsmStateas a simple binary signal: "Is my panel on the grid right now?"Limitations of
dsmStateDSM_prefixed values were opaque labels with no documented semantics beyond what could be inferred from the names.v2: The
dominant-power-sourcePropertyMQTT topic and schema
enumGRID,BATTERY,PV,GENERATOR,NONE,UNKNOWNgrid-islandableistrue)The property's schema is available in the device's
$descriptionattribute and via the/api/v2/homie/schemaendpoint.Values
GRIDBATTERYPVGENERATORNONEUNKNOWNMapping from v1 to v2
dsmStatedominant-power-sourceDSM_ON_GRIDGRIDDSM_ISLANDED(with battery)BATTERYDSM_ISLANDED(no battery)NONEDSM_FAULTED_ON_GRIDUNKNOWNDSM_FAULTED_OFF_GRIDUNKNOWNDSM_UNKNOWNUNKNOWNThe v1 fault states (
DSM_FAULTED_ON_GRID,DSM_FAULTED_OFF_GRID) are no longer distinguishable in v2 — both map toUNKNOWN. 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-islandableproperty istrue(indicating the panel is capable of operating off-grid),dominant-power-sourcebecomes settable. Writing a value to the/settopic requests a power mode transition:GRIDtells the panel to treat the home as grid-connectedBATTERYtells the panel to treat the home as islanded on batteryTo understand why this matters, it helps to know how the SPAN panel manages circuits during an outage. Each circuit has a configurable
shed-prioritythat determines when it is automatically disconnected to conserve battery:shed-priorityOFF_GRIDSOC_THRESHOLDNEVERUnder 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
/setcommands 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
/setcapability allows a client to inform the panel that conditions have changed, ensuring that circuits are not unnecessarily kept offline. PublishingGRIDtodominant-power-source/setrestores 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
dsmStatewas read-only.Extensible values. The enum includes
PVandGENERATORfor 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
dsmStatealone offered:dominant-power-sourcecoregrid-islandablecoregrid-statebessconnectedbessactive-powerlugs-upstreamrelaycoreMigration Summary
Simple migration
For clients that used
dsmStateas a grid connectivity indicator:GET /api/v1/status, readdsmStateebus/5/<serial>/core/dominant-power-sourcedsmState == "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-sourceproperty directly answers the same questiondsmStatedid: "What power regime is the panel in right now?" A client that subscribes to this single property has all the grid connectivity information thatdsmStateprovided.Clients that want additional confidence can cross-reference
bess/grid-state(if a battery system is commissioned) andlugs-upstream/active-power(real-time grid power flow), but this is optional —dominant-power-sourceis the authoritative signal.About the property name
The name
dominant-power-sourcedescribes the panel's current operating power regime — not a measurement of which source is providing the most watts. When the value isGRID, the panel is grid-connected. When the value isBATTERY, the panel is islanded on battery. It is the direct successor todsmState.Beta Was this translation helpful? Give feedback.
All reactions