OCPP 2.1 extends OCPP 2.0.1 instead of replacing it. Comparing the two message lists shows more than twenty new messages and none removed, so a CSMS that already speaks 2.0.1 has most of the work done. What is left is the new subprotocol name, the new schemas, and the new features a station may ask for or refuse.
What 2.1 adds
- Tariffs and cost: SetDefaultTariff, GetTariffs, ClearTariffs and ChangeTransactionTariff let the CSMS manage tariffs on the station. TransactionEvent can now carry cost details and transaction limits.
- Bidirectional charging (V2X) and distributed energy resources (DER): SetDERControl, GetDERControl, ClearDERControl, NotifyDERAlarm, NotifyDERStartStop, AFRRSignal and NotifyAllowedEnergyTransfer cover power flowing back from the vehicle and grid services.
- Smart charging: dynamic charging profiles (UpdateDynamicSchedule, PullDynamicScheduleUpdate) and priority charging (UsePriorityCharging, NotifyPriorityCharging).
- Payment: NotifySettlement, NotifyWebPaymentStarted and VatNumberValidation.
- Battery swap: RequestBatterySwap and BatterySwap.
- Periodic event streams: OpenPeriodicEventStream, ClosePeriodicEventStream, AdjustPeriodicEventStream and GetPeriodicEventStream. Streams also add two RPC frame types, CALLRESULTERROR (5) and SEND (6), next to the familiar CALL, CALLRESULT and CALLERROR.
- Certificates: GetCertificateChainStatus.
Many existing messages also gained fields. Most 2.0.1 payloads stay valid in 2.1, but the schemas are not a strict superset: items in NotifyMonitoringReport, for example, gained a required field.
On the wire, a 2.1 station announces itself with the ocpp2.1 value in the Sec-WebSocket-Protocol header, as described in How OCPP WebSocket connections work. A CSMS that accepts that value is promising to validate against the 2.1 schemas.
What a SimItNow 2.1 station does
Create a station with "protocol": "ocpp2.1":
curl -X PUT https://api.simitnow.com/v2/cs/CP-21 -H "SIMITNOW-API-KEY: $API_KEY" -H "Content-Type: application/json" -d '{"csmsUrl":"wss://your-csms.example.com/ocpp","protocol":"ocpp2.1"}'
The station connects with the ocpp2.1 subprotocol, sends its BootNotification and validates the requests it receives, and its own replies, against the 2.1 schemas. It is the 2.0.1 station underneath, so the transaction flow, status reporting, remote start and stop, reset and the device model behave as they do on 2.0.1.
For the features that are new in 2.1, the station answers every request your CSMS can send, and each answer is valid against the specification's JSON schema. When the feature needs a model the simulator does not have, the answer is a negative or empty one that the specification allows, such as Rejected, NotSupported or NoTariff, usually with a statusInfo that says the feature is not simulated, or an OCPP error where the standard calls for one. A Reset with ImmediateAndResume is rejected too, because the station cannot resume a transaction across its own restart.
What it is good for
The useful tests check how your CSMS reacts to the station:
- Does the CSMS accept the
ocpp2.1subprotocol, and does it serve 1.6, 2.0.1 and 2.1 stations side by side? Create a station for each version in turn and compare. A Free account has room for one chargepoint at a time. - Before creating anything,
POST /v1/cs/probewith"protocol":"ocpp2.1"tells you whether the server really agrees to that subprotocol. The connection troubleshooting guide covers the response. - When your CSMS sends SetDefaultTariff, SetDERControl or RequestBatterySwap, does it read the refusal and carry on? A CSMS that retries forever or marks the station faulty after a NotSupported answer has a bug that real 2.1 hardware without those features will expose.
- Does it handle a refused ImmediateAndResume reset by falling back to Immediate or OnIdle?
The hosted CSMS works for the opposite direction. It accepts ocpp2.1 stations and answers the station-originated 2.1 messages, including the ones only 2.1 defines, with a minimal reply that is valid against the schema. It does not model V2X, DER, settlement or battery swap behind those replies.
What is not simulated
SimItNow does not simulate V2X, DER control, tariffs and cost calculation, payment, dynamic and priority charging, or battery swap. If your CSMS needs a station that really follows a tariff or discharges a battery, this simulator cannot test that yet. It can test that your CSMS sends those requests correctly and survives the refusal. The Features page lists the current support per protocol version.
Create a free account and point a 2.1 station at your CSMS.