Vehicle Measurements, Signed Confirmations, and Clock Comparison in Charge Transparency Records (CTR)
Status: Concept paper, draft for discussion
Version: 0.3 (2026-12-03)
Primary CTR context: https://open.charging.cloud/contexts/CTR+json
Extension context: https://open.charging.cloud/contexts/CTR-EV/v1+json
Companion documents: Chargy in the Vehicle, Metrological CBOR (Tag 44252), Metrological Text Format
Point of contact: Achim Friedland, GraphDefined GmbH
1. Summary
The Charge Transparency Record (CTR) used by Chargy (ChargyCore.TS, ChargyWebApp, ChargyDesktopApp, ChargyMobileApp) aggregates charging sessions, station infrastructure, tariffs, legally relevant log messages, time-synchronization snapshots, and cryptographically signed energy-meter readings into one portable JSON-LD model. Today, however, every measurement inside a CTR originates from the charging station's side. The electric vehicle (EV) — the only other physical measuring party present at every charging session — has no representation in the data model.
This concept paper specifies a backwards-compatible CTR extension that adds four tightly connected building blocks to ChargeTransparencyRecord and ChargingSession:
- Vehicle-side measurement series (
evMeasurements) and a top-level vehicle registry (electricVehicles), modeled directly after the charging station'smeasurementsandenergyMeterstructures (including dedicated series for bidirectional energy and auxiliary loads) so existing Chargy verification, graphing, and decimal-handling code can be reused without conflating vehicle telemetry with legally verified billing registers. - Digitally signed EV confirmations (
evConfirmations), enabling the vehicle to verify incoming station meter readings and return a signed verdict — either"accepted"or"rejected"— optionally carrying a machine-readableerrorCodeand a localizeddescription(I18NString), plus hash-chaining and optional station counter-signatures to prevent silent omission of rejections. - Optional clock-offset time series (
clockComparisons), modeled analogously to energy measurement series so the vehicle records an initial clock comparison before energy flows and can keep appending offset samples throughout and at the end of the session — capturing oscillator drift and mid-session clock steps between the vehicle clock, the charging station controller clock, and the energy meter clock. - Scheduled / triggered signed meter reading requests (
scheduledReadingRequests) and their binding into signed values, allowing either side to capture synchronized signed snapshots at legally relevant instants such as tariff changes, Smart Charging / grid-operator power constraints, bidirectional direction reversals, or 15-minute market-settlement boundaries.
Discrete vehicle lifecycle events such as IEC 61851-1 Control Pilot (CP) state transitions (plugIn, chargingStart, unplug) reuse CTR's existing legallyRelevantLogMessages model rather than introducing a separate event array.
The design distinguishes clearly between signing identities across ISO 15118 generations: ISO 15118-2 relies on the Plug & Charge contract certificate, whereas ISO 15118-20 introduces mutual TLS 1.3 and makes the vehicle certificate (and, long term, dedicated rotating OEM measurement certificates) the preferable signing identity for both Plug & Charge and EIM sessions.
2. Conformance Language and Design Goals
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in BCP 14 when, and only when, they appear in all capitals.
This extension follows the conventions established by ChargyCore.TS (CTR_Format.md, CTR_Time_Synchronization_Sources.md, and CTR_Legally_Relevant_Log_Messages.md):
- Strict backwards compatibility: Existing Chargy parsers that iterate
chargingSessions[].measurementsMUST NOT accidentally treat EV measurements as billing meter readings. Vehicle series therefore live in a sibling property (evMeasurements) with the same structural shape asmeasurements. - Metrological Text & lossless mCBOR (Tag 44252): Following Metrological Text Format, every physical quantity in JSON (energy, power, voltage, current, resistance, clock offset, round-trip delay, duration, uncertainty) MUST be serialized as a single self-contained
MetrologicalTextstring such as"68.420 kWh","12.034 s","(120 ±25) ms", or"1.8 mΩ"— never split into{ "value": ..., "unit": ... }objects and never encoded into property-name suffixes (energyKWh,offsetMs). This guarantees deterministic canonicalization (RFC 8785 JCS) and lossless 1:1 round-trip conversion to Metrological CBOR (CBOR Tag 44252) via@vanaheimr/metrological-cborandCOSE_Sign1+ RFC 9338 countersignatures via@vanaheimr/cose(Section 12). - Explicit separation of evidence vs. derived results: Signed vehicle measurements, signed confirmations, and signed clock comparisons are portable wire evidence; comparator verdicts computed later by ChargyWebApp remain derived verifier outputs (
verificationResult). - Cryptographic agility: Every signed structure carries a
signaturesarray compatible with Chargy'sIDocumentSignatureformat (keyId,algorithm,signedData,encodings,value), allowing ISO 15118 curves (P-256, P-521, Ed448), Ed25519, or future post-quantum / hybrid signatures to coexist. - Honest semantics: A raw ISO 15118-2
MeteringReceiptor ISO 15118-20MeteringConfirmationonly proves receipt, not correctness. CTR MUST NOT upgrade a delivery receipt into an"accepted"verification verdict.
3. CTR Placement and JSON-LD Context
A CTR carrying EV extension data SHOULD declare the extension context alongside the base CTR context:
{
"@id": "urn:ctr:2026-12-01-session-4711",
"@context": [
"https://open.charging.cloud/contexts/CTR+json",
"https://open.charging.cloud/contexts/CTR-EV/v1+json"
],
"begin": "2026-12-01T21:45:00Z",
"end": "2026-12-01T22:30:00Z",
"electricVehicles": [],
"chargingSessions": [
{
"@id": "urn:charging-session:4711",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"clockComparisons": [],
"scheduledReadingRequests": [],
"measurements": [],
"evMeasurements": [],
"evConfirmations": [],
"evReconciliation": {},
"legallyRelevantLogMessages": []
}
]
}
3.1 Summary of New Properties
| Scope | Property | Requirement | Purpose |
|---|---|---|---|
| CTR root | electricVehicles |
OPTIONAL | Registry of electric vehicles referenced by sessions, including their on-board measuring points, sensor metadata, and public keys / certificates. |
ChargingSession |
electricVehicleId |
OPTIONAL | Wire reference to an entry in electricVehicles. |
ChargingSession |
clockComparisons |
OPTIONAL | Clock-offset time series (one series per peer clock: station controller and energy meter), structurally analogous to measurements, recording offset, round-trip uncertainty, drift, and clock steps over the session. |
ChargingSession |
scheduledReadingRequests |
OPTIONAL | Bidirectional requests to capture signed meter readings at specific timestamps (tariff changes, Smart Charging, settlement). |
ChargingSession |
evMeasurements |
OPTIONAL | Ordered measurement series originating from the EV (charged, discharged, auxiliary, power), structurally analogous to measurements. |
ChargingSession |
evConfirmations |
OPTIONAL | Digitally signed EV acceptances or rejections of station meter readings (hash-chained, with optional station counter-signatures). |
ChargingSession |
evReconciliation |
OPTIONAL | Optional vehicle-side comparator summary (loss model, uncertainty budget, net balance, verdict). |
Vehicle-side Control Pilot (CP) state transitions (CP_STATE_CHANGED) reuse the existing legallyRelevantLogMessages collection (Section 10.2) instead of adding another session property. All new properties are OPTIONAL; a CTR without any of them remains a valid base CTR.
4. Top-Level electricVehicles Registry
Just as chargingStations describes the physical station, EVSEs, connectors, and energyMeter objects, electricVehicles describes the vehicle and its measuring equipment without forcing raw vehicle identification numbers (VINs) into consumer invoices.
4.1 Privacy and Pseudonymity
A VIN is personal data under the GDPR. Producers SHOULD NOT place a raw VIN in @id or vehicleIdentifier unless legally required (for example, a sealed verification-office reference vehicle). Instead, @id SHOULD be a session-scoped or rotating pseudonymous URN (e.g., urn:ev:pseudonym:...), linked to the signing certificate's subject or key identifier.
4.2 Example electricVehicles Entry
{
"@id": "urn:ev:pseudonym:7f9c2a1e",
"@context": "https://open.charging.cloud/contexts/CTR-EV/v1+json",
"pseudonymous": true,
"role": "consumerVehicle",
"manufacturer": {
"name": "Example Motors"
},
"model": {
"name": "Model E 800V"
},
"software": {
"name": "ChargyInTheVehicle",
"version": "0.15.0",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
"clockId": "urn:clock:ev:7f9c2a1e",
"energyMeters": [
{
"@id": "urn:ev-meter:7f9c2a1e:dc-inlet",
"measuringPoint": "inlet",
"powerType": "DC",
"calibrated": false,
"sensorType": "shunt",
"estimatedRelativeUncertainty": "(0.0 ±0.4) %, k=2",
"hardware": {
"manufacturer": "Isabellenhuette",
"model": "IVT-S-500-U3-I-CAN2-12/24"
},
"signatureFormat": "https://open.charging.cloud/contexts/CTR-EV/MeasurementValue/v1+json",
"publicKeyIds": [
"urn:key:ev:7f9c2a1e:vehicle-cert-2026"
]
},
{
"@id": "urn:ev-meter:7f9c2a1e:bms",
"measuringPoint": "bms",
"powerType": "DC",
"calibrated": false,
"estimatedRelativeUncertainty": "(0.0 ±0.8) %, k=2",
"publicKeyIds": [
"urn:key:ev:7f9c2a1e:vehicle-cert-2026"
]
},
{
"@id": "urn:ev-meter:7f9c2a1e:aux",
"measuringPoint": "auxiliary",
"powerType": "DC",
"calibrated": false,
"description": {
"en": "Aggregated HV auxiliary loads (thermal management, cabin HVAC, 12 V DC/DC)",
"de": "Summierte HV-Nebenverbraucher (Thermomanagement, Innenraum-Klima, 12-V-DC/DC)"
},
"publicKeyIds": [
"urn:key:ev:7f9c2a1e:vehicle-cert-2026"
]
}
],
"publicKeys": [
{
"@id": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"@context": "https://open.charging.cloud/contexts/PublicKeyInfo+json",
"subject": "urn:ev:pseudonym:7f9c2a1e",
"certificateRole": "iso15118-20-vehicle",
"keyUsage": [
"signEVMeasurements",
"signEVConfirmations",
"signClockComparisons"
],
"algorithm": "ECDSA-secp521r1",
"encodings": [
"SubjectPublicKeyInfo",
"DER",
"base64"
],
"value": "MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQ...",
"x509CertificateChain": [
"MII..."
]
}
]
}
4.3 role and measuringPoint Vocabularies
role:"consumerVehicle"— standard production EV with unverified on-board sensors."referenceVehicle"— verification-office or metrology test vehicle carrying a sealed, calibrated reference meter with an attached Digital Calibration Certificate (dccHash/dccUrl)."fleetAnchorVehicle"— production vehicle with an end-of-line calibrated sensor used as a fleet anchor (see Chargy in the Vehicle, Section 10.4).
measuringPoint(following the measurement chain in Section 8):"inlet"— directly behind the charging inlet (closest to the station transfer point; eliminates OBC and auxiliary uncertainty for DC)."obcInput"— AC input of the on-board charger."bms"— HV battery pack sensor managed by the Battery Management System."auxiliary"— auxiliary loads tapped between charger/inlet and battery (cabin HVAC, battery heater/chiller, 12 V DC/DC converter)."referenceMeter"— dedicated calibrated reference instrument installed behind the inlet.
5. EV Measurement Series (evMeasurements)
Each entry in chargingSessions[].evMeasurements mirrors IMeasurement from IChargeTransparencyRecord.ts and CTR_Format.md Section 14, with explicit EV provenance, measuring point, direction and ISO 15118-20 sign convention, and optional selective-disclosure commitment.
5.1 Sign Convention (ISO 15118-20) and OBIS Codes for Bidirectional (V2G) Sessions
ISO 15118-20 ([V2G20-1213]) defines a single, unambiguous sign convention across the vehicle–station interface:
- Charging (grid → EV) is always positive (
+). - Discharging (EV → grid, BPT/V2G) is always negative (
-).
CTR adopts this convention directly so that signed power, current, and net energy balance (E_net = E_charged - E_discharged) never flip signs between the station and the vehicle:
- Signed instantaneous quantities (
EV_POWER_ACTIVE,EV_CURRENT,contextTelemetry.current) MUST use+for charging and-for discharging (e.g.,"+180.2 A"while charging,"-100.0 A"while discharging). - Cumulative monotonic energy registers (
EV_ENERGY_CHARGED,EV_ENERGY_DISCHARGED,EV_ENERGY_AUXILIARY) remain non-negative, monotonically non-decreasing counters per direction — matching both ISO 15118-20's separate unsigned registers (ChargedEnergyReadingWh,BPT_DischargedEnergyReadingWh) and OBIS1-0:1.8.0*255/1-0:2.8.0*255.
Every evMeasurements entry MUST declare unambiguous name and direction fields alongside its obis code:
name |
direction |
Sign / Monotonicity | OBIS | Meaning | Pairs with station register |
|---|---|---|---|---|---|
EV_ENERGY_CHARGED |
"charge" |
non-negative counter (monotonically increasing) | 1-0:1.8.0*255 |
Cumulative active energy entering the vehicle at measuringPoint |
ChargedEnergyReadingWh / 1-0:1.8.0*255 |
EV_ENERGY_DISCHARGED |
"discharge" |
non-negative counter (monotonically increasing) | 1-0:2.8.0*255 |
Cumulative active energy leaving the vehicle at measuringPoint (BPT/V2G) |
BPT_DischargedEnergyReadingWh / 1-0:2.8.0*255 |
EV_ENERGY_AUXILIARY |
"auxiliary" |
non-negative counter (monotonically increasing) | 1-0:1.8.0*255 (with measuringPoint: "auxiliary") |
Energy consumed by vehicle auxiliary loads (HVAC, battery thermal management, 12 V DC/DC) | Reconciles E_station - E_battery |
EV_REACTIVE_ENERGY_CAPACITIVE |
"reactiveCapacitive" |
non-negative counter | 1-0:3.8.0*255 |
Optional capacitive reactive energy (ISO 15118-20 AC) | CapacitiveEnergyReadingVARh |
EV_REACTIVE_ENERGY_INDUCTIVE |
"reactiveInductive" |
non-negative counter | 1-0:4.8.0*255 |
Optional inductive reactive energy (ISO 15118-20 AC) | InductiveEnergyReadingVARh |
EV_POWER_ACTIVE |
"bidirectional" |
signed (+ charging, - discharging, ISO 15118-20) |
1-0:1.7.0*255 |
Optional signed instantaneous active power | Power curve overlay |
5.2 Measurement Series Structure
{
"@context": "https://open.charging.cloud/contexts/CTR-EV/MeasurementSeries/v1+json",
"energyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"measuringPoint": "inlet",
"direction": "charge",
"signConvention": "iso15118-20",
"clockId": "urn:clock:ev:7f9c2a1e",
"independentOfEVSE": true,
"name": "EV_ENERGY_CHARGED",
"obis": "1-0:1.8.0*255",
"valueType": "counter",
"verifyChain": true,
"signatureInfos": {
"hash": "SHA-512",
"algorithm": "ECDSA",
"curve": "secp521r1",
"canonicalization": "RFC8785",
"format": "DER",
"encoding": "base64"
},
"sampleMerkleRoot": {
"hashAlgorithm": "SHA-256",
"leafCount": 2700,
"sampleInterval": "1 s",
"root": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"values": [
{
"timestamp": "2026-12-01T21:45:02.110Z",
"value": "(48210.000 ±0.190) kWh, k=2",
"statusMeter": "OK",
"uptime": "918204 s",
"paginationId": "EV1",
"trigger": "B",
"pairedStationPaginationId": "T1",
"contextTelemetry": {
"voltage": "782.4 V",
"current": "0.0 A",
"socPercent": "22.5 %",
"batteryTemperature": "21.0 °C"
},
"previousValueHash": null,
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "result", "errors", "warnings"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
]
},
{
"timestamp": "2026-12-01T22:00:00.012Z",
"value": "(48244.812 ±0.193) kWh, k=2",
"statusMeter": "OK",
"uptime": "919102 s",
"paginationId": "EV2",
"trigger": "T",
"scheduledRequestId": "urn:meter-req:4711:tariff-2200",
"pairedStationPaginationId": "T2",
"contextTelemetry": {
"voltage": "796.1 V",
"current": "180.2 A",
"socPercent": "58.1 %",
"batteryTemperature": "31.5 °C"
},
"previousValueHash": "sha256:4a1c8e...",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "result", "errors", "warnings"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIA..."
}
]
}
]
}
5.3 Notable Fields and Semantics
independentOfEVSE(boolean, REQUIRED for EV series): Must betrueonly when every input to the energy integration (both voltage and current, or active power) came from sensors inside the vehicle. As documented in Chargy in the Vehicle, Section 11.6, a simulated or constrained ISO 15118-20 DC vehicle that borrowsEVSEPresentCurrentMUST setindependentOfEVSE: falseso ChargyWebApp never misleads the user into believing an independent current check occurred.trigger(string, RECOMMENDED): Mirrors OCMF transaction codes so station and EV series align visually and semantically:"B"— Begin of charging session."C"— Charging / periodic intermediate reading."T"— Tariff change (typically initiated via ascheduledReadingRequestscommand)."S"— Smart Charging / grid power constraint boundary."D"— Direction reversal in bidirectional (V2G) charging (charge ↔ discharge)."Q"— Quarter-hour / market settlement boundary (PT15M)."A"— Ad-hoc / deviation audit snapshot."E"— End of charging session.
scheduledRequestId(string, OPTIONAL): Links a triggered snapshot back to itsscheduledReadingRequests[].@identry (Section 8).previousValueHash(string | null, RECOMMENDED whenverifyChain: true): SHA-256 hash of the RFC 8785 canonical JSON of the precedingvalues[]element (including itssignatures), forming a tamper-evident chain across the session so neither party can silently drop an intermediate reading.sampleMerkleRoot(object, OPTIONAL): Commits high-frequency internal samples (e.g., 1 Hz) without exporting the full telemetry curve into the CTR. Individual intervals can be selectively disclosed later with Merkle inclusion proofs during a billing dispute, preserving driver privacy and OEM BMS confidentiality.contextTelemetry(object, OPTIONAL): Instantaneous voltage, current, SoC, and battery temperature at the sampling instant. Particularly valuable for DC cable-resistance diagnostics (\(R = (U_{\text{station}} - U_{\text{EV}}) / I\)) and temperature-dependent efficiency analysis.- Unsigned vs. signed EV values: Even if a vehicle lacks a signing key (e.g., an OBD-II companion app),
evMeasurementsMAY still be populated withsignatures: []. Chargy MUST label such series clearly as unsigned vehicle observations rather than cryptographically attested measurements.
6. Digitally Signed EV Confirmations (evConfirmations)
In ISO 15118-2 (MeteringReceiptReq) and ISO 15118-20 (MeteringConfirmationReq), the station sends its MeterInfo to the vehicle and asks the vehicle to sign a receipt. Both standards explicitly restrict that receipt to "received" and offer no field for the vehicle to express agreement, disagreement, an error code, or a human-readable explanation — forcing a vehicle that detects a meter error to either sign silently or abort the session (Chargy in the Vehicle, Section 8.6).
To fix this at the data-model and protocol level, chargingSessions[].evConfirmations records every confirmation returned by the vehicle to the charging station (whether transported over a future ISO 15118 extension, over the ISO 15118-20 Internet VAS HTTP channel, or generated locally by the vehicle's transparency module).
6.1 Confirmation Verdict Semantics
decision |
Meaning | When to use |
|---|---|---|
"accepted" |
Agreement (Zustimmung). The vehicle verified the station's reading (signature if available, session binding, clock plausibility, and comparison against its own measurement within tolerance) and accepts it. | Normal verified reading; vehicle agrees with the station's meter value. |
"rejected" |
Rejection (Ablehnung). The vehicle detected a cryptographic, temporal, session-binding, or quantitative plausibility violation and explicitly disputes the station's reading. MUST include errorCode and SHOULD include description (I18NString). |
Meter deviation beyond tolerance (\(k > 3\)), invalid meter signature, clock offset exceeded, register jump, missing phase, foreign session, etc. |
"acknowledged" |
Receipt only (legacy ISO 15118 compatibility). The vehicle confirmed delivery of the station's MeterInfo (e.g., an imported ISO 15118-2 MeteringReceiptReq or ISO 15118-20 MeteringConfirmationReq) without asserting correctness. |
Importing legacy ISO 15118 receipts where no vehicle-side plausibility verdict was signed. |
Separating "acknowledged" from "accepted" is critical: transparency software MUST NEVER render a legacy ISO 15118 delivery receipt as a green "Vehicle agreed with meter value" badge.
6.2 Confirmation Structure — Accepted Example
{
"@id": "urn:ev-confirm:4711:0002",
"@context": "https://open.charging.cloud/contexts/CTR-EV/Confirmation/v1+json",
"sequenceNumber": 2,
"previousConfirmationHash": "sha256:7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730",
"timestamp": "2026-12-01T22:00:00.380Z",
"clockId": "urn:clock:ev:7f9c2a1e",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"protocol": "ISO15118-20",
"decision": "accepted",
"stationReadingRef": {
"energyMeterId": "urn:meter:240008S",
"paginationId": "T2",
"trigger": "T",
"timestamp": "2026-12-01T22:00:00.005Z",
"reading": "1268.920 kWh",
"obis": "1-0:1.8.0*255",
"rawPayloadFormat": "OCMF",
"rawPayloadHash": "sha256:c0535e4be2b79ffd93291305436bf889314e4a3faec05ecffcbb7df31ad9e51a"
},
"evReadingRef": {
"energyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"paginationId": "EV2",
"timestamp": "2026-12-01T22:00:00.012Z",
"reading": "48244.812 kWh"
},
"clockComparisonSeriesId": "urn:clock-cmp:4711:energy-meter",
"comparisonSummary": {
"stationDelta": "34.920 kWh",
"evDelta": "34.812 kWh",
"expectedLoss": "0.105 kWh",
"residual": "(0.003 ±0.310) kWh, k=2"
},
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "verificationResult"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGHAkEA..."
}
],
"stationCountersignatures": [
{
"keyId": "urn:key:station:DE*GEF*S12345678",
"signerRole": "chargingStation",
"timestamp": "2026-12-01T22:00:00.510Z",
"algorithm": "ECDSA-secp256r1-SHA256",
"signedData": {
"excludedProperties": ["stationCountersignatures", "verificationResult"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MEUCIQ..."
}
]
}
6.3 Confirmation Structure — Rejected Example with errorCode and I18NString
{
"@id": "urn:ev-confirm:4711:0003",
"@context": "https://open.charging.cloud/contexts/CTR-EV/Confirmation/v1+json",
"sequenceNumber": 3,
"previousConfirmationHash": "sha256:9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca7",
"timestamp": "2026-12-01T22:15:00.410Z",
"clockId": "urn:clock:ev:7f9c2a1e",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"protocol": "ISO15118-20",
"decision": "rejected",
"errorCode": "METERING_DEVIATION_EXCEEDED",
"errorUrn": "urn:openchargingcloud:EVConfirmationError:MeteringDeviationExceeded",
"severity": "error",
"description": {
"en": "Station meter reading exceeds vehicle inlet measurement by 3.85 kWh (11.0%), beyond the k=2 tolerance band of ±0.35 kWh.",
"de": "Der Zählerwert der Ladestation überschreitet die Fahrzeugmessung am Ladeanschluss um 3,85 kWh (11,0 %) und liegt außerhalb des k=2-Toleranzbands von ±0,35 kWh."
},
"actionTaken": "sessionTerminated",
"evTerminationCode": "urn:openchargingcloud:EVTerminationCode:MeteringDeviation",
"stationReadingRef": {
"energyMeterId": "urn:meter:240008S",
"paginationId": "T3",
"trigger": "Q",
"timestamp": "2026-12-01T22:15:00.004Z",
"reading": "1307.620 kWh",
"obis": "1-0:1.8.0*255",
"rawPayloadFormat": "OCMF",
"rawPayloadHash": "sha256:e5c1f402a89f..."
},
"evReadingRef": {
"energyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"paginationId": "EV3",
"timestamp": "2026-12-01T22:15:00.011Z",
"reading": "48279.662 kWh"
},
"clockComparisonSeriesId": "urn:clock-cmp:4711:energy-meter",
"comparisonSummary": {
"stationDelta": "38.700 kWh",
"evDelta": "34.850 kWh",
"expectedLoss": "0.110 kWh",
"residual": "(3.740 ±0.350) kWh, k=2"
},
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "verificationResult"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
]
}
6.4 Recommended errorCode Vocabulary
Following ChargyCore.TS's IError convention (code as a stable, language-neutral identifier that UIs and backends can branch on, paired with description as an I18NString using BCP 47 language tags):
errorCode |
errorUrn suffix |
Meaning |
|---|---|---|
METERING_DEVIATION_EXCEEDED |
MeteringDeviationExceeded |
Energy difference exceeds the combined loss-model and uncertainty band (\(k > 3\) or configured threshold). |
DISCHARGE_UNDERCOUNT |
DischargeUndercount |
In bidirectional (V2G) mode, the station's discharged register under-counts energy delivered by the vehicle. |
METER_SIGNATURE_INVALID |
MeterSignatureInvalid |
Cryptographic verification of the station's signed meter payload (e.g., OCMF) failed. |
METER_KEY_UNTRUSTED |
MeterKeyUntrusted |
The meter's public key could not be validated against a trust anchor, transparency log, or calibration certificate. |
METER_PAYLOAD_MISSING |
MeterPayloadMissing |
Station sent an unsigned value or omitted the verifiable raw bytes required by policy. |
CLOCK_OFFSET_EXCEEDED |
ClockOffsetExceeded |
Station controller or meter clock differs from the vehicle's reference clock beyond tolerance. |
CLOCK_STEP_DETECTED |
ClockStepDetected |
A discontinuous mid-session jump in the station or meter clock was observed. |
REGISTER_NON_MONOTONIC |
RegisterNonMonotonic |
Station meter register decreased, jumped abruptly, or failed pagination continuity. |
SESSION_BINDING_MISMATCH |
SessionBindingMismatch |
Session ID, EVSE ID, contract ID, or timestamp in the signed meter record does not match the active session. |
ENERGY_OUTSIDE_POWER_FLOW |
EnergyOutsidePowerFlow |
Station billed energy before the first current flowed or after current ceased. |
SUSPECTED_MISSING_PHASE |
SuspectedMissingPhase |
AC energy ratio near 1/3 or 2/3 indicates a missing phase in measurement. |
CONTACT_RESISTANCE_HIGH |
ContactResistanceHigh |
Deviation growing with \(I^2\) indicates elevated connector contact resistance (safety finding). |
TARIFF_OR_COST_MISMATCH |
TariffOrCostMismatch |
Station's cost receipt disagrees with recomputed quantity \(\times\) tariff. |
SCHEDULED_READING_MISSED |
ScheduledReadingMissed |
Station failed to deliver a requested timed reading within its tolerance window (e.g., at a tariff boundary). |
SUSPECTED_TAP |
SuspectedTap |
Sudden unmodelled power draw between station meter and vehicle inlet ("T-branch"). |
Machine decisions MUST branch on errorCode (or errorUrn), never on localized strings in description.
6.5 Preventing Silent Deletion of Rejections
A naive objection is: if the vehicle rejects a station's meter reading, what stops a dishonest operator from simply omitting the rejected confirmation when assembling the CTR? Three properties counter this:
- Hash-chained confirmation sequence (
sequenceNumber+previousConfirmationHash): Every confirmation commits to the hash of the previous confirmation. Deleting confirmation #3 breaks the chain at confirmation #4. - Station counter-signature (
stationCountersignatures): BecausestationCountersignaturessigns over the confirmation including the vehicle'ssignatures, neither side can deny having exchanged the confirmation. If a station refuses to counter-sign a rejection, the vehicle recordscountersignatureStatus: "refused"or"timeout"in its own CTR copy. - Independent retention: The vehicle keeps its own CTR (or sends it via its OEM / eMSP / Chargy mobile app). When the driver drops the operator's invoice CTR and the vehicle's CTR into ChargyWebApp, any missing confirmation or altered reading stands out immediately.
7. Signing Identities: ISO 15118-2 vs. ISO 15118-20 vs. Dedicated Measurement Certificates
Choosing the right signing key is one of the most consequential architectural decisions in this extension. The signing identity determines who is making the statement, which sessions can be signed, and what privacy risks arise.
7.1 Comparison of Certificate Profiles
| Property | ISO 15118-2 Contract Certificate | ISO 15118-20 Vehicle Certificate (OEM Provisioning / TLS) | Dedicated Vehicle Measurement Certificate (Target) |
|---|---|---|---|
| Available in Plug & Charge | Yes | Yes | Yes |
| Available in EIM (RFID, ad-hoc card, QR) | No | Yes (mandatory in ISO 15118-20 mTLS 1.3) | Yes |
| What it identifies | Energy contract (EMAID) under an eMSP / MO PKI | The vehicle under the OEM PKI | The vehicle's measuring chain, optionally bound to an end-of-line calibration certificate (DCC) |
| Cryptographic algorithms | ECDSA secp256r1 / SHA-256 | ECDSA secp521r1 / SHA-512, or Ed448 | Agile: ECDSA P-256/P-384/P-521, Ed25519/Ed448, PQC / hybrid (ML-DSA) |
| Station can verify offline? | Yes, if MO Root CA is installed | Yes, if OEM / V2G Root CA is installed (already checked during TLS 1.3 handshake) | Yes, via OEM Measurement CA or decentralized EVQI / POI trust graph |
| Privacy / linkability | Medium (linked to billing contract, changes when driver switches eMSP) | High linkability (long-lived vehicle certificate identifies the same car across all CPOs) | Low linkability when issued as rotating short-lived pseudonym certificates |
| Key-usage cleanliness | Designed for Authorization and MeteringReceipt |
Designed for TLS client auth / certificate provisioning (id-kp-clientAuth); repurposing requires explicit profile policy |
Dedicated EKU (signEVMeasurements, signEVConfirmations) |
7.2 Normative Guidance by Protocol Generation
ISO 15118-2 (certificateRole: "iso15118-2-contract")
In ISO 15118-2, TLS is server-authenticated only; the vehicle presents no TLS client certificate. The only vehicle-side asymmetric key routinely present during a session is the Contract Certificate used for Plug & Charge (PaymentDetailsReq / MeteringReceiptReq).
- Use: In ISO 15118-2 Plug & Charge sessions, the vehicle SHOULD sign
evMeasurements,evConfirmations, andclockComparisonswith the Contract Certificate (ECDSA P-256 / SHA-256). - Limitations:
- EIM sessions have no contract certificate; EV data in ISO 15118-2 EIM sessions is either unsigned or signed with an out-of-band application/OEM key.
- The signature attests "the holder of contract EMAID-X measured and confirmed this", not "an OEM-attested measurement chain in vehicle Y produced this".
- As noted in Chargy in the Vehicle, Section 11.4, OCPP 2.0.1 / 2.1 deletes the contract certificate chain at the charging station once the transaction ends. For third-party verification in ChargyWebApp, the CTR MUST embed the relevant public key or certificate chain in
publicKeys(with pseudonymized or minimized personal attributes where permitted).
ISO 15118-20 (certificateRole: "iso15118-20-vehicle")
ISO 15118-20 mandates mutual TLS 1.3 using the vehicle's OEM Provisioning / Vehicle TLS Certificate (on P-521 or Ed448), regardless of whether the driver authorizes via Plug & Charge or EIM (credit card, RFID, QR code).
- Use: In ISO 15118-20 sessions, signing with the Vehicle Certificate is RECOMMENDED over using the contract certificate alone:
- It works uniformly for both Plug & Charge and EIM sessions.
- It binds the measurements and confirmations to the physical vehicle (its BMS, inlet sensor, and OEM trust chain) rather than a transient billing contract.
- The charging station has already validated the vehicle certificate chain during the TLS 1.3 handshake (
CertificateVerify), eliminating extra PKI plumbing at the EVSE.
- Dual-signing option (Plug & Charge): When both a Vehicle Certificate and a Contract Certificate are present in an ISO 15118-20 Plug & Charge session, the vehicle MAY attach two entries to
signatures[]:- one signed by the Vehicle Certificate (
signerRole: "vehicle",certificateRole: "iso15118-20-vehicle") — proving the car's hardware/software measured this; and - one signed by the Contract Certificate (
signerRole: "contract",certificateRole: "iso15118-20-contract") — proving the contracting customer acknowledged or disputed the billing reading.
- one signed by the Vehicle Certificate (
- Important X.509 KeyUsage & Privacy caveat: Real-world OEM Vehicle TLS certificates typically carry
extendedKeyUsage = id-kp-clientAuthand have multi-year lifetimes. Two mitigations are RECOMMENDED for production deployments:- Ephemeral session delegation: The vehicle generates a fresh per-session key pair in its HSM/TPM, signs a short-lived delegation statement with the Vehicle Certificate (or presents it only inside the mTLS channel), and signs the CTR records with the ephemeral key. Verifiers validate the delegation without exposing the long-lived vehicle certificate to downstream roaming partners, or the OEM issues rotating pseudonymous certificates.
- Dedicated OEM Vehicle Measurement Certificates (
certificateRole: "oem-measurement"): Long term, OEMs SHOULD issue short-lived, rotating measurement certificates under a dedicated OEM Measurement Sub-CA (with optional reference to a sensor DCC), separating metrology signatures cleanly from TLS transport keys.
7.3 Canonicalization and Signature Envelope
All CTR-native EV objects (evMeasurements[].values[], evConfirmations[], clockComparisons[].values[], scheduledReadingRequests[]) SHOULD be signed using Chargy's standard IDocumentSignature pattern:
- Canonicalization: RFC 8785 (JSON Canonicalization Scheme, JCS) encoded as UTF-8.
signedData.excludedProperties: explicitly lists fields excluded from the canonical digest (e.g.,["signatures", "stationCountersignatures", "verificationResult", "result", "errors", "warnings"]).- When an EV confirmation wraps a native ISO 15118 XMLDSig / EXI fragment, the original EXI bytes MAY additionally be preserved in
original(base64) alongside the normalized JSON fields, followingCTR_Format.mdSection 16.3.
8. Optional Clock-Offset Time Series (clockComparisons)
Comparing two time series without knowing the offset between their clocks is error-prone: at 300 kW DC fast charging, a 2-second clock discrepancy creates a 167 Wh apparent energy mismatch even when both meters are 100% accurate. Worse, in time-of-use (ToU) tariffs or 15-minute spot-market pricing, a shifted or stepping station clock assigns energy to the wrong price period.
Because oscillator drift and mid-session NTP clock steps can occur throughout a charging session — especially during 8–14 hour AC or overnight V2G sessions — clock deviations are modeled as time series inside chargingSessions[].clockComparisons, directly analogous to measurements and evMeasurements. Instead of a single static snapshot, each series tracks the time offset between the vehicle clock and one peer clock over the session (Chargy in the Vehicle, Section 6.1):
- Station controller series (
peerRole: "stationController",name: "CLOCK_OFFSET_STATION_CONTROLLER"): observed via ISO 15118-20 message headerTimeStampfromSessionSetupResonward, or via an explicit 4-timestamp exchange. - Energy meter series (
peerRole: "energyMeter",name: "CLOCK_OFFSET_ENERGY_METER"): observed viaMeterTimestampin ISO 15118-20,TMeterin ISO 15118-2, or theTMfield inside a signed OCMF record.
If a session only compares clocks once before energy flows, the series simply has a single entry in values[] with phase: "sessionStart". If the vehicle re-checks clocks periodically, before tariff boundaries, and at session end, it appends new samples to values[] — allowing ChargyWebApp to plot clock drift as a slope and any discontinuous clock jump as a step right beside the energy and power curves.
Each clock SHOULD reference a full synchronization snapshot in the top-level timeSynchronizations[] array defined by CTR_Time_Synchronization_Sources.md using matching clockId URNs.
8.1 Sign Convention and Offset Calculation
To avoid sign confusion across implementations, this specification fixes the offset sign convention as:
\(\Delta t_{\text{peer}} = t_{\text{peer}} - t_{\text{ev}}\)
- A positive offset (
"120"ms or"89900"ms) means the peer clock (station controller or energy meter) is ahead of the vehicle clock. - A negative offset (
"-310"ms) means the peer clock is behind the vehicle clock.
Two observation methods are supported:
- Passive ISO 15118 header /
MeterInfoobservation (method: "iso15118-header-rtt"):- Vehicle records local send time \(t_1\) (
t1_evRequestSentAt) when sending a request (e.g.,SessionSetupReqorChargeLoopReq), local receive time \(t_4\) (t4_evResponseReceivedAt) when the response arrives, and the peer's timestamp \(t_{\text{peer}}\) from the response header orMeterInfo. - Round-trip delay: \(\text{RTT} = t_4 - t_1\).
- Estimated midpoint at EV: \(t_{\text{mid}} = \frac{t_1 + t_4}{2}\).
- Estimated offset: \(\Delta t = t_{\text{peer}} - t_{\text{mid}}\).
- Method uncertainty bound (from RTT and timestamp resolution \(\delta_{\text{res}}\), e.g. 1000 ms for whole-second ISO 15118 timestamps): \(u_{\text{method}} = \frac{\text{RTT}}{2} + \delta_{\text{res}}\)
- Vehicle records local send time \(t_1\) (
- Active 4-timestamp NTP-style exchange (
method: "four-timestamp-exchange"):- Over the Chargy HTTP VAS or a future ISO 15118 extension, the station also returns its receive timestamp \(t_2\) (
t2_stationRequestReceivedAt) and transmit timestamp \(t_3\) (t3_stationResponseSentAt). - Classic offset and delay formulas apply: \(\Delta t = \frac{(t_2 - t_1) + (t_3 - t_4)}{2}, \qquad \text{RTT}_{\text{net}} = (t_4 - t_1) - (t_3 - t_2)\)
- This eliminates station processing latency from the uncertainty bound and resolves offsets down to a few milliseconds over PLC/HomePlug GreenPHY.
- Over the Chargy HTTP VAS or a future ISO 15118 extension, the station also returns its receive timestamp \(t_2\) (
8.2 Clock-Offset Time Series JSON Example
[
{
"@id": "urn:clock-cmp:4711:station-controller",
"@context": "https://open.charging.cloud/contexts/CTR-EV/ClockComparisonSeries/v1+json",
"name": "CLOCK_OFFSET_STATION_CONTROLLER",
"protocol": "ISO15118-20",
"method": "four-timestamp-exchange",
"valueType": "gauge",
"tolerance": "2000 ms",
"verifyChain": true,
"evClock": {
"clockId": "urn:clock:ev:7f9c2a1e",
"referenceSource": "GNSS+NTS",
"synchronized": true,
"estimatedUncertainty": "15 ms"
},
"peerRole": "stationController",
"peerClockId": "urn:clock:station-controller:DE*GEF*S12345678",
"signatureInfos": {
"hash": "SHA-512",
"algorithm": "ECDSA",
"curve": "secp521r1",
"canonicalization": "RFC8785",
"format": "DER",
"encoding": "base64"
},
"values": [
{
"timestamp": "2026-12-01T21:44:58.420Z",
"offset": "(120 ±25) ms",
"phase": "sessionStart",
"trigger": "B",
"paginationId": "CLK-SC-1",
"evSystemUptime": "187872.340 s",
"peerSystemUptime": "1488991.540 s",
"timestamps": {
"t1_evRequestSentAt": "2026-12-01T21:44:58.100Z",
"t2_stationRequestReceivedAt": "2026-12-01T21:44:58.245Z",
"t3_stationResponseSentAt": "2026-12-01T21:44:58.255Z",
"t4_evResponseReceivedAt": "2026-12-01T21:44:58.160Z"
},
"roundTripDelay": "50 ms",
"measurementUncertainty": "25 ms",
"withinTolerance": true,
"previousValueHash": null,
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
],
"stationCountersignatures": [
{
"keyId": "urn:key:station:DE*GEF*S12345678",
"signerRole": "chargingStation",
"algorithm": "ECDSA-secp256r1-SHA256",
"signedData": {
"excludedProperties": ["stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MEUCIQ..."
}
]
},
{
"timestamp": "2026-12-01T22:28:12.100Z",
"offset": "(124 ±24) ms",
"phase": "sessionEnd",
"trigger": "E",
"paginationId": "CLK-SC-2",
"evSystemUptime": "190466.020 s",
"peerSystemUptime": "1491585.224 s",
"roundTripDelay": "48 ms",
"measurementUncertainty": "24 ms",
"withinTolerance": true,
"previousValueHash": "sha256:6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIA..."
}
]
}
]
},
{
"@id": "urn:clock-cmp:4711:energy-meter",
"@context": "https://open.charging.cloud/contexts/CTR-EV/ClockComparisonSeries/v1+json",
"name": "CLOCK_OFFSET_ENERGY_METER",
"protocol": "ISO15118-20",
"method": "iso15118-header-rtt",
"valueType": "gauge",
"tolerance": "2 s",
"verifyChain": true,
"evClock": {
"clockId": "urn:clock:ev:7f9c2a1e",
"referenceSource": "GNSS+NTS",
"synchronized": true,
"estimatedUncertainty": "15 ms"
},
"peerRole": "energyMeter",
"peerClockId": "urn:clock:energy-meter:240008S",
"peerTimestampResolution": "1 s",
"values": [
{
"timestamp": "2026-12-01T21:44:58.310Z",
"offset": "-310 ms",
"phase": "sessionStart",
"trigger": "B",
"paginationId": "CLK-EM-1",
"evSystemUptime": "187872.230 s",
"peerTimestamp": "2026-12-01T21:44:58Z",
"meterSyncFlag": "S",
"measurementUncertainty": "1025 ms",
"withinTolerance": true,
"previousValueHash": null,
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGHAkEA..."
}
]
},
{
"timestamp": "2026-12-01T22:28:10.305Z",
"offset": "-305 ms",
"phase": "sessionEnd",
"trigger": "E",
"paginationId": "CLK-EM-2",
"evSystemUptime": "190464.225 s",
"peerTimestamp": "2026-12-01T22:28:10Z",
"meterSyncFlag": "S",
"measurementUncertainty": "1025 ms",
"withinTolerance": true,
"previousValueHash": "sha256:d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGHAkEB..."
}
]
}
]
}
]
8.3 Drift, Mid-Session Clock Steps, and Time-Axis Alignment
Modeling clock comparisons as a time series makes temporal reconciliation straightforward:
- Single-point baseline (
values.length === 1): Shifts the EV time axis onto the peer clock using \(t_{\text{aligned}}(t_{\text{ev}}) = t_{\text{ev}} + \Delta t_0\). - Piecewise linear interpolation (
values.length >= 2): For any EV measurement at \(t_{\text{ev}}\) between two consecutive offset samples \((t_i, \Delta t_i)\) and \((t_{i+1}, \Delta t_{i+1})\), the verifier interpolates the offset linearly: \(\Delta t(t_{\text{ev}}) = \Delta t_i + \frac{t_{\text{ev}} - t_i}{t_{i+1} - t_i} \cdot (\Delta t_{i+1} - \Delta t_i)\) This tracks slow oscillator drift across multi-hour AC and overnight V2G sessions. - Mid-session clock step detection: Between consecutive samples \(i\) and \(i+1\), comparing the change in wall-clock offset \((\Delta t_{i+1} - \Delta t_i)\) against the change in monotonic uptimes \((\Delta\text{uptime}_{\text{peer}} - \Delta\text{uptime}_{\text{ev}})\) immediately distinguishes smooth oscillator drift from a discontinuous clock step (for instance, an NTP jump just before a tariff boundary). Any detected jump SHOULD be accompanied by a
CLOCK_STEPPEDevent inlegallyRelevantLogMessagesperCTR_Time_Synchronization_Sources.mdSection 16. - Internal station clock disagreement: Subtracting the
energyMeterseries from thestationControllerseries at corresponding timestamps yields \(\Delta t_{\text{station-to-meter}} = \Delta t_{\text{controller}} - \Delta t_{\text{meter}}\) (in the example above: \(120 - (-310) = +430\text{ ms}\)), directly surfacing the case observed in the EVCLI prototype (Section 11.6) where the station controller's clock disagrees with its own calibrated meter.
9. Scheduled / Triggered Signed Meter Readings (scheduledReadingRequests)
Time-of-use tariffs, dynamic spot-price intervals (e.g., 15-minute EPEX blocks), Smart Charging schedules, and grid-operator power limitations (§14a EnWG / OpenADR / OCPP SetChargingProfile) are legally binding only if signed meter readings exist at the exact transition timestamps.
As specified in the companion protocol extension (Chargy in the Vehicle, Section 6.6 & Section 11), either party — EVSE → EV or EV → EVSE — can issue a command instructing the peer to capture a signed meter reading at a specific timestamp (or on a recurring calendar-aligned schedule).
9.1 CTR Representation
The chargingSessions[].scheduledReadingRequests array preserves these commands and their acknowledgements so a verifier can check that every legally required tariff or Smart Charging boundary reading was actually taken on time by both sides:
{
"@id": "urn:meter-req:4711:tariff-2200",
"@context": "https://open.charging.cloud/contexts/CTR-EV/ScheduledReadingRequest/v1+json",
"issuedAt": "2026-12-01T21:45:05.000Z",
"issuerRole": "chargingStation",
"targetRole": "electricVehicle",
"reason": "TariffChange",
"triggerCode": "T",
"targetTimestamp": "2026-12-01T22:00:00.000Z",
"clockReference": "utc",
"clockComparisonSeriesId": "urn:clock-cmp:4711:station-controller",
"maxTimeDeviation": "1000 ms",
"recurrence": null,
"triggerEventRef": {
"type": "chargingPeriod",
"id": "urn:tariff:DE*GEF*TOU-2026:night-slot"
},
"description": {
"en": "Capture signed meter reading at transition to night tariff (22:00 UTC).",
"de": "Signierten Zählerwert beim Wechsel in den Nachttarif (22:00 UTC) erfassen."
},
"acknowledgement": {
"status": "Scheduled",
"acknowledgedAt": "2026-12-01T21:45:05.120Z",
"expectedCaptureWindow": {
"from": "2026-12-01T21:59:59.000Z",
"to": "2026-12-01T22:00:01.000Z"
}
},
"fulfillment": {
"status": "Fulfilled",
"evMeasurementPaginationId": "EV2",
"stationMeasurementPaginationId": "T2",
"actualTimestamp": "2026-12-01T22:00:00.012Z",
"observedDeviation": "12 ms"
},
"signatures": [
{
"keyId": "urn:key:station:DE*GEF*S12345678",
"signerRole": "chargingStation",
"algorithm": "ECDSA-secp256r1-SHA256",
"signedData": {
"excludedProperties": ["acknowledgement", "fulfillment", "signatures"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MEUCIQ..."
}
]
}
9.2 Recurring Schedules and Trigger Binding
For Smart Charging or V2G market settlement, recurrence MAY specify calendar-aligned periodic captures without flooding the wire with individual commands:
{
"recurrence": {
"interval": "PT15M",
"alignToClockBoundary": true,
"until": "2026-12-02T06:00:00.000Z",
"maxCount": 32
}
}
When a scheduled reading is triggered by a grid operator's signed power constraint (already carried in CTR's gridOperators and legallyRelevantLogMessages), triggerEventRef links directly to that log message's @id or hash. This creates a verifiable end-to-end chain:
Signed Grid Constraint / Tariff Change
└──► ScheduledReadingRequest (EVSE ↔ EV)
├──► Station Signed Meter Value (TX="T" or "S")
├──► EV Signed Meter Value (trigger="T" or "S", scheduledRequestId=...)
└──► EV Signed Confirmation (decision="accepted" | "rejected")
If a peer cannot capture a scheduled reading within maxTimeDeviation (for example, due to a temporary communication drop or HSM busy condition), it SHOULD emit a SCHEDULED_READING_MISSED entry in legallyRelevantLogMessages so the gap is explicit rather than silent.
10. Optional Companion Blocks: Reconciliation Summary and Control Pilot Events
Two lightweight optional building blocks make the consumer UX in ChargyWebApp substantially clearer without requiring complex inference at display time.
10.1 Vehicle-Side Reconciliation Summary (evReconciliation)
Documents the physical loss model and uncertainty budget used by the vehicle during live comparison (Chargy in the Vehicle, Section 8). When evPrimaryEnergyMeterId measures at the DC "inlet", auxiliary loads are already included inside evEnergy (and evAuxiliaryEnergy is reported for transparency); when the primary sensor is "bms", evAuxiliaryEnergy is added to evEnergy in the balance equation.
{
"@context": "https://open.charging.cloud/contexts/CTR-EV/Reconciliation/v1+json",
"stationEnergyMeterId": "urn:meter:240008S",
"evPrimaryEnergyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"evAuxiliaryEnergyMeterId": "urn:ev-meter:7f9c2a1e:aux",
"clockComparisonSeriesIds": [
"urn:clock-cmp:4711:station-controller",
"urn:clock-cmp:4711:energy-meter"
],
"directions": {
"charge": {
"stationEnergy": "68.420 kWh",
"evEnergy": "68.210 kWh",
"evAuxiliaryEnergy": "0.620 kWh",
"estimatedCableLoss": "0.195 kWh",
"estimatedObcLoss": "0.000 kWh",
"residual": "(0.015 ±0.520) kWh, k=2",
"combinedUncertainty": "0.520 kWh",
"kScore": "0.06",
"verdict": "withinTolerance"
}
},
"connectorDiagnostics": {
"estimatedContactAndCableResistance": "1.8 mΩ",
"maxCurrentObserved": "248.5 A"
}
}
10.2 Control Pilot (CP) State Transitions as legallyRelevantLogMessages Events
Idle / occupancy fees ("Blockiergebühr") frequently cause billing disputes because energy meters sign energy registers, not always mechanical plug-in or unplug timestamps. Because IEC 61851-1 Control Pilot (CP) state transitions (A → B → C/D → B → A, plus E/F faults) are sparse, discrete lifecycle events rather than continuous physical quantities with units or interpolation semantics, they SHOULD be modeled as signed events inside CTR's existing legallyRelevantLogMessages collection (CTR_Legally_Relevant_Log_Messages.md) rather than as a separate measurement time series or a dedicated evParkingEvents property. (A CP time series only makes sense for low-level analog electrical diagnostics such as 10 Hz CP peak-voltage / PWM-duty debugging, not for billing transparency.)
Both the charging station and the vehicle can emit CP_STATE_CHANGED events into legallyRelevantLogMessages — each signed with its own key and referencing its own clockId — so ChargyWebApp can align and cross-check EVSE and EV plug-in/unplug timestamps directly via clockComparisons:
{
"@id": "urn:event:4711:ev-cp-0001",
"@context": "https://open.charging.cloud/contexts/legallyRelevantLogMessages/evControlPilot/1.0",
"timestamp": "2026-12-01T21:44:45.200Z",
"systemUptime": "P2DT4H10M59.120S",
"severity": "informational",
"tags": [
"controlPilot",
"parking",
"electricVehicle"
],
"code": "CP_STATE_CHANGED",
"text": {
"en": "Vehicle detected charging connector plug-in (Control Pilot A -> B).",
"de": "Fahrzeug hat das Einstecken des Ladesteckers erkannt (Control Pilot A -> B)."
},
"data": {
"issuerRole": "electricVehicle",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"clockId": "urn:clock:ev:7f9c2a1e",
"previousState": "A",
"currentState": "B",
"milestone": "plugIn"
},
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
]
}
Recommended milestone values derived from CP transitions: "plugIn" (A → B), "chargingStart" (B → C or B → D), "chargingPaused" (C/D → B before session end), "chargingEnd" (C/D → B at session stop), "unplug" (B → A), and "fault" (→ E or → F).
11. Complete End-to-End CTR Example
The following portable CTR demonstrates a bidirectional-capable ISO 15118-20 DC session with a tariff switch at 22:00:00Z, clock-offset time series (stationController and energyMeter with start and end samples), a scheduled tariff-change reading request, station and EV measurement series (including auxiliary loads), a Control Pilot plug-in event in legallyRelevantLogMessages, and a signed EV confirmation:
{
"@id": "urn:ctr:2026-12-01-session-4711",
"@context": [
"https://open.charging.cloud/contexts/CTR+json",
"https://open.charging.cloud/contexts/CTR-EV/v1+json"
],
"begin": "2026-12-01T21:45:00Z",
"end": "2026-12-01T22:30:00Z",
"electricVehicles": [
{
"@id": "urn:ev:pseudonym:7f9c2a1e",
"pseudonymous": true,
"role": "consumerVehicle",
"clockId": "urn:clock:ev:7f9c2a1e",
"energyMeters": [
{
"@id": "urn:ev-meter:7f9c2a1e:dc-inlet",
"measuringPoint": "inlet",
"powerType": "DC",
"calibrated": false,
"estimatedRelativeUncertainty": "(0.0 ±0.4) %, k=2",
"publicKeyIds": [
"urn:key:ev:7f9c2a1e:vehicle-cert-2026"
]
},
{
"@id": "urn:ev-meter:7f9c2a1e:aux",
"measuringPoint": "auxiliary",
"powerType": "DC",
"calibrated": false,
"publicKeyIds": [
"urn:key:ev:7f9c2a1e:vehicle-cert-2026"
]
}
],
"publicKeys": [
{
"@id": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"@context": "https://open.charging.cloud/contexts/PublicKeyInfo+json",
"subject": "urn:ev:pseudonym:7f9c2a1e",
"certificateRole": "iso15118-20-vehicle",
"keyUsage": [
"signEVMeasurements",
"signEVConfirmations",
"signClockComparisons"
],
"algorithm": "ECDSA-secp521r1",
"encodings": [
"SubjectPublicKeyInfo",
"DER",
"base64"
],
"value": "MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQ..."
}
]
}
],
"chargingSessions": [
{
"@id": "urn:charging-session:4711",
"begin": "2026-12-01T21:45:02Z",
"end": "2026-12-01T22:28:10Z",
"EVSEId": "DE*GEF*E12345678*1",
"meterId": "urn:meter:240008S",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"clockComparisons": [
{
"@id": "urn:clock-cmp:4711:station-controller",
"@context": "https://open.charging.cloud/contexts/CTR-EV/ClockComparisonSeries/v1+json",
"name": "CLOCK_OFFSET_STATION_CONTROLLER",
"protocol": "ISO15118-20",
"method": "four-timestamp-exchange",
"valueType": "gauge",
"tolerance": "2000 ms",
"verifyChain": true,
"evClock": {
"clockId": "urn:clock:ev:7f9c2a1e",
"referenceSource": "GNSS+NTS",
"synchronized": true,
"estimatedUncertainty": "15 ms"
},
"peerRole": "stationController",
"peerClockId": "urn:clock:station-controller:DE*GEF*S12345678",
"values": [
{
"timestamp": "2026-12-01T21:44:58.420Z",
"offset": "(120 ±25) ms",
"phase": "sessionStart",
"trigger": "B",
"paginationId": "CLK-SC-1",
"evSystemUptime": "187872.340 s",
"peerSystemUptime": "1488991.540 s",
"roundTripDelay": "50 ms",
"withinTolerance": true,
"previousValueHash": null,
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
]
},
{
"timestamp": "2026-12-01T22:28:12.100Z",
"offset": "(124 ±24) ms",
"phase": "sessionEnd",
"trigger": "E",
"paginationId": "CLK-SC-2",
"evSystemUptime": "190466.020 s",
"peerSystemUptime": "1491585.224 s",
"roundTripDelay": "48 ms",
"withinTolerance": true,
"previousValueHash": "sha256:6b86b2...",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "result"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIA..."
}
]
}
]
},
{
"@id": "urn:clock-cmp:4711:energy-meter",
"@context": "https://open.charging.cloud/contexts/CTR-EV/ClockComparisonSeries/v1+json",
"name": "CLOCK_OFFSET_ENERGY_METER",
"protocol": "ISO15118-20",
"method": "iso15118-header-rtt",
"valueType": "gauge",
"tolerance": "2000 ms",
"verifyChain": true,
"evClock": {
"clockId": "urn:clock:ev:7f9c2a1e",
"referenceSource": "GNSS+NTS",
"synchronized": true
},
"peerRole": "energyMeter",
"peerClockId": "urn:clock:energy-meter:240008S",
"values": [
{
"timestamp": "2026-12-01T21:44:58.310Z",
"offset": "(-310 ±1025) ms",
"phase": "sessionStart",
"trigger": "B",
"paginationId": "CLK-EM-1",
"peerTimestamp": "2026-12-01T21:44:58Z",
"meterSyncFlag": "S",
"withinTolerance": true,
"previousValueHash": null
},
{
"timestamp": "2026-12-01T22:28:10.305Z",
"offset": "(-305 ±1025) ms",
"phase": "sessionEnd",
"trigger": "E",
"paginationId": "CLK-EM-2",
"peerTimestamp": "2026-12-01T22:28:10Z",
"meterSyncFlag": "S",
"withinTolerance": true,
"previousValueHash": "sha256:d4735e..."
}
]
}
],
"scheduledReadingRequests": [
{
"@id": "urn:meter-req:4711:tariff-2200",
"issuedAt": "2026-12-01T21:45:05.000Z",
"issuerRole": "chargingStation",
"targetRole": "electricVehicle",
"reason": "TariffChange",
"triggerCode": "T",
"targetTimestamp": "2026-12-01T22:00:00.000Z",
"clockReference": "utc",
"clockComparisonSeriesId": "urn:clock-cmp:4711:station-controller",
"maxTimeDeviation": "1000 ms",
"acknowledgement": {
"status": "Scheduled",
"acknowledgedAt": "2026-12-01T21:45:05.120Z"
},
"fulfillment": {
"status": "Fulfilled",
"evMeasurementPaginationId": "EV2",
"stationMeasurementPaginationId": "T2",
"actualTimestamp": "2026-12-01T22:00:00.012Z",
"observedDeviation": "12 ms"
}
}
],
"measurements": [
{
"@context": "https://open.charging.cloud/contexts/EnergyMeterSignatureFormats/OCMFv1.0+json",
"energyMeterId": "urn:meter:240008S",
"name": "ENERGY_TOTAL",
"obis": "1-0:1.8.0*255",
"unit": "kWh",
"valueType": "counter",
"scale": 0,
"alreadyScaled": true,
"values": [
{
"timestamp": "2026-12-01T21:45:02.000Z",
"value": "1234.000",
"paginationId": "T1",
"statusMeter": "G"
},
{
"timestamp": "2026-12-01T22:00:00.005Z",
"value": "1268.920",
"paginationId": "T2",
"statusMeter": "G"
},
{
"timestamp": "2026-12-01T22:28:10.000Z",
"value": "1302.420",
"paginationId": "T3",
"statusMeter": "G"
}
]
}
],
"evMeasurements": [
{
"@context": "https://open.charging.cloud/contexts/CTR-EV/MeasurementSeries/v1+json",
"energyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"measuringPoint": "inlet",
"direction": "charge",
"signConvention": "iso15118-20",
"clockId": "urn:clock:ev:7f9c2a1e",
"independentOfEVSE": true,
"name": "EV_ENERGY_CHARGED",
"obis": "1-0:1.8.0*255",
"valueType": "counter",
"verifyChain": true,
"values": [
{
"timestamp": "2026-12-01T21:45:02.110Z",
"value": "(48210.000 ±0.190) kWh, k=2",
"statusMeter": "OK",
"uptime": "918204 s",
"paginationId": "EV1",
"trigger": "B",
"pairedStationPaginationId": "T1",
"previousValueHash": null,
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "result", "errors", "warnings"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIB..."
}
]
},
{
"timestamp": "2026-12-01T22:00:00.012Z",
"value": "(48244.812 ±0.193) kWh, k=2",
"statusMeter": "OK",
"uptime": "919102 s",
"paginationId": "EV2",
"trigger": "T",
"scheduledRequestId": "urn:meter-req:4711:tariff-2200",
"pairedStationPaginationId": "T2",
"previousValueHash": "sha256:4a1c8e...",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "result", "errors", "warnings"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGIAkIA..."
}
]
},
{
"timestamp": "2026-12-01T22:28:10.095Z",
"value": "(48278.210 ±0.195) kWh, k=2",
"statusMeter": "OK",
"uptime": "920792 s",
"paginationId": "EV3",
"trigger": "E",
"pairedStationPaginationId": "T3",
"previousValueHash": "sha256:88f2d1...",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "result", "errors", "warnings"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGHAkEA..."
}
]
}
]
},
{
"@context": "https://open.charging.cloud/contexts/CTR-EV/MeasurementSeries/v1+json",
"energyMeterId": "urn:ev-meter:7f9c2a1e:aux",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"measuringPoint": "auxiliary",
"direction": "auxiliary",
"signConvention": "iso15118-20",
"clockId": "urn:clock:ev:7f9c2a1e",
"independentOfEVSE": true,
"name": "EV_ENERGY_AUXILIARY",
"obis": "1-0:1.8.0*255",
"valueType": "counter",
"values": [
{
"timestamp": "2026-12-01T21:45:02.110Z",
"value": "0.000 kWh",
"paginationId": "AUX1",
"trigger": "B"
},
{
"timestamp": "2026-12-01T22:28:10.095Z",
"value": "0.620 kWh",
"paginationId": "AUX2",
"trigger": "E"
}
]
}
],
"evConfirmations": [
{
"@id": "urn:ev-confirm:4711:0002",
"sequenceNumber": 2,
"previousConfirmationHash": "sha256:7d865e...",
"timestamp": "2026-12-01T22:00:00.380Z",
"clockId": "urn:clock:ev:7f9c2a1e",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"protocol": "ISO15118-20",
"decision": "accepted",
"stationReadingRef": {
"energyMeterId": "urn:meter:240008S",
"paginationId": "T2",
"trigger": "T",
"timestamp": "2026-12-01T22:00:00.005Z",
"reading": "1268.920 kWh",
"obis": "1-0:1.8.0*255",
"rawPayloadFormat": "OCMF",
"rawPayloadHash": "sha256:c0535e..."
},
"evReadingRef": {
"energyMeterId": "urn:ev-meter:7f9c2a1e:dc-inlet",
"paginationId": "EV2",
"timestamp": "2026-12-01T22:00:00.012Z",
"reading": "48244.812 kWh"
},
"clockComparisonSeriesId": "urn:clock-cmp:4711:energy-meter",
"signatures": [
{
"keyId": "urn:key:ev:7f9c2a1e:vehicle-cert-2026",
"signerRole": "vehicle",
"certificateRole": "iso15118-20-vehicle",
"algorithm": "ECDSA-secp521r1-SHA512",
"signedData": {
"excludedProperties": ["signatures", "stationCountersignatures", "verificationResult"],
"encodings": ["JSON", "JCS", "UTF-8"]
},
"encodings": ["Ecdsa-Sig-Value", "DER", "base64"],
"value": "MIGHAkEA..."
}
]
}
],
"legallyRelevantLogMessages": [
{
"@id": "urn:event:4711:ev-cp-0001",
"@context": "https://open.charging.cloud/contexts/legallyRelevantLogMessages/evControlPilot/1.0",
"timestamp": "2026-12-01T21:44:45.200Z",
"systemUptime": "P2DT4H10M59.120S",
"code": "CP_STATE_CHANGED",
"text": {
"en": "Vehicle detected charging connector plug-in (Control Pilot A -> B).",
"de": "Fahrzeug hat das Einstecken des Ladesteckers erkannt (Control Pilot A -> B)."
},
"data": {
"issuerRole": "electricVehicle",
"electricVehicleId": "urn:ev:pseudonym:7f9c2a1e",
"clockId": "urn:clock:ev:7f9c2a1e",
"previousState": "A",
"currentState": "B",
"milestone": "plugIn"
}
}
]
}
]
}
12. Metrological CBOR (Tag 44252) and COSE_Sign1 Wire Binding
Because every new physical quantity in CTR-EV uses Metrological Text ("68.420 kWh", "(120 ±25) ms", "187872.340 s", "1.8 mΩ"), every CTR-EV structure has a lossless, byte-reproducible Metrological CBOR (mCBOR) representation using CBOR Tag 44252 (@vanaheimr/metrological-cbor) and COSE_Sign1 (CBOR Tag 18) + RFC 9338 CounterSignatureV2 (label 11) (@vanaheimr/cose):
- Schema-selected Tag 44252 conversion: Only schema-declared metrological fields (
offset,roundTripDelay,measurementUncertainty,tolerance,maxTimeDeviation,observedDeviation,evSystemUptime,peerSystemUptime,reading,stationEnergy,evEnergy,evAuxiliaryEnergy,estimatedCableLoss,residual,estimatedContactAndCableResistance,voltage,current,batteryTemperature, etc.) are encoded as CBOR Tag 44252 viajsonToMcbor(). Free-text fields such as localizeddescription(I18NString) remain ordinary UTF-8 strings. - EV signature (
COSE_Sign1, Tag 18): The EV encodes its measurement value, clock-offset sample, or confirmation to deterministic mCBOR (RFC 8949 Section 4.2.1) and signs it as aCOSE_Sign1using its ISO 15118-20 Vehicle Key (ES512on P-521 orEdDSAon Ed448) or ISO 15118-2 Contract Key (ES256on P-256). - Station countersignature (RFC 9338
CounterSignatureV2, label 11): Just as in MetrologicalCBOR/tag-44252-signed-example.md, the charging station attaches an RFC 9338 countersignature into the unprotected header (label 11), which cryptographically covers the mCBOR payload, the EV's protected header, and the EV's signature — leaving the EV's originalCOSE_Sign1bytes intact and independently verifiable.
In ChargyCore.TS, this is implemented in src/EVMetrologicalCBOR.ts (encodeEVObjectToMcbor, decodeMcborToEVObject, signEVObjectCose, countersignEVObjectCose, verifyEVObjectCose).
13. TypeScript Interface Sketch for ChargyCore.TS
The interfaces below extend IChargeTransparencyRecord, IChargingSession, IMeasurement, and IMeasurementValue from ChargyCore.TS (src/interfaces/IChargeTransparencyRecord.ts) without breaking existing consumers:
export type EVMeasuringPoint =
| "inlet"
| "obcInput"
| "bms"
| "auxiliary"
| "referenceMeter";
export type EVMeasurementDirection =
| "charge"
| "discharge"
| "auxiliary"
| "reactiveCapacitive"
| "reactiveInductive"
| "bidirectional";
export type EVConfirmationDecision =
| "accepted"
| "rejected"
| "acknowledged";
export type EVCertificateRole =
| "iso15118-2-contract"
| "iso15118-20-contract"
| "iso15118-20-vehicle"
| "oem-measurement"
| "ephemeral-delegated";
/**
* Metrological Text string per MetrologicalCBOR/metrological-text.md:
* e.g. "68.420 kWh", "(120 ±25) ms", "187872.340 s", "1.8 mΩ", "(0.0 ±0.4) %, k=2".
* Losslessly convertible to/from CBOR Tag 44252 via @vanaheimr/metrological-cbor.
*/
export type MetrologicalText = string;
export type Second = MetrologicalText;
export type WattHour = MetrologicalText;
export type Ohm = MetrologicalText;
export interface IElectricVehicle {
"@id": string;
"@context"?: LinkedDataContext | Array<LinkedDataContext>;
pseudonymous?: boolean;
role?: "consumerVehicle" | "referenceVehicle" | "fleetAnchorVehicle";
manufacturer?: IManufacturer;
model?: IDeviceModel;
software?: { name: string; version: string; sha256?: string };
clockId?: string;
energyMeters?: Array<IEVEnergyMeter>;
publicKeys?: Array<IPublicKey>;
}
export interface IEVEnergyMeter extends IEnergyMeter {
measuringPoint: EVMeasuringPoint;
calibrated?: boolean;
sensorType?: string;
estimatedRelativeUncertainty?: MetrologicalText;
dccHash?: string;
dccUrl?: string;
publicKeyIds?: Array<string>;
}
export interface IEVMeasurement {
"@context"?: LinkedDataContext | Array<LinkedDataContext>;
energyMeterId: string;
electricVehicleId?: string;
name: string;
obis: string;
valueType?: "counter" | "gauge";
measuringPoint: EVMeasuringPoint;
direction: EVMeasurementDirection;
signConvention?: "iso15118-20";
clockId?: string;
independentOfEVSE: boolean;
verifyChain?: boolean;
sampleMerkleRoot?: {
hashAlgorithm: string;
leafCount: number;
sampleInterval?: Second;
root: string;
};
signatureInfos?: ISignatureInfos;
values: Array<IEVMeasurementValue>;
}
export interface IEVMeasurementValue {
timestamp: Timestamp;
value: MetrologicalText; // Self-contained reading (CBOR Tag 44252), e.g. "(48210.000 ±0.190) kWh, k=2"
uptime?: Second; // Monotonic EV meter uptime, e.g. "918204 s"
statusMeter?: string;
paginationId?: number | string;
trigger?: "B" | "C" | "T" | "S" | "D" | "Q" | "A" | "E";
scheduledRequestId?: string;
pairedStationPaginationId?: number | string;
previousValueHash?: string | null;
contextTelemetry?: {
voltage?: MetrologicalText;
current?: MetrologicalText;
socPercent?: MetrologicalText;
batteryTemperature?: MetrologicalText;
};
signatures?: Array<IDocumentSignature>;
stationCountersignatures?: Array<IDocumentSignature>;
}
export interface IEVConfirmation {
"@id": string;
"@context"?: LinkedDataContext | Array<LinkedDataContext>;
sequenceNumber?: number;
previousConfirmationHash?: string | null;
timestamp: Timestamp;
clockId?: string;
electricVehicleId?: string;
protocol?: "ISO15118-2" | "ISO15118-20" | "other";
decision: EVConfirmationDecision;
errorCode?: string;
errorUrn?: string;
severity?: "informational" | "warning" | "error";
description?: I18NString;
actionTaken?: "continued" | "warningDisplayed" | "sessionTerminated";
evTerminationCode?: string;
stationReadingRef: {
energyMeterId: string;
paginationId?: number | string;
trigger?: string;
timestamp: Timestamp;
reading: WattHour;
obis?: string;
rawPayloadFormat?: string;
rawPayloadHash: string;
};
evReadingRef?: {
energyMeterId: string;
paginationId?: number | string;
timestamp: Timestamp;
reading: WattHour;
};
clockComparisonSeriesId?: string;
comparisonSummary?: Record<string, MetrologicalText>;
original?: string;
signatures?: Array<IDocumentSignature>;
stationCountersignatures?: Array<IDocumentSignature>;
verificationResult?: ICryptoResult;
}
export interface IClockComparisonSeries {
"@id": string;
"@context"?: LinkedDataContext | Array<LinkedDataContext>;
name: "CLOCK_OFFSET_STATION_CONTROLLER" | "CLOCK_OFFSET_ENERGY_METER" | string;
protocol?: "ISO15118-2" | "ISO15118-20" | "other";
method: "iso15118-header-rtt" | "four-timestamp-exchange" | "ocmf-meter-only";
valueType?: "gauge";
tolerance?: Second;
verifyChain?: boolean;
evClock: {
clockId: string;
referenceSource?: string;
synchronized?: boolean;
estimatedUncertainty?: Second;
};
peerRole: "stationController" | "energyMeter";
peerClockId: string;
peerTimestampResolution?: Second;
signatureInfos?: ISignatureInfos;
values: Array<IClockComparisonValue>;
verificationResult?: ICryptoResult;
}
export interface IClockComparisonValue {
timestamp: Timestamp;
offset: Second; // Signed MetrologicalText offset (t_peer - t_ev), e.g. "(120 ±25) ms"
phase: "sessionStart" | "periodic" | "tariffBoundary" | "clockStep" | "sessionEnd" | "onDemand";
trigger?: "B" | "C" | "T" | "S" | "E" | "A";
paginationId?: number | string;
evSystemUptime?: Second;
peerSystemUptime?: Second;
timestamps?: Record<string, Timestamp>;
peerTimestamp?: Timestamp;
meterSyncFlag?: string;
roundTripDelay?: Second;
measurementUncertainty?: Second;
withinTolerance?: boolean;
previousValueHash?: string | null;
signatures?: Array<IDocumentSignature>;
stationCountersignatures?: Array<IDocumentSignature>;
result?: ICryptoResult;
}
export interface IScheduledReadingRequest {
"@id": string;
"@context"?: LinkedDataContext | Array<LinkedDataContext>;
issuedAt: Timestamp;
issuerRole: "chargingStation" | "electricVehicle";
targetRole: "chargingStation" | "electricVehicle";
reason: "TariffChange" | "SmartChargingBoundary" | "GridPowerConstraint"
| "DirectionChange" | "MarketSettlementInterval" | "DeviationAudit"
| "SessionPause" | "Custom";
triggerCode?: "T" | "S" | "D" | "Q" | "A" | "C";
targetTimestamp: Timestamp;
clockReference: "utc" | "evse" | "ev" | "meter";
clockComparisonSeriesId?: string;
maxTimeDeviation: Second;
recurrence?: {
interval: Second;
alignToClockBoundary?: boolean;
until?: Timestamp;
maxCount?: number;
} | null;
triggerEventRef?: { type: string; id: string; hash?: string };
description?: I18NString;
acknowledgement?: {
status: "Scheduled" | "Accepted" | "Rejected" | "UnsupportedTime" | "QueueFull";
acknowledgedAt: Timestamp;
errorCode?: string;
description?: I18NString;
};
fulfillment?: {
status: "Fulfilled" | "Missed" | "Delayed" | "Cancelled";
evMeasurementPaginationId?: number | string;
stationMeasurementPaginationId?: number | string;
actualTimestamp?: Timestamp;
observedDeviation?: Second;
};
signatures?: Array<IDocumentSignature>;
}
14. Verification Rules for Chargy Implementations
A transparency verifier (ChargyCore.TS / ChargyWebApp) processing a CTR with EV extensions SHOULD execute the following checks and present each outcome independently rather than collapsing them into one boolean:
14.1 Structural and Reference Checks
- Every
electricVehicleIdresolves to an entry inelectricVehicles[]. - Every
evMeasurements[].energyMeterIdresolves to anenergyMeters[]entry of the referenced vehicle. - Every
evConfirmations[].stationReadingRef.rawPayloadHashmatches the SHA-256 digest of a station reading actually present inmeasurements[](or its preserved raw OCMF/EXI payload). - Every
evConfirmations[].decision === "rejected"carries a non-emptyerrorCode. - Every
clockComparisonSeriesIdandscheduledRequestIdresolves within the sameChargingSession.
14.2 Temporal and Clock Alignment Checks
- For each series in
clockComparisons[], verify the arithmetic consistency ofvalues[].offsetandroundTripDelayagainst the recorded raw timestamps (t1..t4orpeerTimestamp). - Verify that the initial
phase: "sessionStart"sample precedes or coincides with the first energy-bearing measurement. - Across consecutive
clockComparisons[].values[]entries, verifypreviousValueHashcontinuity, compute drift rates, and compare wall-clock offset changes againstevSystemUptime/peerSystemUptimedeltas to flag undocumented mid-session clock steps. - When overlaying
measurements[]andevMeasurements[]in charts or per-interval tables, align timestamps using piecewise linear interpolation over the applicable clock-offset time series and display the applied offset curve explicitly in the UI.
14.3 Cryptographic Checks
- Verify every signature on
evMeasurements[].values[],evConfirmations[],clockComparisons[].values[],scheduledReadingRequests[], and EVlegallyRelevantLogMessages[](CP_STATE_CHANGED) over RFC 8785 JCS canonical bytes withexcludedPropertiesremoved (or over deterministic mCBOR viaCOSE_Sign1+ RFC 9338CounterSignatureV2). - Verify
previousValueHashchains onevMeasurementsandclockComparisons(whenverifyChain: true) andpreviousConfirmationHashchains onevConfirmations. - Inspect
certificateRoleandkeyUsage:- Check whether the signing key matches the expected ISO 15118-2 contract certificate or ISO 15118-20 vehicle certificate chain.
- Display clearly who signed (Contract vs. Vehicle vs. Calibrated Reference Vehicle) and whether the trust chain is anchored.
- Verify optional
stationCountersignaturesseparately so the UI can state "Confirmed by EV and acknowledged by station" vs. "EV statement only (not counter-signed by station)".
14.4 Plausibility and Scheduled-Reading Checks
- Check
independentOfEVSE: iffalse, downgrade the comparison indicator to a partial check and explain which quantity was borrowed from the station. - Recompute energy deltas per direction (
chargeanddischargeseparately in V2G sessions) and verify thatevConfirmations[].decisionis consistent with the measurements. - For each
scheduledReadingRequests[]entry withstatus: "Scheduled", verify that matching readings with the correspondingtriggerand timestamp withinmaxTimeDeviation(after clock-offset alignment) exist on both sides — or that aSCHEDULED_READING_MISSEDlog message explains the absence.
15. How the Data Travels: Live Links, PDF/A-3, and Backend Integration
- During charging (
ChargeTransparencyLiveLink): The live link document (https://open.charging.cloud/contexts/chargeTransparency/live/link/1.0) can stream incrementalevMeasurements,evConfirmations,clockComparisons, andscheduledReadingRequestsalongsidesignedMeterValuesso the driver sees both counters and the deviation band live in ChargyWebApp or the vehicle's infotainment display. - At session end (dual custody): The vehicle exports its signed CTR over the Chargy HTTP VAS (
POST /.well-known/chargy/sessions/{SessionID}/report) to obtain the station's counter-signature, and simultaneously retains a copy in the vehicle / OEM app / eMSP wallet. - In invoices (PDF/A-3): The CPO or eMSP embeds the merged CTR (containing station measurements, EV measurements, clock comparisons, and confirmations) as a
.chargyattachment inside the PDF/A-3 invoice. If an operator omits EV evidence or drops arejectedconfirmation, the driver can load both the invoice PDF and the vehicle's own.chargyfile side by side in ChargyWebApp to reconcile them.
16. Security and Privacy Considerations
- Unverified vehicle sensors vs. legal metrology: Unless
role === "referenceVehicle"with a valid calibration certificate, EV measurements are non-calibrated corroborating evidence, not a substitute for an MID/Eichrecht-verified station meter. UIs MUST communicate this honestly. - Anti-spoofing and replay protection: Every signed EV measurement, confirmation, and clock comparison binds to the session (
@id/SessionID), sequence/pagination index, and prior hash. Replaying a confirmation from a cheaper session fails bothrawPayloadHashand session-binding checks. - Certificate privacy: Long-lived ISO 15118-20 vehicle certificates can correlate a driver's charging locations across operators if embedded verbatim into third-party roaming CTRs. Rotating OEM measurement certificates or ephemeral session delegations SHOULD be preferred whenever CTRs leave the local vehicle-to-station link.
- Denial of service on scheduled readings: A peer receiving
scheduledReadingRequestsMUST enforce rate limits (minimum interval, maximum pending queue size, and maximum total requests per session) to protect hardware security modules and non-volatile meter storage from signature-flooding attacks. - Time-reference spoofing: GNSS receivers can be jammed or spoofed locally, and unauthenticated NTP can be manipulated in transit. Pairing EV GNSS with NTS (when mobile connectivity is available) and cross-checking against the station's NTS snapshot (
timeSynchronizations[]) detects single-source clock manipulation.
17. Open Design Decisions
- Published JSON Schema & JSON-LD context URLs: Finalize and publish
https://open.charging.cloud/contexts/CTR-EV/v1+jsonand its JSON Schema alongsideChargyCore.TS. - Ephemeral key delegation format: Define the exact delegation object allowing an ISO 15118-20 Vehicle Certificate to certify a per-session ephemeral signing key for privacy-preserving CTR exports.
- Standardized
errorCode/EVTerminationCoderegistry: AlignevConfirmations[].errorCodewith the URN namespace proposed for ISO 15118-20EVTerminationCode(Chargy in the Vehicle, Section 8.6). - Merkle proof format for selective disclosure: Specify the exact leaf canonicalization and inclusion-proof object for
sampleMerkleRootso third-party verifiers can check disclosed minute intervals deterministically. - Dual-file merge UX in ChargyWebApp: Define deterministic matching rules when a driver drops an operator's station-only CTR together with a vehicle-exported CTR into ChargyWebApp.