Patrick Schurig 41d59de971 docs(optimiseur): versions allemande et anglaise de la section et de « Comment le moteur décide »
Prose traduite pour Présentation, Protocole, Contrat, Écrire un
optimiseur et la page du moteur ; ancres de titres identiques dans les
trois langues. Les blocs générés sont identiques d'une langue à l'autre.
Les exemples gardent un motif en français, comme l'exige le contrat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 13:09:09 +02:00

3.0 KiB

Optimizer

IN PROGRESS

The protocol between the engine and an optimiser is published (version 1.1). Connecting an optimiser is being tested on our test installation; the box does not need one to work.

What an optimiser is for

The engine's rules decide on the present: this minute's surplus, shared according to your priorities. An optimiser looks further ahead. From the forecasts the engine hands it — PV production, base consumption, entered tariff — it proposes a plan in time slots over several hours: shift the water heater to the expected production peak, keep headroom for evening charging, and so on.

The optimiser advises, the engine decides

  • The engine only executes the current slot of the plan. The rest is shown as a forecast, and requested again on the next cycle.
  • Every setpoint is capped by the load's bounds (floor, ceiling, anti-flapping locks) and by the real-time safety loop, which stays with the engine and overrides everything. An optimiser cannot bypass a lock.
  • Every action must carry its reason. An action without one is rejected.
  • A malformed plan, or one that targets an unknown load, is rejected as a whole.

At worst, a faulty optimiser can therefore only propose a poor allocation — bounded by the engine.

The box works without an optimiser

Optimiser missing, silent, abstaining, plan expired or rejected: the engine returns to its rules (rules) for that cycle, with no interruption of control. The app shows at all times which strategy is in charge. The Community edition works entirely this way.

Its data come from the engine only

  • The engine connects to the optimiser, never the other way round: the box opens no port.
  • The optimiser runs on the box (local socket) or on a machine in your local network (TCP). On the local network, a shared secret (token) is recommended.
  • It receives only the context the engine sends, forecasts included: it calls neither a weather service nor a tariff provider, and opens no connection to the outside.
  • What it learns stays on site.

Who can write an optimiser

Anyone. The protocol is open and described by a machine-readable contract published under GPL-3.0. A free reference optimiser and a conformance suite let you write your own and check it against the real engine — see Writing an optimizer.

The ETM optimiser

ETM-Schurig offers its own proprietary optimiser, included in the Pro edition. It connects through this same protocol, within the same limits: it advises, the engine decides. At handshake it announces itself as etm-optimizer; the reference optimiser announces itself as powersync-optimizer.

In this section

  • Protocol — transport, handshake, context, plan, fallback, validation rules.
  • Contract — the OpenRPC file that is authoritative on the shape of messages.
  • Writing an optimizer — reference optimiser and conformance suite.