Documentation

How hems is put together: the domain model, the German grid rules as code, three control planes, the planner, the forecasts, the drivers and the fleet.

Thirteen pages, in the order they build on each other. Run it first, then how the box is arranged, then what each layer actually does, then what surrounds it.

Everything here describes code that exists in the repository. Where a page states a figure — a saving, a solve time, a coverage percentage — it is the output of a command named on the same page, and the command is in CI.

  1. 1

    Getting started

    Clone it, run the checks, and watch a household get through a January day with a § 14a reduction.

  2. 2

    Architecture

    Three control planes at three cadences, and a fixed order of authority between them.

  3. 3

    The domain model

    One sign convention, a quarter-hour grid that survives both DST transitions, an electrical tree, and commands that cannot exist without a reason.

  4. 4

    The grid rules

    § 14a EnWG, the EEBUS limitation state machine, § 9 EEG, Modul 3, MiSpeL and § 42c — as code, with the citation for every number.

  5. 5

    Tariffs and prices

    A German electricity bill is a stack, and every layer moves for its own reasons: five day-ahead sources, § 51 EEG, and an advisor for the § 14a Module.

  6. 6

    The planner

    A receding-horizon mixed-integer linear program that prices battery wear instead of hiding it.

  7. 7

    Forecasting, and being wrong

    What the box believes about tomorrow, how it learned it, and what it costs to be wrong about it — the number no other energy manager publishes.

  8. 8

    Flexibility

    S2 (EN 50491-12-2) as the internal model: a device describes what it can do, not what it is for.

  9. 9

    Devices and drivers

    What a wanted power becomes on real hardware — amperes, contact states, contactors — and the sans-I/O driver contract behind EEBUS, SunSpec and Modbus.

  10. 10

    Simulation and evaluation

    Seven reference days and a cold one, hardware simulators that all know how to say no, a seeded weather the planner never sees, and multi-day sweeps that can falsify a day.

  11. 11

    The fleet

    The services around one box: day-ahead prices, weather, two years of § 14a evidence, enrolment, signed releases, and a fleet view that counts breaches.

  12. 12

    Agents

    Every fleet service answers over the Model Context Protocol, read-only and authorising each caller as itself — beside an advisory plane that cannot act.

  13. 13

    Security and supply chain

    The box trusts a key it was built with, not a server. Secrets are references, authorisation is per site, and every release ships an SBOM and provenance.