Skip to content
Protocol

OCPP 2.1 testing

Explore OCPP 2.1 enhancements including bidirectional power transfer (V2G/V2X), DER integration, dynamic tariffs, BatterySwap, and automated grid reserve signaling.
The workspace's OCPP 2.1 message log with SetChargingProfileRequest selected, and its charging schedule stepping from 0 to a setpoint of -7000 W in CentralSetpoint mode: the charger discharges to the grid.
The workspace's OCPP 2.1 message log with SetChargingProfileRequest selected, and its charging schedule stepping from 0 to a setpoint of -7000 W in CentralSetpoint mode: the charger discharges to the grid.

What is OCPP 2.1 testing?

OCPP 2.1 testing addresses the forward-looking specification published by the Open Charge Alliance (OCA). It expands beyond OCPP 2.0.1 with bidirectional charging (ISO 15118-20 V2G/V2X, controlled through operationMode and setpoints in charging schedules), local tariffs that the CSMS sends with SetDefaultTariff and ChangeTransactionTariff (functional block I, Tariff and Cost), Distributed Energy Resource (DER) control, Automated Frequency Restoration Reserve (AFRR) support, and battery swap station management.

Last reviewed

Best for

  • Engineering teams planning architecture migrations from OCPP 2.0.1 to OCPP 2.1.
  • Energy aggregators and utility platforms building V2G, V2X, and grid-responsive charging services.
  • Hardware and CSMS vendors validating forward-looking schema conformance against OCA 2.1 specifications.

Message coverage

All 91 OCPP 2.1 operations by functional block, each covered by the virtual charger's action catalog.

sent by the charger to the CSMS sent by the CSMS to the charger sent either way

Security

  • sent by the charger to the CSMS: SecurityEventNotification

Provisioning

  • sent by the charger to the CSMS: BootNotification
  • sent by the CSMS to the charger: GetBaseReport
  • sent by the CSMS to the charger: GetReport
  • sent by the CSMS to the charger: GetVariables
  • sent by the charger to the CSMS: Heartbeat
  • sent by the charger to the CSMS: NotifyReport
  • sent by the CSMS to the charger: Reset
  • sent by the CSMS to the charger: SetNetworkProfile
  • sent by the CSMS to the charger: SetVariables

Authorization

  • sent by the charger to the CSMS: Authorize
  • sent by the CSMS to the charger: ClearCache

Local authorization list

  • sent by the CSMS to the charger: GetLocalListVersion
  • sent by the CSMS to the charger: SendLocalList

Transactions

  • sent by the CSMS to the charger: GetTransactionStatus
  • sent by the charger to the CSMS: TransactionEvent

Remote control

  • sent by the CSMS to the charger: RequestStartTransaction
  • sent by the CSMS to the charger: RequestStopTransaction
  • sent by the CSMS to the charger: TriggerMessage
  • sent by the CSMS to the charger: UnlockConnector

Availability

  • sent by the CSMS to the charger: ChangeAvailability
  • sent by the charger to the CSMS: StatusNotification

Reservation

  • sent by the CSMS to the charger: CancelReservation
  • sent by the charger to the CSMS: ReservationStatusUpdate
  • sent by the CSMS to the charger: ReserveNow

Tariff and cost

  • sent by the CSMS to the charger: ChangeTransactionTariff
  • sent by the CSMS to the charger: ClearTariffs
  • sent by the CSMS to the charger: CostUpdated
  • sent by the CSMS to the charger: GetTariffs
  • sent by the charger to the CSMS: NotifySettlement
  • sent by the CSMS to the charger: NotifyWebPaymentStarted
  • sent by the CSMS to the charger: SetDefaultTariff
  • sent by the charger to the CSMS: VatNumberValidation

Metering

  • sent by the charger to the CSMS: MeterValues

Smart charging

  • sent by the CSMS to the charger: ClearChargingProfile
  • sent by the charger to the CSMS: ClearedChargingLimit
  • sent by the CSMS to the charger: GetChargingProfiles
  • sent by the CSMS to the charger: GetCompositeSchedule
  • sent by the charger to the CSMS: NotifyChargingLimit
  • sent by the charger to the CSMS: NotifyEVChargingNeeds
  • sent by the charger to the CSMS: NotifyEVChargingSchedule
  • sent by the charger to the CSMS: NotifyPriorityCharging
  • sent by the charger to the CSMS: PullDynamicScheduleUpdate
  • sent by the charger to the CSMS: ReportChargingProfiles
  • sent by the CSMS to the charger: SetChargingProfile
  • sent by the CSMS to the charger: UpdateDynamicSchedule
  • sent by the CSMS to the charger: UsePriorityCharging

Firmware management

  • sent by the charger to the CSMS: FirmwareStatusNotification
  • sent by the CSMS to the charger: PublishFirmware
  • sent by the charger to the CSMS: PublishFirmwareStatusNotification
  • sent by the CSMS to the charger: UnpublishFirmware
  • sent by the CSMS to the charger: UpdateFirmware

ISO 15118 certificate management

  • sent by the CSMS to the charger: CertificateSigned
  • sent by the CSMS to the charger: DeleteCertificate
  • sent by the charger to the CSMS: Get15118EVCertificate
  • sent by the charger to the CSMS: GetCertificateChainStatus
  • sent by the charger to the CSMS: GetCertificateStatus
  • sent by the CSMS to the charger: GetInstalledCertificateIds
  • sent by the CSMS to the charger: InstallCertificate
  • sent by the charger to the CSMS: SignCertificate

Diagnostics

  • sent by the CSMS to the charger: AdjustPeriodicEventStream
  • sent by the CSMS to the charger: ClearVariableMonitoring
  • sent by the charger to the CSMS: ClosePeriodicEventStream
  • sent by the CSMS to the charger: CustomerInformation
  • sent by the CSMS to the charger: GetLog
  • sent by the CSMS to the charger: GetMonitoringReport
  • sent by the CSMS to the charger: GetPeriodicEventStream
  • sent by the charger to the CSMS: LogStatusNotification
  • sent by the charger to the CSMS: NotifyCustomerInformation
  • sent by the charger to the CSMS: NotifyEvent
  • sent by the charger to the CSMS: NotifyMonitoringReport
  • sent by the charger to the CSMS: NotifyPeriodicEventStream
  • sent by the charger to the CSMS: OpenPeriodicEventStream
  • sent by the CSMS to the charger: SetMonitoringBase
  • sent by the CSMS to the charger: SetMonitoringLevel
  • sent by the CSMS to the charger: SetVariableMonitoring

Display message

  • sent by the CSMS to the charger: ClearDisplayMessage
  • sent by the CSMS to the charger: GetDisplayMessages
  • sent by the charger to the CSMS: NotifyDisplayMessages
  • sent by the CSMS to the charger: SetDisplayMessage

Data transfer

  • sent either way: DataTransfer

Bidirectional / V2X

  • sent by the CSMS to the charger: AFRRSignal
  • sent by the CSMS to the charger: NotifyAllowedEnergyTransfer

DER control

  • sent by the CSMS to the charger: ClearDERControl
  • sent by the CSMS to the charger: GetDERControl
  • sent by the charger to the CSMS: NotifyDERAlarm
  • sent by the charger to the CSMS: NotifyDERStartStop
  • sent by the charger to the CSMS: ReportDERControl
  • sent by the CSMS to the charger: SetDERControl

Battery swap

  • sent by the charger to the CSMS: BatterySwap
  • sent by the CSMS to the charger: RequestBatterySwap

Example OCPP 2.1 dynamic tariff & V2G flow

The CSMS sets a default tariff, changes the tariff of a running transaction, then asks the EV to discharge with a TxProfile whose schedule period uses operationMode CentralSetpoint and a negative setpoint.

  1. Boot

    1. Charge point → CSMS

      BootNotificationRequest

      {reason: PowerUp, chargingStation: {vendorName, model}}
    2. CSMS → Charge point · response

      BootNotificationResponse

      {status: Accepted}
  2. Default tariff

    1. CSMS → Charge point

      SetDefaultTariffRequest

      {evseId: 1, tariff: {tariffId: "T-DYN-1", currency: "EUR", energy: {prices: [{priceKwh: 0.32}]}}}
    2. Charge point → CSMS · response

      SetDefaultTariffResponse

      {status: Accepted}
  3. Transaction started

    1. Charge point → CSMS

      TransactionEventRequest

      {eventType: Started, triggerReason: CablePluggedIn, seqNo: 0, timestamp, transactionInfo: {transactionId: "tx-21", chargingState: EVConnected}}
    2. CSMS → Charge point · response

      TransactionEventResponse

  4. Tariff change

    1. CSMS → Charge point

      ChangeTransactionTariffRequest

      {transactionId: "tx-21", tariff: {tariffId: "T-PEAK-2", currency: "EUR", energy: {prices: [{priceKwh: 0.45}]}}}
    2. Charge point → CSMS · response

      ChangeTransactionTariffResponse

      {status: Accepted}
  5. Smart charging

    1. CSMS → Charge point

      SetChargingProfileRequest

      {evseId: 1, chargingProfile: {chargingProfilePurpose: TxProfile, transactionId: "tx-21", chargingSchedule: [{chargingRateUnit: W, chargingSchedulePeriod: [{startPeriod: 0, operationMode: CentralSetpoint, setpoint: -7000}]}]}}
    2. Charge point → CSMS · response

      SetChargingProfileResponse

      {status: Accepted}
  6. Transaction updated

    1. Charge point → CSMS

      TransactionEventRequest

      {eventType: Updated, triggerReason: OperationModeChanged, seqNo: 1, timestamp, transactionInfo: {transactionId: "tx-21", chargingState: Charging, operationMode: CentralSetpoint}, meterValue: [{timestamp, sampledValue: [{measurand: Energy.Active.Export.Register, value: 400}]}]}
    2. CSMS → Charge point · response

      TransactionEventResponse

Raw frames
Charge point -> CSMS: BootNotificationRequest {reason: PowerUp, chargingStation: {vendorName, model}}
CSMS -> Charge point: BootNotificationResponse {status: Accepted}

CSMS -> Charge point: SetDefaultTariffRequest {evseId: 1, tariff: {tariffId: "T-DYN-1", currency: "EUR", energy: {prices: [{priceKwh: 0.32}]}}}
Charge point -> CSMS: SetDefaultTariffResponse {status: Accepted}

Charge point -> CSMS: TransactionEventRequest {eventType: Started, triggerReason: CablePluggedIn, seqNo: 0, timestamp,
                                               transactionInfo: {transactionId: "tx-21", chargingState: EVConnected}}
CSMS -> Charge point: TransactionEventResponse

CSMS -> Charge point: ChangeTransactionTariffRequest {transactionId: "tx-21", tariff: {tariffId: "T-PEAK-2", currency: "EUR", energy: {prices: [{priceKwh: 0.45}]}}}
Charge point -> CSMS: ChangeTransactionTariffResponse {status: Accepted}

CSMS -> Charge point: SetChargingProfileRequest {evseId: 1, chargingProfile: {chargingProfilePurpose: TxProfile, transactionId: "tx-21",
                      chargingSchedule: [{chargingRateUnit: W, chargingSchedulePeriod: [{startPeriod: 0, operationMode: CentralSetpoint, setpoint: -7000}]}]}}
Charge point -> CSMS: SetChargingProfileResponse {status: Accepted}

Charge point -> CSMS: TransactionEventRequest {eventType: Updated, triggerReason: OperationModeChanged, seqNo: 1, timestamp,
                                               transactionInfo: {transactionId: "tx-21", chargingState: Charging, operationMode: CentralSetpoint},
                                               meterValue: [{timestamp, sampledValue: [{measurand: Energy.Active.Export.Register, value: 400}]}]}
CSMS -> Charge point: TransactionEventResponse

What the workspace asserts

The states and enum values an OCPP 2.1 frame is validated against, taken from the OCA OCPP 2.1 JSON schemas.

TransactionEventEnumTypeTransactionEventRequest eventType

  1. Started
  2. Updated
  3. Ended
In 2.1 an Updated event also reports operationMode changes, with triggerReason OperationModeChanged, after a setpoint arrives.
  • OperationModeEnumType

    Field
    ChargingSchedulePeriodType operationMode
    Values
    IdleChargingOnlyCentralSetpointExternalSetpointExternalLimitsCentralFrequencyLocalFrequencyLocalLoadBalancing
  • TariffSetStatusEnumType

    Field
    SetDefaultTariffResponse status
    Values
    AcceptedRejectedTooManyElementsConditionNotSupportedDuplicateTariffId
  • TariffChangeStatusEnumType

    Field
    ChangeTransactionTariffResponse status
    Values
    AcceptedRejectedTooManyElementsConditionNotSupportedTxNotFoundNoCurrencyChange

OCPP 2.1 coverage in the workspace

OCPP 2.1 adds V2G, dynamic tariffs, DER, AFRR, and BatterySwap. The workspace covers those message sequences with schema checks and virtual chargers.

  • Bidirectional V2G & V2X

    Coverage
    Charging schedule periods with operationMode, setpoint, and dischargeLimit
    Typical validation
    Validate discharge setpoints and the OperationModeChanged TransactionEvent that follows.
  • Dynamic Tariffs & Cost Calculation

    Coverage
    SetDefaultTariff, ChangeTransactionTariff, GetTariffs, and ClearTariffs
    Typical validation
    Verify tariff acceptance, TariffChanged events, and costDetails during active sessions.
  • DER & Grid Support

    Coverage
    SetDERControl, AFRRSignal, and BatterySwap message sequences
    Typical validation
    Check that the CSMS sends the right DER and AFRR requests and handles the responses.

What to test

  • V2G and V2X bidirectional power flow message sequencing.
  • Tariff and Cost (functional block I): local tariffs and session cost reporting.
  • DER control and AFRR grid reserve response behavior.
  • Forward-looking OCPP 2.1 JSON schema validation.

Common scenarios

V2G & grid stabilization

Simulate electric vehicles injecting stored battery power back into commercial microgrids during peak tariff hours.

Dynamic pricing verification

Validate that the CSMS accurately pushes dynamic price tables and verifies driver display cost computations.

Specification migration readiness

Audit existing 2.0.1 data models and identify field delta requirements before deploying 2.1 firmware.

Explore OCPP 2.1 workflows for V2G and DER charging

Model bidirectional V2G flows, dynamic tariffs, and prepare your CSMS architecture for the next era of EV charging.