OK Energy · Internal documentation

OKE technical documentation

Reference docs for the OKE energy management platform — domain model, telemetry pipeline, trading workflows, MQTT device protocol, and operations. Source of truth for invariants and rationale that aren't obvious from the code.

01

Architecture & Patterns

3 docs

The conceptual model and the design conventions every contributor needs in their head — entity relationships, storage tiers, EF Core patterns, and how data moves through the system.

02

Telemetry & Forecasting

4 docs

The time-series pipeline: how raw samples become 15-minute billing-grade aggregates, how forecasts are derived per resource and aggregated to balance groups, and how forecasts become schedules sent to the TSO.

03

Trading & Markets

8 docs

Day-ahead trading, balancing, and market communication (MaKo). How OKE participates in the German energy market via VICOS, balance-group management, and the EDIFACT message exchanges.

Trade lifecycle
Trade state machine, request / confirm / settled flow, integration with schedule send-gating.
trade.html
Trading interface
Operator UI for placing trades, inspecting flows, and reconciling positions against schedules.
trading-interface.html
Bährbots contract v0.1
External trading partner contract spec — message envelope, signature, retries, error model.
trading-baehrbots-contract-v0.1.html
Market communication (MaKo / VICOS)
VICOS integration, inbound/outbound message routing, certificate handling, the receive-first/process-async pattern.
maco.html
MSCONS lifecycle & supersession
How inbound MSCONS documents are kept as immutable history, classified into effective/superseded/retry/review, and gated before contributing values.
mscons.html
Market partners
Marktpartner directory and role assignments — TSO, DSO, MSB, supplier — and how they map to OKE entities.
market-partners.html
Invoice specification
Invoice generation flow, line items, tax handling, and the INVOIC EDIFACT export contract.
invoice.html
Electricity tax (Stromsteuer)
MSCONS-only MaLo quantity determination, annual validation against the HZA reference, two-directional 10 % compliance monitoring + annual-forecast deadline alerts, and the Belegheft.
electricity-tax.html
Missing day-ahead ANO workaround
Operational workaround for missing announcements from market counterparties — when to apply it and what gets reconciled later.
missing-day-ahead-ano-workaround.html
04

EDIFACT

9 docs

Message-format references for the German energy market. One overview, an architecture page for the parsing pipeline, and a per-message-type page (UTILMD, MSCONS, INVOIC, …) describing the AHB mapping that OKE implements.

05

MQTT & Devices

8 docs

The device side: how Okesp gateways and the API talk over MQTT/mTLS, how gateway configurations are pushed and rolled back, the OTA pipeline, and the control-schedule mechanism for actuating real hardware.

06

Operations

9 docs

Auth, CI/CD, observability, validation, and the cross-cutting concerns that keep the lights on. Plus follow-up items that don't yet warrant a multi-PR plan.