Experimental · pre-1.0 Rust · MIT or Apache-2.0 · BDEW EDI@Energy FV2025-04-01 → FV2026-10-01

Tools — the EDIFACT validator and four energy calculators, in your browser

Market communication and settlement
for German electricity and gas.

Check an EDIFACT message against its BDEW profile. Follow a change of supplier from Anmeldung to reply. In the Desk, inspect the rule behind a finding and decide whether to send the proposed answer.

cargo add edi-energy for the format layer, or just dev for the whole estate, seeded.

483 / 483published Prüfidentifikatoren imported
499Prüfidentifikatoren routed
83MaKo workflows
17EDI@Energy message types
14services
6deployable roles

Every one of the 483 Prüfidentifikatoren the BDEW Anwendungsübersicht publishes is imported. Of the 499 Prüfidentifikatoren routed, 461 appear in that overview, five more in binding AHB editions and 33 in DVGW formats. 464 additionally carry validated AHB segment rules. See the PID reference for the 22 overview codes without a route.

Who runs this

Choose the Marktrollen your installation serves. mako registers their workflows. Cedar policies control who can read each role’s processes.

NB Netzbetreiber

Distribution grid operator

Answers supplier registrations and terminations from the published Entscheidungsbäume, bills network use (NNE), settles Mehr-/Mindermengen, reports MaBiS Summenzeitreihen and executes Sperrung orders.

processd · netzbilanzd →

LF Lieferant

Energy supplier

Wins and switches customers, prices contracts against the tariff catalogue, bills retail consumption, issues EN 16931 e-invoices (XRechnung, ZUGFeRD) and collects by SEPA.

billingd · vertragd · invoicd →

MSB Messstellenbetreiber

Metering point operator

Runs the WiM device processes — installation, change of operator, fault handling — manages the smart-meter gateway lifecycle, and delivers metered values to everyone entitled to them.

edmd · makod →

ESA Energieserviceanbieter

Energy service provider

Orders measured values under the § 34 MsbG Wertebestellung, quotes its own measurement products, and invoices the service against the quotation the counterparty accepted.

makod — ESA messages →

BKV Bilanzkreisverantwortlicher

Balance responsible party

Receives its Bilanzkreissummenzeitreihen from the BIKO, answers them with a Prüfmitteilung, takes the Datenstatus, and requests its Bilanzkreiszuordnungsliste and Clearingliste BAS under MaBiS.

makod — MaBiS messages →

EIV Einsatzverantwortlicher

Dispatch planner, Redispatch 2.0

Records plans, unavailabilities, master data and Kostenblatt sent through the operator’s channel. Tracks the Data Provider’s acknowledgement. A person releases the response to a grid operator’s activation.

makod — Redispatch messages →

What happens to a message

A market partner sends an interchange over AS4. Everything after that is the same path for every process — parse, validate against the AHB in force on that date, route to a workflow, and answer inside the Frist.

Send one through it:
  1. Marktpartner → AS4 sign · encrypt · receipt in production
  2. Parse + validate MIG · AHB · semantic
  3. Workflow event-sourced, replayable
  4. Frist BDEW Werktag calendar
  5. Answer CONTRL · APERAK · answer interchange
  6. Outbox → ERP persist before dispatch · CloudEvents in production

Stages 2 to 5 are computed in your browser by the code makod runs; nothing leaves the tab. Open it in the Validator →

The format layer imports published BDEW profiles. Workflows receive typed commands and emit typed events.

What it looks like

Parse an EDIFACT message and check whether you can send it on a given date.

use edi_energy::{parse, EdiEnergyMessage, Error};

fn can_send(wire: &[u8], on: time::Date) -> Result<bool, Error> {
    let msg = parse(wire)?;
    Ok(msg.validate_on_date(on)?.is_sendable())
}

Supply the validation date to distinguish Formatversionen that share a wire release code. An unknown Prüfidentifikator makes a message unsendable. For incoming messages, makod answers a format violation with APERAK Z35 and identifies the affected segment.

Parsing reference →  Validation reference →

The shape of the platform

Fourteen services along one path: transport and protocol at the edge, master data in the middle, settlement, billing and the customer's documents at the end — each owning its own data, talking over typed REST and CloudEvents.

graph TB
    subgraph edge["Edge — protocol"]
      MAKOD["makod
AS4 · EDIFACT · workflows"] PROCESSD["processd
STP decisions · BNetzA KPIs
Sperr-/Entsperraufträge"] end subgraph core["Core — market data"] MARKTD["marktd
BO4E hub · fan-out"] VERTRAGD["vertragd · productd
contracts · products"] EDMD["edmd
metering · SMGW"] end subgraph money["Settlement and billing"] NETZ["netzbilanzd
NNE · MMM · MaBiS Summenzeitreihen"] EINSD["einsd
EEG · KWKG"] BILLINGD["billingd · invoicd
retail · EN 16931"] ACCT["accountingd
FI-CA ledger"] OUTPUTD["outputd
documents · delivery"] end subgraph ops["Operations"] AGENTD["agentd
AI specialists"] PORTALD["portald
customer portal"] end PROCESSD --> MAKOD MAKOD --> MARKTD MARKTD --> VERTRAGD MARKTD --> EDMD EDMD --> NETZ EDMD --> EINSD EDMD --> BILLINGD VERTRAGD --> BILLINGD NETZ --> ACCT BILLINGD --> ACCT BILLINGD --> OUTPUTD ACCT --> OUTPUTD EINSD --> ACCT PORTALD --> BILLINGD MARKTD -.->|"de.mako.engine.*"| PROCESSD AGENTD -.->|"MCP reads"| MARKTD AGENTD -.->|"MCP reads"| PROCESSD

One operator guide per service →

What you get

Protocol & process

Parse, validate and build all 17 EDI@Energy EDIFACT types plus the four DVGW gas formats, and run each routed MaKo process as an event-sourced, replayable workflow over AS4/ebMS3 — BDEW AS4-Profil, sign and encrypt, signed receipts, retry with duplicate elimination.

makod · processd →

Market data

A typed BO4E market-data hub — MaLo/MeLo, contracts, supply status, device configuration, grid-operator registry — with durable CloudEvents fan-out and OIDC/JWT on every route.

marktd · vertragd · productd →

Metering & settlement

Quarter-hourly metering with § 60 MsbG substitute values and SMGW lifecycle; role-neutral grid settlement (NNE/MMM/MSB), EEG/KWKG feed-in and MaBiS Summenzeitreihen — each position carrying a legal-reference calculation trace.

edmd · netzbilanzd · einsd →

Billing & ledger

Retail billing with EN 16931 e-invoicing (XRechnung, ZUGFeRD), SEPA collection and returns, a hash-chained FI-CA ledger with § 147 AO period seals and Merkle inclusion proofs, and the documents themselves — rendered from operator templates and delivered with per-channel evidence.

billingd · invoicd · accountingd · outputd →

Operations & oversight

In the Desk, a Lieferant works through Anmeldungen in Frist order and can hand a colleague a link to the exact process. Staff review proposals on Freigaben, invoice disputes and geparkte Buchungen. The platform also includes BNetzA reporting, a customer portal and an agent plane over the platform's 212 MCP tools. Its 30 declarative specialists are advisory by construction: no active manifest grants a mutating tool, every model and tool call is a journaled effect, and a triage worklist carries what a person has to see.

processd · portald · agentd →

Testable from Python

makotest binds the same Rust core the platform runs — BDEW check digits, the Werktag calendar, the published answer Fristen, EDIFACT build and AHB validation — so a test and production can never disagree about what “valid” means, nor about when a Frist expires.

makotest →

How format changes reach your deployment

Each dated profile identifies its BDEW source PDFs by filename and digest. At cutover, running processes keep their original Formatversion.

  • Operator approval — an assistant can propose a response. You inspect its evidence and decide whether to send it.
  • Auditable by construction — event-sourced processes, replayable state, hash-chained ledger with § 147 AO period seals.
  • Six market roles, one engine — NB, LF, MSB and ESA answer from the published Entscheidungsbäume, the BKV takes its MaBiS share, the EIV its Redispatch 2.0 share, and a deployment registers only the processes of the roles it declares.
  • Validation findings — inspect the rule and field that prevent sending.
  • Fristen that agree with each other — one BDEW Werktag calendar, from the APERAK clock to an agent's approval window.

Start in minutes

# Validate an EDIFACT message for a given date
cargo add edi-energy time

# Run the whole estate, seeded with one Stadtwerk, with the Desk
just doctor && just dev

# Drive it from Python — generators, simulators, pytest plugin
pip install makotest

Full getting-started guide →

Experimental · pre-1.0: interfaces may change between releases, and a production deployment needs your own testing against your own counterparties. Dual-licensed MIT or Apache 2.0.