Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6de2287
build: run on ebus-panel-sim 0.11.0
cayossarian Nov 20, 2026
7a8c762
feat(templates): the r202645 captures take their panels' template names
cayossarian Nov 20, 2026
a97ba8c
feat(lugs): a panel without a feedthrough publishes no downstream lug…
cayossarian Nov 20, 2026
d4bd9ed
feat(battery): a hybrid battery takes its own solar
cayossarian Nov 20, 2026
68e6dec
docs: PanelBench on ebus-panel-sim 0.11.0
cayossarian Nov 20, 2026
eb24783
fix: what the emitter refuses is refused up front; a breaker switches…
cayossarian Nov 20, 2026
2f97df0
fix: validation builds the emitter as start does; a tandem's one regi…
cayossarian Nov 20, 2026
792f3b5
fix: a config validation accepts is one a panel starts and ticks on
cayossarian Nov 20, 2026
db05db7
fix: each circuit's template is checked as the engine models it
cayossarian Nov 20, 2026
55efefa
fix: a circuit is modelled, published and checked by one template
cayossarian Nov 20, 2026
4fe1de8
fix: a later capture of a panel keeps its serial; the dashboard shows…
cayossarian Nov 20, 2026
8639398
ci: the mypy hook type-checks against ebus-panel-sim 0.11.0
cayossarian Nov 20, 2026
d097240
feat(ids): a circuit records SPAN's number for it, and a panel its id…
cayossarian Nov 20, 2026
2c9516d
feat(ids): devices are named as the panel's hardware and release name…
cayossarian Nov 20, 2026
e1dcfde
feat(ids): a clone keeps the numbers its panel names its circuits by
cayossarian Nov 20, 2026
33e54fa
feat(templates): a template publishes the ids its capture's panel does
cayossarian Nov 20, 2026
0b2c5c8
feat(templates): the r202639 captures as release-named before templat…
cayossarian Nov 20, 2026
104d8ff
feat(dashboard): a circuit added to a numbered panel takes the next n…
cayossarian Nov 20, 2026
8f301ef
docs: device ids follow the panel's hardware and release
cayossarian Nov 20, 2026
794bd83
fix(ids): reasons name the right circuit; panels sharing device ids o…
cayossarian Nov 20, 2026
740024a
chore(templates): drop the pre-release's before templates
cayossarian Nov 20, 2026
5f4edcc
release: 2.9.0
cayossarian Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
# released versions from PyPI rather than a git ref: `ebus-panel-sim` used to
# track the fork's moving `spanpanel/main` branch, so this hook could resolve a
# different build on two consecutive runs with nothing in the repo changing.
- ebus-panel-sim==0.10.0b2
- ebus-panel-sim==0.11.0
- ebus-sdk==0.22.0
- aiomqtt>=2.5.1,<2.6
- paho-mqtt>=2.1,<2.2
Expand Down
75 changes: 65 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# Changelog

## Unreleased
## 2.9.0 — SPAN release 202645, and the device ids real panels publish

**The shipped templates are all `ref_` templates: the two tandem templates are renamed, and the three `default_MAIN_` templates are removed.**
**PanelBench runs on `ebus-panel-sim` 0.11.0. Its generated templates are each panel's latest capture, on SPAN release 202645 where the emitter has one,
and a hardware 3.0 panel publishes the device ids a real one does.** The shipped templates are all `ref_` templates: the two tandem templates are renamed,
and the three `default_MAIN_` templates are removed. The `span-panel` integration carries a hardware 3.0 panel's entities across the change of ids at
release 202645 from v2.3.3 (in pre-release as v2.3.3b1).

### Added

- **PanelBench publishes the device ids a real panel does.** A hardware 3.0 panel names its circuits, its remote CT and its lugs by SPAN's numbers for them,
which it keeps while the ids around them change at release 202645: `circuit-<n>` and `remote-ct-<n>` before it, `{serial}-{hex16}-1-16-<n>`,
`-1-42-<n>` and `-1-21-2` from it. A circuit records its number as `circuit_number`, and the panel its segment as `panel_config.device_id_hex`, so the ids
follow `firmware_version` across the release. A template of a hardware 3.0 capture that keeps its panel's ids and a clone of such a panel record them as
the panel publishes them, and a circuit added in the dashboard takes the lowest number its panel's circuits leave. A MAIN 32, whose ids no release
changes, and a config that records no numbers publish as before. Since nothing scopes those ids to the panel before release 202645, a panel whose
device ids another running panel already publishes is refused at start, as one with a running serial is. The `span-panel` integration carries a panel's
entities across the change from v2.3.3 (in pre-release as v2.3.3b1).
- **Three templates of real panels**, generated from the emitter's reference captures: `ref_MAIN_32_CASCADE`, a MAIN 32 fed by another panel, with a battery;
`ref_MAIN_16_BESS`, a MAIN 16 with a hybrid battery and an EVSE; and `ref_MLO_48_HYBRID`, an MLO 48 whose battery's inverter takes its solar.
- **A battery can take its own solar.** `bess.inverter_type: hybrid` (default `ac-coupled`) says the battery's own inverter also takes PV, on its DC side, and
`bess.pv_array.nameplate_capacity_w` rates the array; it produces by the panel's location and weather and joins `power-flows/pv` and the solar the battery's
dispatch sees, live and in the Model view. A clone writes a battery hybrid where the emitter's capture reads it so: the panel publishes `power-flows/pv`
and nothing but its one battery could bring it solar. An imported definition keeps its battery's coupling. A battery change the running panel cannot
take, a coupling changed or the battery enabled, disabled or replaced, restarts the panel, since the emitter builds its battery at start. Off grid the
array is not yet curtailed to what the load and battery can take, as the PV circuits are not.
- **`panel_config.feedthrough`** (default `true`). With `false`, a hardware 3.0 panel on SPAN release 202645, or on a firmware naming none, publishes no
downstream lugs, as such a panel without a feedthrough module does; release 202639 and a MAIN 32 publish both. A clone of a panel publishing its upstream
lugs alone writes `false`. A `lugs.downstream` section for lugs the panel does not publish is refused, and so is a battery placed `DOWNSTREAM` of them.

### Changed

Expand All @@ -20,6 +45,23 @@
badge naming the serial. Delete the leftover `default_*` files, or clone the `ref_` equivalent.
- **The README lists every template in one table**, and the conformance profile in `DEVELOPER.md` is the regenerated one: 452 match, 4 divergence, 69 extension
and 1327 omission.
- **PanelBench runs on `ebus-panel-sim` 0.11.0**, which publishes some things differently, as its CHANGELOG records. The lugs' `meter/current-a` and
`meter/current-b` take each space's leg from its row and net each leg's current. On hardware 3.0 the circuits of one tandem or quad each publish the
breaker's one reading, and a relay or priority set on one over MQTT reaches them all. A battery's `info/nameplate-capacity` has one decimal place there (`27.0`).
A hardware 3.0 panel on release 202645, or on a firmware naming none, publishes each circuit's `connection/connection-point`.
- **0.11.0 refuses the circuits of one tandem or quad differing in priority, relay lock, never-backup or energy seed, and a PV rating that is not above 0**,
both of which 0.10.0 started on, and PanelBench refuses them when it loads, edits or saves a config, as it does all the emitter refuses (see Fixed). The
dashboard applies a relay toggle, or a priority or relay-behaviour edit, on one circuit of a tandem or quad to every circuit on it, since the breaker has
one relay; only a circuit whose own value changes leaves recorder replay. A clone, and a refresh of its energy from the source panel, writes a tandem's or
quad's one register to each of its circuits: the largest any of them publishes, as the emitter's capture takes it, since they read one meter a moment
apart.
- **Four generated templates are their panels' later captures, on release 202645**: `ref_MAIN_32`, `ref_UNKNOWN_16`, `ref_MAIN_40` and `ref_MLO_48`, where
they were the release 202639 captures of the same panels. `ref_MAIN_40` is that panel recommissioned, with 38 circuits and no battery, where it had 5 and
a battery fed by a circuit, and `ref_UNKNOWN_16` adds an EVSE. Each keeps its serial (`sim-main32_r202639`, `sim-r202639-a`, `sim-r202639-c` and
`sim-r202639-e`), as a panel keeps its serial through a firmware upgrade, so Home Assistant keeps a panel run from one of them across the upgrade of
PanelBench. `ref_MAIN_32` keeps its devices' ids too. The hardware 3.0 templates (`ref_UNKNOWN_16`, `ref_MAIN_16`, `ref_MAIN_40`, `ref_MLO_24` and
`ref_MLO_48`) now publish their panels' own ids for their circuits and remote CT, and on release 202645 for their lugs, where they published hashed and
serial-scoped ones, so Home Assistant sees those devices as new.
- **A `pv` section listing `inverters` must set `enabled`, and `pv.enabled` must be `true` or `false`.** The inverters no circuit feeds publish only while
`pv.enabled` is `true`, and a config listing them without it loaded and published none of them; it is now refused, saying to set `enabled` to `true` to
publish them or `false` to keep them off. An `enabled` that is empty or quoted, such as `"false"`, which published the opposite of what it says, is refused
Expand All @@ -37,20 +79,33 @@
generated `ref_` templates, clones, history databases, and `configs/.secrets/` and `configs/rates/`, which hold credentials and API keys. `.dockerignore` now
keeps all but the presets and the two tracked templates out, as a build from git has it, and leaves local state and caches out of the build context; images
built by CI were not affected.
- **A PV inverter or SPAN Drive added in the dashboard no longer stops its panel starting.** It sits on no breaker space, and the emitter refuses a circuit
with none, so a panel with one would not start; it is now a what-if device, which the Model view models and the panel does not publish, nor anything it
would feed. A `pv.feed` or `bess.feed` naming one is refused.
- **A breaker rating edited in the dashboard is published.** The edit writes the circuit's own rating, which the dashboard showed while the panel went on
publishing its template's. The engine, the panel's definition, validation and the dashboard's view of a circuit now all read it by its template with
the circuit's overrides and own rating over it, so what is checked is what is modelled, published and shown. A hand-written override outside the
energy profile, such as `relay_behavior`, which only the engine applied, is published too, and a rating must be above 0.
- **A config the panel cannot start on is refused when PanelBench loads, edits or saves it, saying why**, where it loaded and saved and the panel then
failed to start. PanelBench builds the emitter as a panel's start does, so whatever the emitter refuses, such as an `unvalued` path the device's profile
declares none of, is refused with its reason, each circuit and meter named by its `id`. A section or setting of the wrong shape, such as `lugs: x`,
`bess.charge_hours: 5` or a template's `power_range: {min: 50, max: 150}`, is refused by name, a circuit's `overrides` as they leave its template, where
the panel failed to start or tick with an error naming nothing; a number may still be quoted where it is read as one.
A `total_tabs` that is no SPAN panel's size, or a latitude or longitude off the globe, which the dashboard's form allowed, and a battery of 0 kWh or a
discharge efficiency of 0, which failed on its first tick, are refused. A template no circuit uses is read by nothing, so it is checked for its shape
alone. A `bess.feed` naming no circuit, which published a battery fed by nothing, is refused, and deleting the circuit it names in the dashboard drops
it, as it drops a `pv.feed`.
- **A cycling load reads the same at a given simulated time on every run.** Its on and off phases follow the panel's clock, counted from the epoch, where they
ran from the moment the panel started on the real clock. A panel set to a simulated time could read a cycling load on in one run and off in the next, and
a panel no longer starts every cycling load at the start of its on phase.

### Removed

- **`default_MAIN_16.yaml`, `default_MAIN_32.yaml` and `default_MAIN_40.yaml`**, which `ref_MAIN_16`, `ref_MAIN_32` and `ref_MAIN_40` cover. The SpanPanel
integration's client, span-panel-api, places MAIN 16 at spaces 9 to 24 and MAIN 40 at 9 to 48, and `default_MAIN_16` and `default_MAIN_40` numbered their
spaces from 1, so the integration logged "Panel model ... has breaker positions ..., but its circuits occupy spaces ..." for both. The MAIN 16 range is the
one its reference capture shows, with circuits on spaces 9 to 24; the MAIN 40 range is the client's own choice, and its capture's circuits sit on spaces 9
to 45.
spaces from 1, so the integration logged "Panel model ... has breaker positions ..., but its circuits occupy spaces ..." for both. Each range is the one a
reference capture of that model shows: a MAIN 16's circuits on spaces 9 to 24, and a MAIN 40's on 9 to 48.

### Fixed

- **A cycling load reads the same at a given simulated time on every run.** Its on and off phases follow the panel's clock, counted from the epoch, where they
ran from the moment the panel started on the real clock. A panel set to a simulated time could read a cycling load on in one run and off in the next, and
a panel no longer starts every cycling load at the start of its on phase.

## 2.8.0 — Tandem and quad breakers, and several panels on one broker

Expand Down
21 changes: 19 additions & 2 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ panel_config:
ethernet_link: bool # status/ethernet
wifi_ssid: str | null # status/wifi-ssid (default: sim-wifi while Wi-Fi is up); null publishes none
unvalued: [str] # node/property paths the panel declares and leaves unvalued, as a clone reads them
# Whether the panel has a feedthrough module (default: true). false publishes no downstream lugs under hardware 3.0
# from release 202645 (hardware.publishes_downstream_lugs); a clone of a panel publishing its upstream lugs alone writes it
feedthrough: bool
# The 16 hex digits a hardware 3.0 panel's numbered devices publish under from release 202645, {serial}-{hex16}-1-16-<n>
# (instance_ids); absent, one is derived from the serial
device_id_hex: str
registration_limit: # Absent, every registration succeeds
per_minute: int # Registrations each client may make in a minute; past it, registration answers 429
retry_after: bool # Whether the refusal carries Retry-After (default: true)
Expand Down Expand Up @@ -447,6 +453,9 @@ circuits:
name: str # Human-readable name
template: str # References a circuit_templates key
tabs: [int] # Tab positions ([1] = 120V, [1, 3] = 240V)
# SPAN's number for the circuit on hardware 3.0, kept across releases: published as circuit-<n>, then
# {serial}-{hex16}-1-16-<n> from release 202645; absent, the circuit keeps its hashed id
circuit_number: int
breaker_rating: int # Per-circuit override (optional)
pcs_priority:
int | null # Published as pcs/priority (default: the circuit's position). null records a panel that
Expand All @@ -473,9 +482,10 @@ unmapped_tabs: [int] # Tab numbers with no circuit assigned
outside_meters: # A meter the panel reads that sits outside it, on no breaker space; one at most
- id: str # Scopes its device id, as a circuit's id does
unvalued: [str]
circuit_number: int # SPAN's number for it as a remote CT: remote-ct-<n>, then {serial}-{hex16}-1-42-<n>

lugs: # Each set of lugs as commissioned, published in its connection node
upstream: # downstream takes the same keys
upstream: # downstream takes the same keys, and is refused for lugs the panel does not publish (panel_config.feedthrough)
feeds_role: str # What the lugs feed where it is not a device of its own
service_rating_a: int # The utility service rating at a service entrance
overcurrent_protection_a: int
Expand Down Expand Up @@ -611,7 +621,10 @@ ebus/5/{serial}/{node}/{property}
| `power-flows` | Aggregated: PV, battery, grid, site power |

`{circuit-uuid}` is a UUID v5 over `{panel-serial}/{circuit-id}`. It is scoped to the panel because the shipped configs reuse circuit ids such as
`solar_inverter` across panel sizes, and two panels in one add-on publish to one broker.
`solar_inverter` across panel sizes, and two panels in one add-on publish to one broker. A hardware 3.0 panel whose config numbers its circuits
(`circuit_number`) names them instead as such a panel does: `circuit-<n>` before release 202645 and `{panel-serial}-{hex16}-1-16-<n>` from it (see the
README's Device ids). Before 202645 nothing scopes those ids to the panel, as a real panel's own broker needs nothing to, so PanelBench refuses to start a
panel whose device ids another running panel already publishes.

### Settable Properties

Expand Down Expand Up @@ -728,6 +741,10 @@ The Battery Storage Energy Equipment tracks real state-of-energy by integrating
- **Discharging**: `SOE -= power * dt / discharge_efficiency`
- **Backup reserve**: Normal discharge stops at `backup_reserve_pct` (default 20%); only grid-disconnect emergencies drain to the 5% hard floor
- **Charge modes**: Custom (hour-based schedule), Solar Generation (tracks PV curve), Solar Excess (surplus after loads)
- **A hybrid battery's own array**: `bess.inverter_type: hybrid` (default `ac-coupled`), with `bess.pv_array.nameplate_capacity_w`, gives the battery's
inverter an array. The engine produces it with the PV circuits' solar model (`RealisticBehaviorEngine.solar_output_w`), and the runtime hands it to the
emitter as the battery's `TickInputs.bess_pv`, which the emitter adds to `power-flows/pv`, its dispatch's solar and the grid. The Model view books it the
same way. A clone takes the coupling from the emitter's own reading of the tree (`clone._hybrid_batteries`); an import keeps its definition's.

### Energy Accumulation

Expand Down
Loading