siniaev.dev / Truckroll / on-call notes Nov 2026 · truckroll.siniaev.dev
Truck roll, n.Sending a technician out to a site. Every fault the software fixes remotely is one less.

Truckroll.

A charging network that breaks on purpose, and the operations around it. Fifty simulated chargers, real power prices and weather, faults injected around the clock, and the whole chain from detection to the regulator’s report.

50
chargers · OCPP 1.6J
13
fault scenarios
175
tests
$0.0004
per AI triage
01What and why

A charge point operator, minus the chargers

Truckroll pretends to be a small EV charging operator in the Netherlands. Four sites, fifty chargers, seventy connectors. The chargers are simulated, but they speak the real protocol (OCPP 1.6J) to a backend I wrote, and everything around them behaves like the real thing: drivers arrive and queue, the grid has limits, power gets expensive in the evening, the wind knocks out a site’s uplink, a firmware update goes wrong.

The point is to learn the operator’s side of the job end to end, in one system I can break whenever I like:

  • how chargers, a backend and the grid talk to each other, and where that goes wrong;
  • how to detect a fault, respond, verify the fix and say how long each step took;
  • where an AI agent actually helps the person on call, measured rather than assumed;
  • what EU rules (NIS2, the Cyber Resilience Act) ask for after an incident.

It runs live, all the time. The numbers on this page come from it.

Fleet
50 chargers, 70 connectors, 4 sites with their own demand patterns
Protocol
OCPP 1.6J over WebSocket: boot, heartbeats, authorize, sessions, meter values, smart charging profiles, resets
Real inputs
ENTSO-E day-ahead prices for NL (15-minute slots), Open-Meteo weather, Amsterdam time
Faults
13 scenarios, one every 5 to 10 minutes, plus weather-triggered ones
AI
Gemini 3.5 Flash-Lite, one call per incident, about 700 tokens in and 110 out; about $0.0004 per triage at paid prices; a typical day is about a cent, and the 150-call cap keeps it under $0.07
Tests
175, in the backend and the control service
Video. One day in 51 seconds: a fault started from the control panel, the AI triage and a person’s decision, the evening rush, the night, and the reports.
02The live map

One screen for the person on call

The map is an isometric drawing of the four sites, redrawn every two seconds from the live state. Cars pull in, wait in the lane in front, plug in and leave. Each car’s small light is its connector’s state. Power lines from the substation animate with the load, the sky follows the real time of day in Amsterdam, and each site card shows load against its grid cap, the current tariff and the battery.

Across the top: uptime, cars charging, cars waiting, power against caps, the price, the day’s margin and open incidents. Each one explains itself when clicked.

The Truckroll live map: four isometric charging sites, an incident list at the top, service levels on the right
Fig. 1. The live map in the morning. Incidents along the top, one line each; service levels for the day on the right.
Details for one charger: power, limit, connectors with delivered and needed energy and an ETA
Fig. 2. One charger: power now, the limit and where it comes from, and per connector what the car has had, what it needs and when it should be done.
The live map on a phone, with incidents in a sheet at the bottom
Fig. 3. On a phone, incidents live in a sheet at the bottom. Questions stay visible even when it’s closed.
03How it fits together

Architecture

Everything runs in Docker Compose on one small Hetzner server. The simulated chargers connect to my backend (the CSMS) through Toxiproxy, one proxy per site, so a site’s network can drop, slow down or flap without touching the code on either end. A control service sits on top: it reads the fleet, runs the energy model and the drivers, detects incidents, asks people and the AI, and serves the map.

Hetzner CX23 · Docker Compose outside ENTSO-ENL day-ahead, 15 min Open-Meteosun, cold, gusts Browsersmap, reports, Grafana Gemini3.5 Flash-Lite, JSON Desk chargerESP32, MicroOcppnext: a real station CaddyTLS; open to anyone,no login controlPython, FastAPI, asyncio site controller · lowest limit wins drivers: arrivals, queue, patience tariffs, batteries, money incident engine · rules per fault questions with deadlines technicians · ETAs · €150 visits reports · NIS2 / CRA rules AI triage and its scoring live map over SSE Grafana24 panels, public view Prometheus Loki OTel collectormetrics and logs CSMSOCPP 1.6J backendPython Toxiproxyone per site:drop, lag, flap SimulatorSAP e-mobility, Node50 chargers, 4 sitessessions driven by control 1 call per incident scrape;agent’sread-onlyqueries admin API faults start / stop sessions chargers → proxy → CSMS, OCPP over WebSocket OCPP over TLS, through Caddy
Fig. 4. Orange is the path a charger’s messages and the AI’s work take. Dashed: the desk charger, which is being built.
Backend
Python 3.12, FastAPI, asyncio, mobilityhouse ocpp, websockets
Chargers
SAP e-mobility charging stations simulator, driven over its UI protocol
Network faults
Toxiproxy
Observability
OpenTelemetry collector, Prometheus, Loki, Grafana
AI
Gemini 3.5 Flash-Lite over REST, JSON schema output, minimal thinking
Front end
Plain JavaScript and SVG, no framework, no build step
Hosting
Docker Compose, Caddy, one Hetzner CX23 (2 vCPU, 4 GB); the whole stack uses about 1.4 GB
04Energy and drivers

Power costs money, the grid has limits, drivers have patience

The energy side is a small model of what a real site controller does.

  • Prices are the real Dutch day-ahead market from ENTSO-E, plus about €0.11/kWh of fees and taxes. The evening peak hurts.
  • Grid caps per site. The controller shares the available power between the cars charging there, and the depot’s battery tops up when power is cheap and supports the site when it’s expensive.
  • Limits stack, and the lowest one wins: the site’s cap, a grid operator’s congestion request, an operator’s manual limit, the battery plan. The charger page says which one is active.
  • Weather is real: solar on the depot roof, cold batteries slowing DC charging below 0 °C, strong gusts making a site’s uplink flap.
  • Drivers arrive by hour of day and site type, queue in the lane, and give up after a while. Public drivers check the app and go elsewhere when the wait is long. Prices move with load and power cost, and demand reacts to them.
  • Money: every session is billed. Revenue, energy cost, revenue lost to drivers who left, and technician visits add up to the day’s margin, which can go negative.
05Incidents

Something breaks every few minutes

A random scenario starts every 5 to 10 minutes. Each one injects a real fault into the simulator, the proxies or the backend, never a fake alert:

  • depot offline
  • storm: uplink flapping
  • firmware crash loop
  • RFID auth backend slow
  • backend overloaded
  • reconnect storm
  • meter drift
  • connector stuck in Preparing
  • jammed connector lock
  • overheating charger
  • charger ignores its power limit
  • grid congestion request
  • cold snap (expected, not a fault)

The incident engine knows nothing about scenarios. It only watches what an operator would see: connector states, missing heartbeats, meter values, reply times, power against limits. Each kind of fault has its own rules for detect, respond, verify and recover. A stuck connector gets asked for its status, then a soft reset, then watched; a meter that drifts gets its sessions put on a billing hold; a charger that ignores limits gets the limit re-sent, then is taken out of service.

Each incident is a single line: what happened, what was done, how it ended. Clicking it opens the full timeline.

One incident expanded into its full timeline, from detection to recovery
Fig. 5. One incident from start to finish. A charger reported 23.4 kWh in 30 seconds, which a 150 kW charger can’t deliver. Billing went on hold, the agent blamed the hardware and suggested a calibration, nobody answered within 90 s, so a technician went out. The meter was fine: the bad number came from the data, not the meter. Billing was released 30 minutes after the alert.

What gets timed

Four clocks per incident, the ones that matter on call:

problemstarts alert a personacts impactcontained resolved detect acknowledge mitigate resolve

Acknowledge only counts a person. When every question goes to its default, nobody acknowledged it, and the page says so instead of inventing a number.

06A person in the loop

Risky actions become questions

Anything that costs money or touches a driver’s session is asked first: reset a charger, take one out of service, send a technician (€150), open a firmware ticket with the vendor, turn on free vend while card checks are down. Each question has a deadline and a default that’s stated up front: “No answer in 45 s means yes.” The decision is written into the incident either way.

Visitors on the live site can answer them. Most still go to the default: on the day of these screenshots, 3 of 26 questions were answered in time, which is a fair picture of a night shift.

A question waiting for an answer, with Approve and Reject buttons
Fig. 6. A question waiting for an answer, with its deadline and what happens if nobody replies.

Technicians

When a fault needs hands, a technician is dispatched with an ETA: 15 to 30 minutes of driving, 10 to 20 on site (compressed from the real 2 to 4 hours so the whole loop is visible). On arrival they fix the simulated charger for real: replace the part, power-cycle and swap the modem, update the firmware, or check the meter, which lifts the billing hold on its sessions.

07AI triage

An agent that has to earn its keep

Every incident gets one call to Gemini once it’s been open for a short while. The agent writes its view into the timeline and may suggest a next step. It can’t act directly: a suggestion becomes a question like any other, and a confident one goes ahead if nobody says no in 90 s. In a real control room that default should be no.

1 Incident opensrules detect it,the response starts 2 Contexttimeline, charger, site,backend; no scenario names 3 Geminicategory, evidence,next step, confidence sure? 4 Verdictwritten into the timeline,tagged with its confidence Below 60%: look it upup to 3 read-only Prometheus / Lokiqueries, then a second call 5 Suggestion → question70% or more: goes aheadunless someone says no.Below that: needs a yes. 6 Scored lateragainst a hidden ledger of what wasreally injected; the agent never sees it Guard rails6 calls a minute, 150 a day, pause on 429, retryon 503; blind A/B mode hides even the rule titles yes no
Fig. 7. The agent’s path. It reads metrics and logs only through an allow-list, and only when it says it’s unsure.

How good is it

Each scenario run is scored against the ledger: did the agent name the right kind of root cause? Over 70 triaged runs:

MeasureResultNote
Root cause right77%74% on its first look, before any queries
Strong on100%RFID auth slow 9/9, overheating 6/6, storm 6/6, depot offline 5/5, jammed lock 5/5
Weak on22%stuck connector 2/9: it calls a firmware hang “expected”
False “all clear”14said nothing was needed while a real fault ran; the reason the default for unsure suggestions is no
Time to a summary20 smedian, from the incident opening
Size of a triage≈ 700 / 110tokens in / out; the free tier covers it. At paid prices that’s about $0.0004 per triage, about a cent a day

One early mistake: scenario events leaked into the agent’s context, so it could read the answer. The leak was fixed and scoring restarted from zero; runs before the fix aren’t counted.

08Reports and rules

Post-mortems, NIS2 and the Cyber Resilience Act

Every incident has a report page. Rules, not the model, decide which regulations apply, and they say why:

  • NIS2 (in the Netherlands, the Cyberbeveiligingswet): charging operators count as the energy sector. A significant incident, here a whole site down for 30 minutes or a backend failure hitting every site for 10, needs an early warning within 24 hours, a notification within 72 and a final report within a month.
  • CRA (reporting since 11 September 2026): manufacturers report actively exploited vulnerabilities and severe security incidents in their products, 24 hours, 72 hours, then 14 days after a fix.

The AI drafts the post-mortem and any notifications in one call, using only the facts from the incident: summary, impact, root cause, what worked, what to improve, actions with an owner. A person approves each part. Truckroll never sends anything to an authority.

Report page: incident list, applicability of NIS2 and CRA, and a coloured timeline
Fig. 8. The reports page. Neither regime applies to this RFID outage, and it says why; the timeline shows the agent’s triage and the questions asked.

While you were away

Coming back to the map after a while opens a handover: what opened and closed, which questions went to the default, what’s still open, which service levels were missed, and the day’s margin. The AI writes three lines on top; the numbers underneath come from the incident log.

The AI text is cached against the exact facts it was written from. If the facts have moved on and a new call isn’t allowed yet, the card shows the facts alone rather than an outdated summary.

While you were away card with an AI summary, counts and missed service levels
Fig. 9. The handover after eight hours away.
09Metrics

Service levels, including the misses

Targets are set up front and checked live. A snapshot from 26 November 2026:

Service levelTodayTarget
Uptime, as drivers saw it99.26%≥ 99%met
Uptime, leaving out injected faults99.996%≥ 99%met
Session starts that worked100%≥ 98%met
Grid cap overruns longer than 60 s00met
Flex delivery (under the grid operator’s limit)66.7%≥ 95%missed
Time to detect, median0 s≤ 2 minmet
Time to mitigate, median0 s≤ 10 minmet
Time to resolve remotely, median3 min≤ 15 minmet
Questions answered by a person12%≥ 50%missed

Metrics and logs also go through OpenTelemetry into Prometheus and Loki, and a Grafana dashboard, generated from code, shows the fleet with the same thresholds as the map.

Grafana dashboard for the Truckroll fleet
Fig. 10. The public Grafana dashboard: uptime, cars waiting, each site’s load against its grid cap, the power price, the day’s margin and how many connectors work.
10From the log

Things I got wrong

The repository keeps an honest log. A few entries, because they taught more than the parts that worked:

  1. The same mistake, twice: measuring from the wrong starting point.

    To work out what a session has used, you subtract the meter reading at its start from the reading now. Twice I took the “start” reading too early, when the meter still showed the previous session’s total. In the meter check, that raised a night of false calibration alarms. In the driver model, cars never reached their target, so they charged forever and the queues grew. Both now use the backend’s own figure for each session.

  2. A restart that closed 24 incidents.

    A timer saved by one build was read back by the next as the wrong kind of time, so a “quiet for 30 minutes” check passed instantly. Timers are now stored with their kind, and the 24 records were corrected rather than left wrong.

  3. Deploys that emptied the map.

    Every deploy rebuilt the charger simulator from source and cut every session. Deploys now build only my own services, and a site that loses all its sessions at once refills when it comes back.

  4. An AI summary that disagreed with its own numbers.

    A cached text was shown next to newer facts. Now it’s cached per set of facts, or not shown.

11Next

A real charger on the desk

The next station on the network is physical: an ESP32 running MicroOcpp in a 3D-printed pedestal, a relay that clicks like a contactor, an INA226 measuring the real current, two LED rings (charger status, and the site’s load against its grid cap), an RFID reader with valid, expired and unknown cards, and a 1:24 taxi as the car, whose LED strip dims when the site controller lowers the limit. Low voltage only, nothing near mains. It will join as its own site over TLS, under a camera, so the incidents above can happen to something you can see.

After that: signed firmware, an SBOM and a vulnerability scan in CI, which is what the CRA expects from a product with a radio in it.

Plan of the desk diorama: charger pedestal, taxi, grid box, card rack
Fig. 11. The plan for the desk diorama, to scale on two printed tiles.

+ More from siniaev.dev

  • Woordje A Dutch vocabulary trainer that explains words and sentences and grades every answer.
  • PLS:3D A one-person store for printed camo stencils, and RBaken, a LoRa team radar.
  • Books I recommend The reading behind how I lead and build.