Files
Enelix-EMS/docs/netplan-v4-receiver.md
T

2.8 KiB

V4 plan reception and local preview (observation only)

This module does not execute a battery command. The existing regulator and its setpoints remain unchanged. NetzfahrplanAktiv must remain false.

The optional NetzfahrplanV4EmpfangAktiv property defaults to false. When enabled with the existing shadow sender, one bounded GET is made before the next native operation POST, avoiding reading the plan immediately after queuing its replan. A successful inspection acknowledges shadow_seen once per plan/step. This is not applied. An HTTP failure clears the local preview; it does not change the old control mode or its connection credentials.

The V4 service must first support receiverProtocolVersion=1, installation IDs in envelope and plan, per-input event references, and the stable controlContext used at calculation time. Old or cross-plant responses are deliberately refused. The client checks fresh/lastRun/pending status, exact configuration revision, model-family registry, known price coverage, contiguous half-open five-minute intervals, asset mapping and power balance. Numerical feasibility checks are not evidence of economic performance or permission to control devices.

A cache watchdog refreshes the diagnostic display every 10 seconds, without any network requests. Cached response older than 90 seconds, plan older than 900 seconds, an expired step, invalid local measurement or policy change invalidates the preview. Missing targets are JSON null and '-' in the display, never zero. Restart/ApplyChanges clears the cache. Existing control functions are not edited.

The preview is currently limited to ONE battery. Multiple batteries are still accepted by the server planner; local allocation is explicitly unsupported in this stage. Preview feedback uses actual grid and battery power, local capacity, available power, minimum/maximum SOC, discharge hysteresis, network-charging permission and import/export/month limits. It exposes any remaining grid-limit violation instead of pretending the battery can resolve it. It is a momentary calculation only, NOT the commissioned real-time regulator. PV curtailment and external SDL/base-load separation must still be validated before any live test.

Two read-only variables below the manager expose a HTML summary and detailed JSON. No EnableAction, consumer RequestAction, SendData or actor property writes are used. The existing form.json and web portal assets are not modified.

Offline checks:

php tests/V4Receiver/protocol_checks.php
php tests/V4Receiver/receiver_checks.php

The PHPUnit wrapper runs these in separate subprocesses, so fake IPS and curl functions cannot contaminate other module tests. The mocked transport uses no real credentials or connections. Full Symcon kernel testing and installation are separate commissioning steps; these unit tests are not field acceptance.