OCPP WS IOOCPP WS IO
Concepts

OCPP Message Flows

Detailed sequence diagrams and explanations of common OCPP operations.

Understanding the sequence of messages in OCPP is key to debugging and implementing correct logic. Here are the most common flows visualized.

1. Boot Sequence

Every time a charging station powers up or reconnects, it must identify itself.

  • BootNotification: The station sends its model and vendor. The server accepts it and sets the heartbeatInterval.
  • Heartbeat: The station pings the server periodically to show it's online.

2. Standard Charging Session (RFID)

The "Happy Path" for a driver swiping a card.

  • Authorize: Checks if the tag is valid.
  • StartTransaction: Marks the beginning of energy flow. The server MUST return a transactionId.
  • StopTransaction: Ends the session. Contains the final meter value and timestamp.

3. Remote Start (Mobile App)

When a driver starts charging via an app, the flow is reversed (Server initiates).

4. Smart Charging (Load Balancing)

The server limits the power due to grid constraints.

  • SetChargingProfile: Sends a schedule or limit to the station.
  • ClearChargingProfile: Removes limits.

Error Handling

What happens if the network goes down?

  1. Offline: The station stores messages in its internal memory.
  2. Reconnect: When the connection is restored, the station sends all queued messages.
  3. Order: Messages might arrive in a batch. Your server must handle StartTransaction messages that happened hours ago.

On this page