[Technology] What is OCPP protocol?
The language of most EV chargers

OCPP stands for Open Charge Point Protocol. It’s a set of rules and standards that govern the communication between the Electric Vehicle Charging Stations of different vendors with different Charging Station Management Systems (CSMS).
In my previous article, What is IoT? I explained how a machine communicates with another machine by using the 4 layers of the TCP/IP model. OCPP is just the language of the EV charger and works at the application layer.
More information about the TCP/IP model can be found in my article here.
You may be asking why we should have a communicating EV charger. The answer is simple. When the EV charger exchanges data with the Charging Station Management System (CSMS) it is constantly telling you about its state of health. Believe me, a lot of “health” problems can be solved remotely, and if not, this communication will let you know exactly what component should be replaced. Besides this, connectivity for EV chargers will be a must when having a smart grid. We should have control over the Production/Consumption of electricity in order to avoid blackouts.
OCPP was established in 2009 by the Open Charge alliance. The aim was to create an open communication standard that would allow the Dutch Charging Stations (CS) and Charging Station Management Systems (CSMS) from different vendors to easily communicate with each other. The OCPP protocol is now spreading over the world. So let’s dig a bit more into this unique language.
There are two different flavors of OCPP. OCPP JSON (OCPP-J) over WebSocket and OCPP SOAP (OCPP-S). For those unfamiliar with protocol communication, the main purpose of SOAP Simple Object Access Protocol and JSON JavaScript Object Notation is to convert the data in an easy format in order to be transported. The JSON uses the WebSocket as a transporter and SOAP uses in most cases HTTP. The performance of the WebSocket is much higher. Thus the OCPP-J is the most commonly used language between the Charging Station and the Charging Station Management Systems.
Let’s have a look at how this language is written. Below I will only focus on the OCPP-1.6J.
This version of the OCPP has 6 profiles, and each profile has several messages.
Now, let’s dive into each of these profiles!
- Core Profile
This profile includes all the messages required to make use of the basic functionality of the OCPP.
- Authorize — Used to check the authorization status of an idTag. IdTag is basically a user identifier to start/stop charge sessions.
Example:

- BootNotification — Sent when the CP boots up, contains information about the charging station such as firmware version, Vendor/Model/SerialNumber information etc.
Example:

- ChangeAvailability — Used to change the stations’ availability to OPERATIVE or INOPERATIVE.
- ChangeConfiguration — The station has a bunch of configuration items defined by the OCPP (They may also be extended by the vendor). This message is used to change these configurations.
- ClearCache — Initiated by the CSMS to clear Authorization Cache.
- DataTransfer — Vendor-specific commands are usually implemented using this message. This message can give us a lot of information regarding the transaction such as the current, voltage, frequency, signal strength…It’s the only two-way message in the protocol, which means it can be initiated by both sides.
- GetConfiguration — . Just like ChangeConfigurations, this message is used to read the contents of the configuration items. If there are vendor-specific configurations, they may also be included in the response to this message.
- Heartbeat — This message is used by the charging station to inform us it is still alive. The message contains the current time.
Example:

- MeterValues — If the station has a power meter, this message gives information about the amount of current/power that is being offered to the EV. It is intended for use in smart charging applications.
- RemoteStartTransaction — Used to start a transaction remotely.
- RemoteStopTransaction — Used to end a transaction remotely.
- Reset — Used to reboot the Charging station.
- StartTransaction — The charging station is requesting a start of the transaction. This must be approved by the CSMS.
- StatusNotification — This message is sent by the charging station to the CSMS to inform about its current status. Currently, there are 9 Statuses: AVAILABLE, PREPARING, CHARGING, SUSPENDEDEV, SUSPENDEDEVSE, FINISHING, RESERVED, UNAVAILABLE, FAULTED.
Example:

- StopTransaction — To stop the transaction remotely.
- UnlockConnector — to unlock the connector remotely.
2. Firmware management Profile
This profile is about updating the firmware of the Charging station and getting diagnostics logs when required. For those who don’t know what logs mean, it is simply important information gathered by the machine during its lifecycle. And for those who don’t know what firmware is, please check my previous article: What is a firmware?
Let us now move forward. The Firmware management profile includes 4 messages:
- GetDiagnostics — This message helps when CSMS is requesting a diagnostic of the station. The station will respond with the diagnostic file. This file is what we call the logs.
- DiagnosticsStatusNotification — This message indicates the current diagnostics upload status.
- FirmwareStatusNotification — This message lets us know about the current firmware update status.
- UpdateFirmware — As its name indicates, this message is used to upgrade the software. It contains a link to the firmware file’s location (Usually ftp) and a date to indicate when this upgrade package should be downloaded.
Example:

3. Local Auth List Management Profile
Sometimes having connectivity can be difficult. This profile is intended for the station to work in an offline mode. In order to identify, the station will use local authorization. Authorization Cache and/or a Local Authorization List are used for this purpose.
This profile got two messages:
- GetLocalListVersion
- SendLocalList
4. Remote Trigger Profile
TriggerMessage — this is the only message on this profile. It is used to trigger those messages:
(BootNotification, DiagnosticsStatusNotification, FirmwareStatusNotification, Heartbeat, MeterValues, StatusNotification)
5. Reservation
OCPP 1.6 does not support scheduling a reservation for a future date, it can only reserve at the exact time of reservation. This profile contains the following messages:
- ReserveNow
- CancelReservation
6. Smart Charging
This profile is the only added feature of the OCPP 1.6 compared to its predecessor the OCPP 1.5. It is all about controlling power consumption by limiting charging parameters. We can find 3 different messages:
- ClearChargingProfile — Used to remove an installed charging profile from the device.
- SetChargingProfile — Used to create your charging profile based on different parameters such as the amount of power/current, time of the charging session, duration, which connector and which phase should be used…etc
Here is an example of creating a charging Profile:

- GetCompositeSchedule — This message is basically the chargingProfile used for a specific duration.