An OCPP server (Open Charge Point Protocol server), also known as a CPMS (Charge Point Management System) or CSMS (Charging Station Management System), is a central software system that manages and communicates with electric vehicle (EV) charging stations, known as charge points or EVSEs (Electric Vehicle Supply Equipment). It uses the OCPP standard, which is an open, standardized protocol for communication between charging stations and management systems.
Although there are different options depending on the protocol version, the most common way that charge points connect to a CPMS using OCPP is via websockets, which provide real-time two-way communication between the server (CPMS) and client (ChargePoint).
The ChargePoint is pre-configured with a chargePointId and the address of the CPMS to connect to, as well as often being provided with a password. The charger attempts to establish a HTTP connection to the target CPMS, which if successful will be upgraded to a websocket connection.
The CPMS will determine if the connection attempt is valid by checking:
Once a connection has been established between a charger and CPMS, messages are exchanged in a request-reply format. One side sends a request with a unique ID, and the other party will send a response with the same unique ID. Using this method each side can verify:
Messages are sent in JSON format, as an array, where the first item is the message type, the unique ID, and then either the CALL followed by the payload for message type 2 (request), or simply the payload for message type 3 (response). An example of message exchange between a charger and server might look like the following:
Charger: [2, "uuid-0001", "StatusNotification", { "connectorId":1, "status":"Available", "errorCode":"NoError" }]
CPMS: [3, "uuid-0001", {}]
CPMS: [2, "uuid-0002", "ChangeAvailability", { "connectorId":1, "type":"Inoperative" }]
Charger: [3, "uuid-0002", { "status":"Accepted" }]
Charger: [2, "uuid-0003", "StatusNotification", { "connectorId":1, "status":"Unavailable", "errorCode":"NoError" }]
CPMS: [3, "uuid-0003", {}]