Search for “OCPP 2.1” and you mostly find feature lists: V2X, DER, tariffs, battery swap. They don’t answer the question a CSMS developer actually has. Which of this do I have to handle, which messages are new, and what breaks if a 2.1 charger connects tomorrow?

The short answer is that very little breaks. OCPP 2.1 is OCPP 2.0.1 with optional additions, and a 2.0.1 back end needs only a few changes to speak it. The new features are where the work is, and each one is a separate project you take on when you need it.

This guide goes through OCPP 2.1 block by block: what it is and how it relates to 2.0.1, each major addition with its use cases and messages, example frames checked against the OCA’s 2.1 JSON schemas, and what each means for your CSMS. It ends with how to test the 2.1 parts that Rey, the free virtual charge point, supports today. For the 1.6 vs 2.0.1 vs 2.1 decision itself, start with the OCPP version comparison.

OCPP 2.1 at a glance

PublishedEdition 1 on 23 January 2025
Current textEdition 2 of 3 December 2025, with all errata up to November 2025 merged, plus an errata sheet for Edition 2 (latest April 2026); the JSON schemas are still the January 2025 set
IEC standardIEC 63584-210. The first edition (2025) came out on 27 November 2025; the second (2026), based on Edition 2, replaced it in September 2026
WebSocket subprotocolocpp2.1
Messages91: the 64 of 2.0.1, all kept, plus 27 new ones
Specification parts0 Introduction, 1 Architecture, 2 Specification, 3 Schemas, 4 OCPP-J implementation guide, 5 Certification profiles, 6 Test cases
Next versionNone announced. There is no OCPP 2.2

Parts 5 and 6 arrived with Edition 2. The message count comes from the OCA’s 2.1 JSON schema set: every 2.0.1 message is still there under the same name. Nothing was renamed or removed.

How OCPP 2.1 relates to 2.0.1

The 2.1 introduction (Part 0) says it in one line: 2.1 is an extension of 2.0.1, and its schemas are the 2.0.1 schemas extended with optional fields used by the new features. With “minor exceptions”, logic written for 2.0.1 keeps working. OCPP 1.6 is not compatible with either.

The two exceptions are worth knowing by name:

  • A02 and A03 (certificate updates). SignCertificateRequest gained an optional requestId. When the station sends one, your CSMS must return it in the CertificateSignedRequest that answers it. The change is also valid on 2.0.1, so you can ship one code path.
  • N02 (monitoring report). VariableMonitoringType in NotifyMonitoringReport has a new required field, eventNotificationType. That is the station’s job; a CSMS that ignores the field keeps working.

Comparing the two schema sets also shows limits that grew. They don’t break anything, but they can break your database:

  • idToken is now up to 255 characters (it was 36). additionalIdToken grew the same way.
  • idToken.type is a string, no longer a closed enum. The allowed values live in an appendix list, so new credential types don’t need a schema change. chargingLimitSource and the reservation connectorType went the same way.
  • statusInfo.additionalInfo is 1024 characters (was 512). Certificate and OCSP fields grew too: the certificate in Authorize to 10,000 characters, ocspResult to 18,000, signedMeterData to 32,768.
  • A few numbers in NotifyEVChargingNeeds changed from integer to number.

Upgrading a 2.0.1 implementation

A station and a CSMS agree the version in the WebSocket handshake. If the station offers ocpp2.1 and the CSMS picks it, both use the 2.1 schemas. If the station also offers ocpp2.0.1 and the CSMS picks that, nothing changes for either side. So the upgrade for a CSMS is:

  1. Accept the ocpp2.1 subprotocol and remember per connection which version was agreed.
  2. Validate 2.1 connections against the 2.1 schemas. The 2.0.1 schemas set additionalProperties: false, so a strict 2.0.1 validator rejects a 2.1 message that carries any new optional field.
  3. Echo requestId in CertificateSigned.
  4. Widen the columns listed above, and store idToken.type as text.
  5. Tolerate new values in old messages. A 2.1 station can send enum values that 2.0.1 never had, such as TransactionEvent triggerReason TxResumed after a forced reboot, without your CSMS having asked for anything. Log what you don’t use instead of rejecting the message.
  6. Answer new messages you don’t support with a CALLERROR (NotImplemented or NotSupported), so the station gets a clear refusal instead of a timeout.
  7. Don’t assume fields 2.0.1 required. In 2.1, limit in a charging schedule period is optional when a setpoint mode is used, and signingMethod and publicKey in signedMeterValue are optional. Code that reads them unchecked will fail on schedules and signed meter values from 2.1 stations.
  8. Teach your RPC layer two new message types. 2.1 adds CALLRESULTERROR (type 5), sent back when a CALLRESULT was faulty, and SEND (type 6), an unconfirmed message that gets no reply. Log a CALLRESULTERROR instead of dropping it.

That is a sprint, not a rewrite. Then pick features.

The new messages at a glance

Area (functional block)New messages
Bidirectional power transfer (Q) and smart charging (K)NotifyAllowedEnergyTransfer, AFRRSignal, UsePriorityCharging, NotifyPriorityCharging, PullDynamicScheduleUpdate, UpdateDynamicSchedule
DER control (R)SetDERControl, GetDERControl, ReportDERControl, ClearDERControl, NotifyDERAlarm, NotifyDERStartStop
Tariff and cost (I)SetDefaultTariff, GetTariffs, ClearTariffs, ChangeTransactionTariff
Authorization and ad hoc payment (C)NotifySettlement, NotifyWebPaymentStarted, VatNumberValidation
Battery swapping (S)BatterySwap, RequestBatterySwap
ISO 15118-20 certificates (M)GetCertificateChainStatus
Diagnostics (N)OpenPeriodicEventStream, NotifyPeriodicEventStream, GetPeriodicEventStream, AdjustPeriodicEventStream, ClosePeriodicEventStream

Plenty of the change is not in new messages at all. It is in new fields and enum values on existing ones: TransactionEvent, SetChargingProfile, Authorize, Reset, TriggerMessage, SignCertificate and InstallCertificate all grew. The sections below cover both.

Bidirectional power transfer (V2X)

Where: functional block Q, use cases Q01 to Q12, plus new fields in smart charging (block K).

This is the headline feature. Q is a whole new block that extends smart charging so energy can flow from the car back to a building or the grid. On the vehicle side it builds on ISO 15118-20 bidirectional power transfer (BPT).

The core idea is the operation mode. Each charging schedule period can carry an operationMode:

operationModeWhat controls the power
ChargingOnlyNormal charging with a limit, as in 2.0.1, and the default when operationMode is absent. A session stays here until V2X is allowed (Q02)
CentralSetpointThe CSMS sends a setpoint: positive to charge, negative to discharge (Q03, Q04)
ExternalSetpointAn external system, such as an energy manager, sends the setpoint (Q05, Q06)
ExternalLimitsAn external system sets the limits
CentralFrequencyThe CSMS steers power for frequency support (Q07)
LocalFrequencyThe station measures grid frequency and follows a droop curve itself (Q08)
LocalLoadBalancingThe station balances against a local meter (Q09)
IdleThe car may sleep to save energy until a new profile wakes it (Q10)

Q11 and Q12 cover going offline during V2X and resuming afterwards.

A charging schedule period gains matching fields: setpoint, dischargeLimit, reactive power setpoints, per-phase values (_L2, _L3), and curves for frequency support. Here is a CSMS asking a car to discharge at 7 kW for an hour, then go back to charging only:

[2, "a7c3e1d2-4b5f-4c6a-9e8d-7f6a5b4c3d2e", "SetChargingProfile", {
  "evseId": 1,
  "chargingProfile": {
    "id": 301,
    "stackLevel": 0,
    "chargingProfilePurpose": "TxProfile",
    "chargingProfileKind": "Absolute",
    "transactionId": "T-1001",
    "chargingSchedule": [{
      "id": 1,
      "startSchedule": "2026-11-23T17:00:00Z",
      "chargingRateUnit": "W",
      "chargingSchedulePeriod": [
        { "startPeriod": 0, "operationMode": "CentralSetpoint", "setpoint": -7000, "limit": 11000, "dischargeLimit": -11000 },
        { "startPeriod": 3600, "operationMode": "ChargingOnly", "limit": 11000 }
      ]
    }]
  }
}]

The sign convention matters. setpoint is negative for discharging, and dischargeLimit is negative too, “to be consistent with setpoint”, as the schema puts it.

Permission comes first. The AuthorizeResponse gains allowedEnergyTransfer, a list of energy transfer modes the driver may use, such as DC_BPT or AC_BPT. If it is absent, the default is charging only. During a session, the CSMS can change that list with NotifyAllowedEnergyTransfer (Q01). TransactionEvent gains operationMode in transactionInfo, a trigger reason OperationModeChanged, and a stop reason ReqEnergyTransferRejected.

What it means for your CSMS:

  • You need a reason to allow discharge before you send one: a contract, a fleet agreement or a grid program. allowedEnergyTransfer is where that decision becomes protocol.
  • Meter values now go both ways. Bill and report from Energy.Active.Import.Register and Energy.Active.Export.Register, not just the import register.
  • Expect the vehicle, the charger, the CSMS and a commercial arrangement all to need to line up. V2G and the future of bidirectional charging (coming soon) covers the layers outside OCPP.

DER control

Where: functional block R, use cases R01 to R05.

DER control treats the charging station, and the car behind it, as a distributed energy resource on the grid. The spec says the block is built to carry DER settings from IEC 61850 and IEEE 2030.5 on the grid side and ISO 15118-20 Amendment 1 on the EV side. OCPP is the hop between the CSMS and the station; it does not talk to the utility.

The CSMS configures grid-code behaviour with SetDERControl. The controlType names what is being set: power factor (FixedPFAbsorb, FixedPFInject), reactive power (FixedVar), response curves (VoltVar, VoltWatt, FreqWatt, WattPF, WattVar), frequency droop (FreqDroop), ramp rates (Gradients), EnterService after a trip, LimitMaxDischarge, and a set of voltage and frequency trip curves such as HVMustTrip and LFMustTrip.

A default fixed power factor setting looks like this:

[2, "d4e5f6a7-b8c9-4d0e-8f1a-2b3c4d5e6f70", "SetDERControl", {
  "isDefault": true,
  "controlId": "pf-absorb-1",
  "controlType": "FixedPFAbsorb",
  "fixedPFAbsorb": { "priority": 0, "displacement": 0.95, "excitation": true }
}]

The station answers Accepted, Rejected, NotSupported or NotFound. GetDERControl asks what is configured, and the station replies with ReportDERControl. ClearDERControl removes controls. Each control is either a default or a scheduled one (isDefault). The station reports with NotifyDERStartStop when a control starts or ends (including which ones it superseded) and with NotifyDERAlarm for grid events such as OverVoltage, UnderFrequency or PhaseRotation.

R01 to R03 cover where the DER logic sits: in the EVSE, in the EV, or split between both. R04 is configuring the station, R05 is the station reporting a DER event.

What it means for your CSMS: you become the place where grid-code settings for a fleet of stations live. That means storing controls per station with their priorities and defaults, applying them after a station is replaced, and treating DER alarms as operational events. Whether you need any of it depends on grid rules where your stations are installed.

Local cost calculation and tariffs

Where: functional block I, new use cases I07 to I12.

OCPP 2.0.1 already let a station show prices (I01 to I06): the CSMS sent tariff text and running totals, for example with CostUpdated or totalCost in the TransactionEventResponse. The station displayed what it was told. In 2.1 the station can calculate the cost itself from a structured tariff.

The tariff has optional parts for energy (per kWh), charging time and idle time (per minute), a fixed fee, reservation time and a reservation fee, plus minCost and maxCost. Each price can have conditions: time of day, day of week, a date range, energy, power, current or duration thresholds, and AC or DC. Prices are excluding tax, with tax rates alongside.

I07 sets a default tariff:

[2, "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b", "SetDefaultTariff", {
  "evseId": 0,
  "tariff": {
    "tariffId": "DEFAULT-2026-11",
    "currency": "EUR",
    "description": [{ "format": "UTF8", "language": "en", "content": "0.45 EUR per kWh. Idle fee: 0.10 EUR per minute after 60 minutes of not charging. Prices incl. 19% VAT." }],
    "energy": {
      "prices": [{ "priceKwh": 0.378 }],
      "taxRates": [{ "type": "VAT", "tax": 19 }]
    },
    "idleTime": {
      "prices": [{ "priceMinute": 0.084, "conditions": { "minIdleTime": 3600 } }],
      "taxRates": [{ "type": "VAT", "tax": 19 }]
    }
  }
}]

evseId: 0 applies it to every EVSE. The station can answer Accepted, Rejected, TooManyElements, ConditionNotSupported or DuplicateTariffId, so a station that can’t handle your full tariff tells you which way it falls short.

The rest of the block:

  • I08, driver tariffs. The AuthorizeResponse can carry a tariff for this driver.
  • I09 and I10. GetTariffs lists what is installed; ClearTariffs removes tariffs.
  • I11. ChangeTransactionTariff swaps the tariff of a running transaction. It can come back TxNotFound or NoCurrencyChange.
  • I12, cost details. The station reports its calculation in TransactionEvent, with the tariffId in transactionInfo and a costDetails object:
[2, "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "TransactionEvent", {
  "eventType": "Ended",
  "timestamp": "2026-11-23T11:02:40Z",
  "triggerReason": "EVDeparted",
  "seqNo": 14,
  "transactionInfo": {
    "transactionId": "T-1001",
    "chargingState": "Idle",
    "stoppedReason": "EVDisconnected",
    "tariffId": "DEFAULT-2026-11"
  },
  "costDetails": {
    "totalCost": {
      "currency": "EUR",
      "typeOfCost": "NormalCost",
      "energy": { "exclTax": 9.45, "inclTax": 11.25 },
      "total": { "exclTax": 9.45, "inclTax": 11.25 }
    },
    "totalUsage": { "energy": 25000, "chargingTime": 2580, "idleTime": 300 }
  }
}]

25 kWh at 0.378 EUR is 9.45 EUR before tax. The 300 seconds of idle time are under the 60-minute threshold, so they cost nothing. typeOfCost says whether the minCost or maxCost cap applied. New trigger reasons RunningCost, TariffChanged and TariffNotAccepted mark cost-related updates.

What it means for your CSMS: you have to express your tariffs in this structure, which is real modelling work if your pricing is complex. Then decide who is right. The station’s number is what the driver saw and, with a local payment terminal, what they paid, but your CSMS still needs its own calculation to check it against. EV charger billing integration (coming soon) covers that reconciliation.

Transactions with a limit

A related addition sits in block E. E16 covers transactions limited by cost, energy, time or state of charge; F07 covers the same on a remote start, and C17 adds authorization with a prepaid card, whose balance caps the cost. The limit travels as transactionLimit (maxCost, maxEnergy, maxTime, maxSoC) in TransactionEvent and its response, with new trigger reasons LimitSet, CostLimitReached and SoCLimitReached. A cost limit only works if the station can calculate cost, so in practice it depends on the tariff support above.

Ad hoc payment

Where: functional block C, use cases C18 to C25.

Ad hoc payment lets a driver pay without a contract with any e-mobility provider. 2.1 describes three setups:

  • A payment terminal in the station (C18 to C23): authorization with the terminal, cancellation before or after the transaction starts, settlement at the end, a rejected or failed settlement, and increasing the authorized amount.
  • A stand-alone payment terminal that is not part of the station (C24).
  • A static or dynamic QR code that the driver scans to pay on a web page (C25). The dynamic one carries a one-time password the CSMS checks, because a static sticker can be swapped by a fraudster.

The new messages:

  • NotifySettlement: the result of a payment. It carries pspRef (the payment reference from the terminal, which is also used as the idToken value), status (Settled, Canceled, Rejected or Failed), settlementAmount, settlementTime, and optional receipt and VAT details. transactionId can be empty when the payment was canceled before the transaction started.
  • NotifyWebPaymentStarted: tells the station that a driver has started paying through the QR code flow for a given EVSE, with a timeout after which no result is to be expected.
  • VatNumberValidation: checks a VAT number for a company receipt.

What it means for your CSMS: card payments become a reconciliation stream next to your sessions. You match each settlement to its transaction by pspRef, handle settlements for transactions that never started, and treat Failed settlements as a finance task. The payment itself stays with the payment provider.

Battery swapping

Where: functional block S, use cases S01 to S04.

This block lets OCPP manage battery swap stations, which the OCA mentions for two- and three-wheelers and cars. The use cases are local authorization (S01), remote start (S02), swapping in and out (S03) and charging the swapped batteries (S04). Each battery slot is addressed by an evseId.

The station reports a swap with BatterySwap:

[2, "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b", "BatterySwap", {
  "eventType": "BatteryIn",
  "requestId": 42,
  "idToken": { "idToken": "045A2B3C4D5E80", "type": "ISO14443" },
  "batteryData": [{ "evseId": 3, "serialNumber": "BAT-77-0193", "soC": 12.5, "soH": 94 }]
}]

eventType is BatteryIn, BatteryOut or BatteryOutTimeout. Each battery carries its slot, serial number, state of charge and state of health. RequestBatterySwap is the CSMS starting a swap remotely; the requestId ties the BatterySwap events to it.

What it means for your CSMS: nothing, unless you run swap stations. If you do, battery identity and state of health become data you track per swap.

ISO 15118-20 support

Where: blocks A, C, K and M: A02/A03 and M01 updated, C07/C08 updated with -20 flows, K18 to K20 new, M07 new.

OCPP 2.0.1 covers ISO 15118-2 only. 2.1 adds native ISO 15118-20 support, and the most visible changes are in certificate handling:

  • A separate certificate type for the charger’s -20 certificate. SignCertificate and CertificateSigned use certificateType: "V2G20Certificate" for ISO 15118-20 SECC certificates, and TriggerMessage has a matching SignV2G20Certificate. V2GCertificate and SignV2GCertificate stay for ISO 15118-2. A charger that serves both kinds of car asks for both.
  • An OEM root. InstallCertificate accepts OEMRootCertificate, a root for checking the car’s vehicle certificate in the mutual TLS that -20 uses.
  • The vehicle chain’s revocation status (M07). The station asks the CSMS about up to four certificates in the car’s vehicle chain with GetCertificateChainStatus. Each entry names its source (OCSP or CRL) and up to five URLs:
[2, "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f", "GetCertificateChainStatus", {
  "certificateStatusRequests": [{
    "certificateHashData": {
      "hashAlgorithm": "SHA256",
      "issuerNameHash": "7f2a4c6e81b3d5f09a1c2e4b6d8f0a3c5e7b9d1f2a4c6e8b0d2f4a6c8e0b2d4f",
      "issuerKeyHash": "3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d",
      "serialNumber": "5e1a9c03"
    },
    "source": "OCSP",
    "urls": ["https://ocsp.vehicle-subca.example/"]
  }]
}]

The CSMS answers each entry with a status of Good, Revoked, Unknown or Failed, and a nextUpdate time. This is a different check from GetCertificateStatus, which the GetCertificateStatus and OCSP guide (coming soon) covers.

  • Contract certificates. Get15118EVCertificate gains maximumContractCertificateChains and prioritizedEMAIDs, for cars that hold several contracts.
  • Smart charging for -20. K18 and K19 cover the -20 scheduled and dynamic control modes, and K20 adjusting the schedule when the car’s energy needs change. Charging schedules can carry absolutePriceSchedule or priceLevelSchedule for the car.

What it means for your CSMS: sign -20 CSRs (EC P-521 or Ed448 keys) under the right root and return them as V2G20Certificate, run an OCSP or CRL lookup for vehicle chains, and keep the two ISO 15118 editions apart in your certificate store. ISO 15118-2 vs ISO 15118-20 (coming soon) explains the vehicle side, and Test ISO 15118-20 Plug & Charge on OCPP 2.1 walks through testing it end to end.

Resuming transactions after a reset or reboot

Where: B13 (Reset with an ongoing transaction, resuming it) and E17 (resuming a transaction after a forced reboot).

In 2.0.1 a reboot ends the session. In 2.1 the Reset message has a third type, ImmediateAndResume:

[2, "6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e", "Reset", {
  "type": "ImmediateAndResume"
}]

The station sends a TransactionEvent Updated with triggerReason ResetCommand, restarts, sends its BootNotification with reason: "RemoteReset", and then reports the same transaction again:

[2, "8d9e0f1a-2b3c-4d4e-8f5a-6b7c8d9e0f1a", "TransactionEvent", {
  "eventType": "Updated",
  "timestamp": "2026-11-23T10:14:09Z",
  "triggerReason": "TxResumed",
  "seqNo": 8,
  "transactionInfo": { "transactionId": "T-1001", "chargingState": "Charging" },
  "evse": { "id": 1, "connectorId": 1 },
  "meterValue": [{
    "timestamp": "2026-11-23T10:14:09Z",
    "sampledValue": [
      { "value": 18450, "measurand": "Energy.Active.Import.Register", "unitOfMeasure": { "unit": "Wh" } },
      { "value": 150000, "measurand": "Power.Active.Import", "unitOfMeasure": { "unit": "W" } }
    ]
  }]
}]

That is the shape Rey sends. This frame shows Charging because energy transfer was allowed to resume. With AllowEnergyTransferResumption false or absent, the same event carries SuspendedEVSE.

Two device model variables control this. TxCtrlr.ResumptionTimeout (the spec text calls it TxResumptionTimeout) must be above 0, or the station rejects ImmediateAndResume. After a Reset, the station resumes the transaction even if the restart took longer than that (B13.FR.23). TxCtrlr.AllowEnergyTransferResumption decides whether energy flows again; it defaults to false, so a transaction that was charging resumes as SuspendedEVSE (B13.FR.25). E17 applies the same idea to a forced reboot the CSMS didn’t ask for, such as a power cut, and there the timeout does matter: if the interruption lasted longer, the station ends the transaction with stoppedReason PowerLoss or Reboot. The Reset message guide has the full sequence.

What it means for your CSMS: a BootNotification no longer means every open transaction on that station is over. Don’t close a station’s open transactions when it boots. Accept TxResumed on a transaction you thought was interrupted, keep billing on the same transaction id, and send its TxProfile again if the station doesn’t keep TxProfiles across a restart (B13.FR.31, E17.FR.15).

Other changes worth knowing

Smaller changes, listed by block in the 2.1 introduction:

  • Smart charging (K). New profile purposes PriorityCharging and LocalGeneration. A new profile kind, Dynamic, for limits that change often: the station asks for updates with PullDynamicScheduleUpdate, or the CSMS pushes them with UpdateDynamicSchedule. K28 and K29 cover dynamic profiles from the CSMS and from an external system. Priority charging lets a driver overrule a profile, requested remotely with UsePriorityCharging (K21) or at the station (K22), and reported with NotifyPriorityCharging. K23 to K27 describe topologies with a local energy management system. Profiles can say how long they stay valid offline (maxOfflineDuration).
  • Provisioning (B). SetNetworkProfile can carry basicAuthPassword and identity (B09).
  • Security (A). Downgrading from security profile 3 to 2 is no longer prohibited (A05). See security profiles.
  • Authorization (C). Longer idToken and an open type list, as above. C10 adds an explicit expiry rule for the authorization cache. The Authorize guide (coming soon) covers the 2.1 changes to that message.
  • Remote control (F). TriggerMessage has CustomTrigger, which names the message to send in a new customTrigger field.
  • Availability (G). Reporting connector availability with NotifyEvent is now the preferred method, over StatusNotification.
  • Metering (J). A new measurement location, Upstream, and new measurands for bidirectional charging.
  • Diagnostics (N). Periodic event streams (N11 to N15) send frequent monitoring data with NotifyPeriodicEventStream, which uses a new unconfirmed OCPP-J message type, SEND: no reply comes back. OCPP-J in 2.1 also adds CALLRESULTERROR, for reporting a problem with a received CALLRESULT. Monitors gain types TargetDelta and TargetDeltaRelative, and NotifyEvent gains a severity.
  • Display messages (O). Multi-language support (O01).

Should you build 2.1 now or 2.0.1 first?

Build 2.0.1 properly first, then add the ocpp2.1 subprotocol. The upgrade steps above are small, and they make your CSMS ready for 2.1 chargers without committing to any 2.1 feature.

Then add features one block at a time, when there is a business reason:

  • Resuming transactions is the cheapest win: a few rules about not closing transactions on boot.
  • ISO 15118-20 certificates matter once cars and chargers on your sites speak -20.
  • Tariffs and ad hoc payment matter where drivers pay at the charger. They are real modelling and finance work.
  • V2X and DER control need a vehicle, a charger and a commercial or grid arrangement that support them. Do these last, as a project of their own.

A charger supplier that says “OCPP 2.1” has told you the subprotocol, not the features. Ask which 2.1 functional blocks the firmware implements, the same way you would for 2.0.1.

Testing the 2.1 parts today

Rey runs on OCPP 2.1 as well as 1.6 and 2.0.1. On 2.1 it is a 2.0.1 station speaking the ocpp2.1 subprotocol, plus the 2.1 parts below. You can run them against Rey’s built-in Demo CSMS, or connect Rey to your own CSMS at a public wss:// address and let your back end do the CSMS side. The Rey handbook shows each screen.

What Rey supports on 2.1

ImmediateAndResume, per B13. Choose Demo CSMS, pick OCPP 2.1, connect, plug in and tap the card. Then open Act as CSMS → Reset → ImmediateAndResume. You see the Reset Accepted, a TransactionEvent Updated with triggerReason ResetCommand, the restart, a BootNotification with reason RemoteReset, and then the TransactionEvent Updated with TxResumed under the same transaction id. The energy count carries on.

Rey on OCPP 2.1 during a session: the Demo CSMS sends Reset ImmediateAndResume, Rey answers Accepted, sends a TransactionEvent Updated, boots again with BootNotification, reports StatusNotification Occupied, then sends TransactionEvent Updated. The inspector shows that last one: triggerReason TxResumed, seqNo 3, the same transactionId, chargingState Charging, and meter values with context Interruption.End.

Rey reports the resumption timeout as TxCtrlr.ResumptionTimeout, 60 seconds by default. You can change it on the Configuration page or with SetVariables. Set it to 0 and Rey answers an ImmediateAndResume during a session with Rejected (reason code TxResumptionOff), as B13.FR.01 requires.

The V2G20Certificate / SignV2G20Certificate split. On 2.1, Rey asks for two Plug & Charge certificates by default: a P-256 one for ISO 15118-2 as V2GCertificate, and a P-521 one for ISO 15118-20 as V2G20Certificate. Act as CSMS → Set up Plug & Charge makes the Demo CSMS install the roots and trigger both. From your own CSMS, send TriggerMessage SignV2G20Certificate and check that you return the chain with certificateType V2G20Certificate. Rey warns if a P-256 certificate comes back as V2G20Certificate, or if a certificate was signed by the other edition’s sub-CA. On 2.0.1, Rey answers SignV2G20Certificate with NotImplemented, because the trigger doesn’t exist there. The key types are under Configuration → Charger behaviour (handbook: configuration).

GetCertificateChainStatus for the vehicle chain. When an ISO 15118-20 car plugs in on 2.1, Rey asks the CSMS for the revocation status of the car’s vehicle certificates, one OCSP entry per certificate. Your CSMS has to answer it. On the Demo CSMS, Revoke the car’s vehicle certificate (demo) on the Certificates page shows the failure: at the next -20 plug-in the answer is Revoked. If you tick Stop where a real car or charger would stop in the car certificates dialog, the session stops there; otherwise Rey warns and carries on, so you can still test the contract check. On 1.6 and 2.0.1, Rey notes that the check can’t be made, because those versions have no message for it.

ISO 15118-20 Plug & Charge with a real TLS 1.3 handshake. Load the demo car certificates, set up Plug & Charge and plug in. The car speaks both ISO 15118 editions, and the charger, which holds a -20 certificate on 2.1, picks TLS 1.3 and with it ISO 15118-20; at a charger with only a -2 certificate the car falls back to ISO 15118-2 over TLS 1.2. The car and the charger run an actual TLS 1.3 handshake (OpenSSL) with those certificates and keys, using only the cipher suites and key types -20 allows, and Rey logs what was agreed. A certificate problem a real TLS stack would catch shows up there. Inside that connection they exchange real ISO 15118-20 messages in EXI; the car signs AuthorizationReq with its contract key, the charger checks the signature, and then it sends Authorize to your CSMS. The handbook’s Plug & Charge section has the full walkthrough.

Get15118EVCertificate with the 2.1 fields. A car without a -20 contract can ask for one: pick No contract yet: ask for one on the ISO 15118-20 tab of EV & contracts and plug in. The charger forwards the car’s EXI request unchanged in Get15118EVCertificate with maximumContractCertificateChains, the Demo CSMS plays the contract provider and answers with remainingContracts, and the car asks again until it has them all. On 1.6 and 2.0.1 Rey sends the -20 request too, outside the standard, and says so in the log. Those versions allow at most 5600 characters for exiResponse, so there the Demo CSMS answers a P-521 car with Failed (ResponseTooLarge); an Ed448 answer fits (handbook: contract installation).

V2X: giving power back. With ISO 15118-20 over TLS 1.3, Rey’s car can give power back to the charger, on DC and on AC (DC_BPT, AC_BPT), with separate meters for the energy in and out. On 2.1 the charger sends NotifyEVChargingNeeds for every -20 session. Your CSMS allows giving power back with allowedEnergyTransfer in its Authorize answer, or later with NotifyAllowedEnergyTransfer, and sets the power with an operationMode in SetChargingProfile: ChargingOnly, CentralSetpoint (a setpoint, below zero to discharge), CentralFrequency or Idle, with a dischargeLimit if it wants one. In scheduled control the car’s plan comes back in NotifyEVChargingSchedule; for a Dynamic profile your CSMS sends UpdateDynamicSchedule, or the charger asks with PullDynamicScheduleUpdate. On the Demo CSMS, Act as CSMS → Bidirectional power (V2X) sends setpoints (handbook: giving power back).

The Test suite. Rey’s Test suite runs 86 tests against your CSMS on 2.1, nine of them only on 2.1: ImmediateAndResume, the SignV2G20Certificate trigger, an OEM root install, GetCertificateChainStatus, -20 contract installation, and four for V2X: the car’s charging needs, a CentralSetpoint, UpdateDynamicSchedule and NotifyAllowedEnergyTransfer. CSMS test cases for OCPP 1.6, 2.0.1 and 2.1 lists them all.

What Rey doesn’t support

  • Parts of V2X. The External and Local operation modes, the mobility needs mode where the charger sets the departure time, priority charging, discharging while offline, reactive power, and CHAdeMO’s own bidirectional charging.
  • DER control, battery swap, ad hoc payment and periodic event streams.
  • Tariffs and cost. Rey doesn’t calculate cost and doesn’t send costDetails. SetDefaultTariff, GetTariffs, ClearTariffs and ChangeTransactionTariff get a CALLERROR NotSupported, and it does nothing with totalCost in a TransactionEventResponse. The Default tariff field in its profile is free text that it only reports as a configuration value.
  • The physical layer and real power. The ISO 15118 messages between car and charger are real EXI over a real connection (TLS 1.3 for -20, TLS 1.2 for -2), but the car and the charger both run inside Rey: there is no powerline link or SLAC, no real power or certified metering, and no conformance verdict.

Rey answers any message it doesn’t implement with CALLERROR NotSupported. That is a useful test in itself: send a 2.1 feature message to a station that doesn’t have the feature, and check that your CSMS records the refusal and falls back instead of retrying forever.

The honest summary

OCPP 2.1 is two different things wearing one version number. The protocol part is a small, careful upgrade: the same 64 messages, wider fields, a few fields that became optional, one requestId to echo, and a handful of new enum values to tolerate. A well-built 2.0.1 CSMS can speak it in a sprint.

The feature part is large, and almost none of it is about protocol. V2X needs a reason to discharge someone’s car. Tariffs need your pricing expressed in a structure you don’t control. Payment needs reconciliation. DER control needs grid rules. So “supports OCPP 2.1” on a datasheet tells you less than it seems. Ask which blocks, test the ones you will use, and treat each one as its own project.