Scenarios
- Scenarios are predefined trace fixtures that test the analysis engine. Each scenario has a - trace and a list of expected failures. + Scenarios are predefined trace fixtures that test the analysis engine. Each scenario pairs a + trace with the failures it is expected to produce, so the detection engine can be checked + against known-good and known-bad sessions.
Built-in Scenarios
-DebugKit v0.1 includes 5 scenarios:
- -normal-session
-- A complete charging session: boot, authorize, start transaction, meter values, stop - transaction. No failures expected. -
+The toolkit ships 15 scenarios:
-
-
expectedFailures: []+ normal-session — a complete session (boot, authorize, start, meter + values, stop) with no failures expected.
-
failed-auth
-- Failed authorization: the idTag is rejected by the CSMS. StartTransaction is not attempted. - The connector transitions to Faulted. -
--
-
expectedFailures: ["FAILED_AUTHORIZATION"]+ failed-auth — the idTag is rejected by the CSMS; StartTransaction is not + attempted.FAILED_AUTHORIZATION
-
connector-fault
-- Connector fault during an active session: the connector reports a Faulted status - mid-charging, and the transaction stops with a fault reason. -
--
-
expectedFailures: ["CONNECTOR_FAULT"]+ connector-fault — the connector faults mid-charging and the transaction + stops with a fault reason.CONNECTOR_FAULT
-
station-offline
-- Station goes offline during an active session: a StartTransaction is sent but no - StopTransaction follows. -
--
-
expectedFailures: ["STATION_OFFLINE_DURING_SESSION"]+ station-offline — a StartTransaction with no StopTransaction to follow.{' '} +STATION_OFFLINE_DURING_SESSION+
+ -
+ meter-value-gap — an active transaction with no MeterValues between start
+ and stop.
METER_VALUE_GAP+
+ -
+ invalid-stop-reason — a StopTransaction reason not in the OCPP 1.6
+ specification.
INVALID_STOP_REASON+
+ -
+ unexpected-start — a StartTransaction with no preceding BootNotification
+ or Authorize.
UNEXPECTED_START+
+ -
+ status-transition-violation — an invalid OCPP 1.6 connector status
+ transition (Available directly to Finishing).
STATUS_TRANSITION_VIOLATION+
+ -
+ diagnostics-failure — a DiagnosticsStatusNotification reporting
+ DiagnosisFailed.
DIAGNOSTICS_FAILURE+
+ -
+ slow-csms-response — the CSMS takes 15s to answer a BootNotification.{' '}
+
SLOW_RESPONSE+
+ -
+ meter-anomaly — meter values decrease during a transaction
+ (non-monotonic).
METER_VALUE_ANOMALY+
+ -
+ short-session — a session lasting only ~10 seconds.{' '}
+
SUSPICIOUS_SESSION_DURATION+
+ -
+ heartbeat-irregular — heartbeats at irregular intervals (300s expected,
+ 600s observed).
HEARTBEAT_INTERVAL_VIOLATION+
+ -
+ unresponsive-csms — a Call is sent but the CSMS never answers.{' '}
+
UNRESPONSIVE_CSMS+
+ - + unexpected-stop-reason — a parser/timeline-only fixture (no detection + rule matches) that validates handling of stop events with error payloads.
unexpected-stop-reason
+Failure Detection Rules
- A stop transaction with an unexpected stop reason. This is a parser/timeline-only fixture — - no v0.1 detection rule matches it. + The detection engine implements 16 rules covering the OCPP 1.6J failure taxonomy, ranked by + severity:
-
-
expectedFailures: []+FAILED_AUTHORIZATION— Authorize rejected by the CSMS +
+ -
+
CONNECTOR_FAULT— connector reports Faulted during an active session +
+ -
+
STATION_OFFLINE_DURING_SESSION— station drops offline mid-transaction, or a + transaction never stops +
+ -
+
UNRESPONSIVE_CSMS— a Call is sent but never answered (no CallResult or + CallError) +
+ -
+
SLOW_RESPONSE— a response exceeds the expected latency budget +
+ -
+
TIMEOUT_NO_HEARTBEAT— no heartbeat within the expected window +
+ -
+
HEARTBEAT_INTERVAL_VIOLATION— heartbeats arrive outside the configured + interval +
+ -
+
REPEATED_BOOT_NOTIFICATION— repeated boots suggest a reboot loop +
+ -
+
METER_VALUE_GAP— an active transaction with no MeterValues +
+ -
+
METER_VALUE_ANOMALY— meter values decrease during a transaction +
+ -
+
STATUS_TRANSITION_VIOLATION— an invalid connector status transition +
+ -
+
UNEXPECTED_START— a StartTransaction without a preceding boot or authorize +
+ -
+
INVALID_STOP_REASON— a StopTransaction reason outside the OCPP 1.6 spec
-
Failure Detection Rules
-Three detection rules are available in v0.1:
--
- FAILED_AUTHORIZATION — Authorize response with
-
idTagInfo.status = "Invalid"+SUSPICIOUS_SESSION_DURATION— a session ends suspiciously quickly -
- CONNECTOR_FAULT — StatusNotification with
-
status = "Faulted"during an active session +DIAGNOSTICS_FAILURE— a diagnostics upload reports failure -
- STATION_OFFLINE_DURING_SESSION — Session has StartTransaction but no
- StopTransaction, or connector transitions to Unavailable/Offline during an active
- transaction
+
FIRMWARE_UPDATE_FAILURE— a firmware update reports failure
Download & Install Studio
++ OCPP DebugKit Studio is a native desktop app. It is pre-1.0 (0.x) while Zig, the Native SDK, + and the toolkit conformance reference are all pre-1.0. +
+ +macOS (Apple silicon)
+Paste this into a terminal. It installs the latest Studio into Applications and opens it:
+
+ {`curl -fsSL https://raw.githubusercontent.com/ocpp-debugkit/studio/main/scripts/install-macos.sh | bash`}
+
+
+ The script downloads the latest release, verifies its SHA-256, installs the app, and
+ launches it — no toolchain, no manual steps. Prefer to read it first? See{' '}
+
+ scripts/install-macos.sh
+
+ .
+
Linux
+
+ Download the .tar.gz from the{' '}
+
+ Releases
+ {' '}
+ page, extract it, and run the studio binary. Requires GTK 4 (
+ libgtk-4, libwebkitgtk-6.0).
+
Build from source
+
+ Prerequisites: Zig 0.16.0 and the
+ Native SDK CLI (npm install -g @native-sdk/cli).
+
+ {`git clone https://github.com/ocpp-debugkit/studio.git
+cd studio
+native build # produces the release binary`}
+
+
+ All downloads
++ Every release, with checksums and platform assets, is on the{' '} + + GitHub Releases + {' '} + page. +
+OCPP DebugKit Studio
++ Studio is a native desktop debugger for OCPP charging sessions — the bench instrument of the + OCPP DebugKit ecosystem. It sits between a charging station and its backend, decodes every + frame live, flags protocol failures as they happen, and keeps a high-performance offline + inspector for the traces you capture. +
++ It is built in Zig on the Native SDK — native-rendered, no + browser, no Electron. It starts instantly, stays small, and does the things a browser tab + fundamentally cannot: open raw sockets, watch the filesystem, and run for days as a + background monitor. +
+ +What it does
+-
+
- + Inspect — open JSON / JSONL / bare-array traces in a virtualized timeline + that stays smooth past 500k events; unpack any message, see the session it correlates + into, and search or filter by action, direction, type, or severity. + +
- + Detect — the full OCPP 1.6J failure taxonomy (16 rules), conformant with + the toolkit's reference, ranked critical to info with remediation steps. + +
- + Watch — a live WebSocket proxy between a charge point and its CSMS: decode + frames in flight, run detection as events stream, record to the canonical trace format, + and get an OS notification the moment a critical failure appears. + +
- + Prove — Markdown / HTML reports, semantic trace diffing, + anonymize-on-export, and step-through replay. + +
- + Scale — native performance with no garbage collector; stream-parse traces + far past what a browser tab can hold. + +
-
+ Script — the same binary is a headless CLI (
+
inspect,report,diff,anonymize,{' '} +capture,ci) for pipelines and automation. +
+
Native, not a browser tab
++ Studio and the toolkit's web inspector share no code. They meet only at a conformance + contract — the same trace format, the same normalized event model, and the same failure + taxonomy — verified in CI on every change. A trace captured in Studio opens in the web + inspector, and vice versa. See the{' '} + + conformance contract + + . +
+ +Get Studio
+-
+
- + Download & install — macOS one-liner, Linux + build, and release downloads. + +
- + + Source on GitHub + {' '} + ·{' '} + + Releases + + +
OCPP DebugKit
- Open-source DevTools for debugging OCPP charging sessions. Inspect traces, detect - failures, and generate reports — right in your browser. + Open-source DevTools for debugging OCPP charging sessions. Parse, analyze, and diagnose + traces from a browser tab, your CI pipeline, or a native desktop instrument.
+ Two tools, one trace format +
++ The OCPP DebugKit family is two independent products that share the same trace format, + event model, and failure taxonomy. Use one, or both. +
+| + | Toolkit | +Studio | +
|---|
+ Capture in one, open in the other +
++ A trace captured in Studio opens in the toolkit's web inspector, and vice versa. The + two are independent implementations checked against the same{' '} - View on GitHub - -
- Features
+
+ What it does
+
+
+
+
+
What it's not
@@ -67,30 +179,14 @@ export default function HomePage() {
- Architecture -
-- A single package with modular subpath exports. Use only what you need. -
-
+
Quick Start
- {`# Install the CLI
+ {`# Install the toolkit CLI
npm install -g @ocpp-debugkit/toolkit
# Inspect a trace
@@ -119,14 +215,22 @@ ocpp-debugkit scenario run failed-auth`}
- {`# Install the CLI
+ {`# Install the toolkit CLI
npm install -g @ocpp-debugkit/toolkit
# Inspect a trace
@@ -119,14 +215,22 @@ ocpp-debugkit scenario run failed-auth`}