Skip to content

Add a steam boiler pool - #1429

Open
shsms wants to merge 10 commits into
frequenz-floss:v1.x.xfrom
shsms:steam-boiler-pool
Open

Add a steam boiler pool#1429
shsms wants to merge 10 commits into
frequenz-floss:v1.x.xfrom
shsms:steam-boiler-pool

Conversation

@shsms

@shsms shsms commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Steam boilers are controllable electrical loads the SDK could not monitor or
manage. This adds a steam boiler pool with power readings and power control,
following the structure of the EV charger and PV pools.

Changes

  • New public API: microgrid.new_steam_boiler_pool() returning a
    SteamBoilerPool with power, power_status, and a consumption-only
    propose_power (negative power is rejected).
  • SteamBoilerData component data type and data sourcing support.
  • Power manager wiring using the plain matryoshka algorithm, with
    DefaultPower.MAX (like EV chargers) when no actor is proposing.
  • SteamBoilerManager splits the target power equally across the working
    boilers, keeping every allocation inside the boiler's inclusion bounds: a
    share below a boiler's minimum operating power is raised to the minimum, or
    the boiler is kept off. Like the PV manager, it subtracts the measured draw
    of unreachable boilers from the target.
  • SteamBoilerStatusTracker for per-boiler health, mirroring the PV tracker.

Worth a look

  • The single-pass allocation reports power as excess when a high-minimum
    boiler can't be afforded instead of topping up earlier boilers
    (test_unaffordable_minimum_strands_excess pins this).
  • With no usable boilers a request is dropped with only an error log — the
    same behavior as the PV and EV managers; a follow-up could make all three
    send an Error result the way the battery manager does.

@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:data-pipeline Affects the data pipeline part:microgrid Affects the interactions with the microgrid labels Jun 8, 2026
@shsms shsms changed the title Add SteamBoilerPool for monitoring and controlling steam boilers Add a steam boiler pool Aug 26, 2026
shsms added 10 commits August 26, 2026 16:27
Steam boilers are controllable electrical loads.  Their active power and its
inclusion/exclusion bounds, together with the per-phase power, current, voltage
and frequency, are reported through the corresponding AC_* metrics.

SteamBoilerData derives directly from ComponentData and declares its own fields
and from_samples/to_samples handling, rather than reusing another category's
type, so steam boilers are not coupled to the CHP data model.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Adds the timeseries.steam_boiler_pool package: the SteamBoilerPool, its
reference store and report types, and a SteamBoilerSystemBoundsTracker that
aggregates the active-power bounds of the working boilers, mirroring the PV
pool.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
The data sourcing actor handles the steam boiler component category so the
power formula can resample per-boiler power.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
The SteamBoilerStatusTracker reports per-boiler health so that broken
boilers can be excluded from power distribution, mirroring the PV inverter
status tracker.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
The SteamBoilerManager splits the target power equally across the working
boilers.  Each allocation stays inside the boiler's inclusion bounds: a
share below a boiler's minimum operating power is raised to the minimum when
the remaining budget covers it, and the boiler is kept off otherwise.  Like
the PV manager, the measured draw of unreachable boilers is subtracted from
the target, so the working boilers don't make the site overshoot it.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Wires the steam boiler pool into the data pipeline factory, using the plain
matryoshka power-manager algorithm with DefaultPower.ZERO, so that unmanaged
boilers are switched off and fall back to gas heating, and documents the new
pool in the microgrid module docs.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Adds SteamBoilerDataWrapper, steam boiler streaming in the mock microgrid,
resampling in the mock resampler, and graph-generator support.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Tests for the steam boiler pool power formula (including its meter
fallback) and the power control methods.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Tests for the SteamBoilerManager's distribution (minimum-power and
unreachable-power handling, formula delegation, shutdown) and the status
tracker.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
@shsms
shsms force-pushed the steam-boiler-pool branch from 8cda58a to ba9e618 Compare August 26, 2026 14:27
@shsms
shsms marked this pull request as ready for review August 26, 2026 14:29
@shsms
shsms requested a review from a team as a code owner August 26, 2026 14:29
@shsms
shsms requested review from llucax and removed request for a team August 26, 2026 14:29

@cwasicki cwasicki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any advice what to review here? On a first glimpse this looks like a lot of boiler-plate code.

Metric.AC_REACTIVE_POWER_PHASE_3: lambda msg: msg.reactive_power_per_phase[2],
}

_STEAM_BOILER_DATA_METHODS: dict[

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to repeat these for every device?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a lot of work to do it differently, which is not worth it, because this stuff will all be rewritten in rust in the next several months.

@llucax llucax mentioned this pull request Aug 27, 2026
@shsms

shsms commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Any advice what to review here? On a first glimpse this looks like a lot of boiler-plate code.

The big things to check are:

I'll need to do some testing as well.

@cwasicki cwasicki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the PR description mentions a wrong default though.

@github-project-automation github-project-automation Bot moved this from To do to Review approved in Python SDK Roadmap Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

Status: Review approved

Development

Successfully merging this pull request may close these issues.

2 participants