Open Charge Point Protocol (OCPP) 2.0.1, March 31, 2020, Open Charge Alliance
Original sourcePDF at sourceAttachment at sourceAttachment at sourceAttachment at sourceAttachment at sourceAttachment at sourceAttachment at source
Other documents for the same rulemaking (all, by stage)
References
OCPP 2.0.1 - © Open Charge Alliance 2020 223/449 Part 2 - Specification
OCPP 2.0.1 - © Open Charge Alliance 2020 224/449 Part 2 - Specification
FINAL, 2020-03-31 K. SmartCharging 2. Types of Smart Charging This section is informative. 2.1. Internal Load Balancing The simplest form of smart charging is the Load Balancing use case. This concerns internal load balancing within the Charging
OCPP 2.0.1 - © Open Charge Alliance 2020 259/449 Part 2 - Specification
FINAL, 2020-03-31 K. SmartCharging Charging Station
OCPP 2.0.1 - © Open Charge Alliance 2020 292/449 Part 2 - Specification
FINAL, 2020-03-31 M. ISO 15118 CertificateManagement M02 - Certificate Update EV Table 204. M02 - Certificate Update Type Description Name Certificate Update Functional block M. ISO 15118 Certificate Management Reference ISO15118-1 C1 Objectives See ISO15118-1, use case Objective C1, page 20. Description See ISO15118-1, use case Description C1, page 21 up to and including the third "NOTE". Actors
IEC 61851-1 2017: EV conductive charging system - Part 1: General requirements. https://webstore.iec.ch/ publication/33644 [IEC62559-2:2015] Definition of the templates for use cases, actor list and requirements list. https://webstore.iec.ch/ publication/22349 [ISO15118-1]
OCPP 2.0.1 - © Open Charge Alliance 2020 4/13 Part 0 - Introduction
FINAL, 2020-03-31 2. New functionalities in OCPP2.0
OCPP 2.0.1 - © Open Charge Alliance 2020 5/13 Part 0 - Introduction
FINAL, 2020-03-31 2.5. Support for ISO 15118 The ISO 15118 standard [ISO15118-1] is a newer protocol for EVSE to EV communication, compared to IEC 61851 [IEC61851-1]. ISO 15118 allows a lot of new features and more secure communication between EVSE and EV. OCPP 2.0 supports the ISO 15118 standard, the newly added features are: • Plug & Charge • Smart Charging including input from the EV 2.6. Improvements for customer experience 2.6.1. More authorization options
OCPP 2.0.1 - © Open Charge Alliance 2020 6/13 Part 0 - Introduction
FINAL, 2020-03-31 2.8. Minor changes/extensions 2.8.1. Renamed messages In the OCPP 1.x series, the names of all messages were kept unchanged for backward compatibility, even though some message names were found to be confusing or misleading in practice. In OCPP 2.0 message names have been changed, where appropriate, to improve clarity and understanding. Example: RemoteStartTransaction.req: a lot of implementers though it meant the Charging Station should start the transaction, but in fact it is a request to try to start a transaction. However, for example, if no cable is plugged in, no transaction can be started. Since the message was always intended to be a request, it has been changed to a more logical name: RequestStartTransactionRequest. 2.8.2. TransactionId Identification & Message Sequencing In OCPP 2.0, transaction identifiers are generated by the Charging Station, to facilitate offline charging sessions, in contrast to
OCPP 2.0.1 - © Open Charge Alliance 2020 7/13 Part 0 - Introduction
FINAL, 2020-03-31 3. OCPP 2.0 Documentation Structure 3.1. Overview of Specification Parts The overall structure of the standard has been improved, making the new specification easier to read, implement and test. For readability and implementation purposes, OCPP 2.0 is divided in seven parts. Table 2. Parts Part 0 Introduction (this document) Part 1 Architecture & Topology Part 2 Specification: Use Cases and Requirements, Messages, Data Types and Referenced Components and Variables Appendices: Security Events, Standardized Units of Measure, Components and Variables Part 3 Schemas Part 4 Implementation Guide JSON Part 5 Certification Profiles Part 6 Test Cases In contrast to OCPP 1.6 [OCPP1.6], the OCPP 2.0 specification is written in a different structure, based on [IEC62559-2:2015]: "Use case methodology - Part 2: Definition of the template for use cases, actor list and requirements list". Part 2, the specification, is divided into 'Functional Blocks'. These Functional Blocks contain use cases and requirements.
OCPP 2.0.1 - © Open Charge Alliance 2020 8/13 Part 0 - Introduction
OCPP 2.0.1 - © Open Charge Alliance 2020 4/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 2. Benefits & Issues The WebSocket protocol is defined in [RFC6455]. Working implementations of earlier draft WebSocket specifications exist, but
OCPP 2.0.1 - © Open Charge Alliance 2020 5/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 3. WebSockets For the connection between a Charging Station and a Charging Station Management System (CSMS) using OCPP-J, the CSMS acts as a WebSocket server and the Charging Station acts as a WebSocket client. 3.1. Client request To set up a connection, the Charging Station initiates a WebSocket connection as described in [RFC6455] section 4, "Opening Handshake".
OCPP 2.0.1 - © Open Charge Alliance 2020 6/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 the solution can be used for older OCPP versions as well. Please keep in mind that in these cases the implementation should preferably also maintain support for the SOAP based solution to be interoperable. It is considered good practice to include the OCPP version as part of the OCPP-J endpoint URL string. If you run a web service that can handle multiple protocol versions on the same OCPP-J endpoint URL this is not necessary of course. 3.1.3. Example of an opening HTTP request The following is an example of an opening HTTP request of an OCPP-J connection handshake:
OCPP 2.0.1 - © Open Charge Alliance 2020 7/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 The role of the Sec-WebSocket-Accept header is explained in [RFC6455]. The Sec-WebSocket-Protocol header indicates that the server will be using OCPP2.0.1J on this connection. For a definition on how a server SHALL report a 'failure to process the message', see: CALLERROR 3.3. WebSocket Compression
OCPP 2.0.1 - © Open Charge Alliance 2020 8/25 Part 4 - JSON over WebSockets implementation guide
OCPP 2.0.1 - © Open Charge Alliance 2020 9/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 4.1.2. Message validity and Character encoding The whole message consisting of wrapper and payload MUST be valid JSON encoded with the UTF-8 (see [RFC3629]) character encoding. Furthermore, the Charging Station and CSMS have the right to reject messages which are not conform the JSON schemas. Note that all valid US-ASCII text is also valid UTF-8, so if a system sends only US-ASCII text, all messages it sends comply with the
OCPP 2.0.1 - © Open Charge Alliance 2020 10/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 4.1.7. Message Validity An message is only valid when: • Action is a known Action. • The JSON payload is valid JSON • All the required field for the Action are present • All data is of the correct data type. When a message is not valid, the server SHALL respond with a CALLERROR 4.2. Message structures for different message types
OCPP 2.0.1 - © Open Charge Alliance 2020 11/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 The syntax of a CALLRESULT looks like this: [<MessageTypeId>, "<MessageId>", {<Payload>}] Table 6. CALLRESULT Fields Field Datatype Meaning MessageTypeId integer This is a Message Type Number which is used to identify the type of the message. MessageId string[36] This must be the exact same ID that is in the call request so that the recipient can match request and result. Payload
JSON JSON Payload of the action, see: JSON Payload for more information. For example, a BootNotification response could look like this: "19223201", "currentTime": "2013-02-01T20:53:32.486Z", "interval": 300, "status": "Accepted"
OCPP 2.0.1 - © Open Charge Alliance 2020 12/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 4.2.3. CALLERROR We only use CALLERROR in two situations: 1. An error occurred during the transport of the message. This can be a network issue, an availability of service issue, etc. 2. The call is received but the content of the call does not meet the requirements for a proper message. This could be missing mandatory fields, an existing call with the same unique identifier is being handled already, unique identifier too long, invalid
OCPP 2.0.1 - © Open Charge Alliance 2020 13/25 Part 4 - JSON over WebSockets implementation guide
OCPP 2.0.1 - © Open Charge Alliance 2020 14/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 5. Connection 5.1. Data integrity For data integrity we rely on the underlying TCP/IP transport layer mechanisms. 5.2. WebSocket Ping in relation to OCPP Heartbeat The WebSocket specification defines Ping and Pong frames that are used to check if the remote endpoint is still responsive. In practice this mechanism is also used to prevent the network operator from quietly closing the underlying network connection after a certain period of inactivity. This websocket feature can be used as a substitute for most of the OCPP Heartbeat messages, but cannot replace all of its functionality. An important aspect of the Heartbeat response is time synchronisation. The Ping and Pong frames cannot be used for this so at least one original Heartbeat message a day is recommended to ensure a correct clock setting on the Charging Station.
OCPP 2.0.1 - © Open Charge Alliance 2020 15/25 Part 4 - JSON over WebSockets implementation guide
OCPP 2.0.1 - © Open Charge Alliance 2020 16/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 6. OCPP Routing For some topologies it is required to route OCPP-J messages. For example when implementing a Local Controller. This section contains a solution for OCPP message routing that will work with any Charging Station and CSMS. 6.1. Local Controller A Local controller is a device that sits between the CSMS and any number of Charging Stations, creating a local group. It is located near to the Charging Station (maybe even connected wired to the Charging Stations), so it does not have problem of losing the connection to the Charging Stations. This is practically useful for doing Local Smart Charging: load balancing between the Charging Stations on the same location. The Local Controller can see all the messages, ongoing transactions etc. It can send charging profiles to the Charging Station to influence the energy used by the Charging Stations, this way preventing the group to use more energy than available at the location at that time. The Local Controller SHALL work so the Charging Station doesn’t have to behave different when connected to the Local Controller, compared to a direct connection to a CSMS. A Local Controller SHALL work so that a Charging Station can work out of the box with the Local Controller, requiring only the parameters that are needed to connect to the Local Controller to be set. The Local Controller
OCPP 2.0.1 - © Open Charge Alliance 2020 17/25 Part 4 - JSON over WebSockets implementation guide
FINAL, 2020-03-31 Local group WebSocket ws://csms.example.com/ocpp/CS00 WebSocket ws://csms.example.com/ocpp/CS01