OCPP Protocol
Open Charge Point Protocol for EV charging station management
Security Alert
Overview
The Open Charge Point Protocol (OCPP) is an application protocol for communication between Electric Vehicle (EV) charging stations and a central management system, also known as a Charging Station Management System (CSMS). It was developed by the Open Charge Alliance (OCA), a global consortium of public and private EV infrastructure leaders.
OCPP enables charging station operators to connect their stations to a central system regardless of the vendor, allowing for vendor-independent charging networks. This open standard promotes interoperability and flexibility in EV charging infrastructure.
OCPP Architecture: Communication between Charging Stations and Management System
OCPP Versions
OCPP has evolved over time to meet the growing needs of the EV charging industry. Here are the key versions:
Version | Release Date | Status | Description |
---|---|---|---|
1.5 | 2012 | deprecated | SOAP-based protocol with basic charging station management capabilities |
1.6 | 2015 | widely used | SOAP/JSON-based protocol with enhanced charging station management |
2.0.1 | 2020 | current | WebSocket/JSON-based protocol with advanced smart charging capabilities |
Key Differences Between OCPP 1.6 and 2.0.1
- Communication Protocol: OCPP 1.6 supports both SOAP and JSON over HTTP, while OCPP 2.0.1 uses WebSocket with JSON.
- Security: OCPP 2.0.1 introduces enhanced security features, including security profiles and certificate management.
- Smart Charging: OCPP 2.0.1 provides more advanced smart charging capabilities with improved charging profiles.
- Device Model: OCPP 2.0.1 introduces a component-based device model for more granular control and monitoring.
- Display Messages: OCPP 2.0.1 adds support for displaying messages on charging station displays.
OCPP Message Structure
OCPP 2.0.1 uses JSON over WebSocket for communication. Each message consists of a message type identifier, a unique ID, an action name, and a payload. Here's the general structure:
[MessageTypeId, UniqueId, Action, Payload]
Where:
- MessageTypeId: 2 for request, 3 for response, 4 for error
- UniqueId: A unique identifier for the message
- Action: The name of the action (for requests) or empty (for responses)
- Payload: The JSON payload containing the message data
Sent by the charging station to the CSMS when it boots up
[2, "19223201", "BootNotification", {
"reason": "PowerUp",
"chargingStation": {
"model": "SingleSocketCharger",
"vendorName": "VendorX",
"serialNumber": "123456",
"firmwareVersion": "1.0.1"
}
}]
[3, "19223201", {
"status": "Accepted",
"currentTime": "2023-05-06T10:00:00.000Z",
"interval": 300
}]
Smart Charging
One of the key features of OCPP is smart charging, which allows for dynamic control of the charging process based on various factors such as grid capacity, energy prices, and user preferences. OCPP 2.0.1 provides enhanced smart charging capabilities through charging profiles.
Charging Profiles
Charging profiles define how much power a charging station can deliver over time. They can be set for specific transactions, EVSEs, or the entire charging station. Here are the key components of smart charging in OCPP:
- ChargingProfiles: Define charging profiles to control power consumption
- SetChargingProfile: Set a charging profile for a specific transaction
- ClearChargingProfile: Clear a charging profile
- GetCompositeSchedule: Get the composite charging schedule for an EVSE
Implementation Considerations
When implementing OCPP in your EV charging infrastructure, consider the following best practices:
Choosing the Right Version
While OCPP 2.0.1 offers more features and better security, OCPP 1.6 is still widely used and has broader support in existing charging stations. Consider your specific requirements, compatibility with existing systems, and future needs when selecting an OCPP version.
Security Implementation
Always implement proper security measures:
- Use TLS 1.2 or higher for all communications
- Implement strong authentication mechanisms
- Validate all inputs to prevent injection attacks
- Keep firmware and software up to date
- Use client certificates for charging station authentication when possible
- Implement proper access control for administrative functions
Testing and Certification
The Open Charge Alliance provides a certification program for OCPP implementations. Getting your implementation certified ensures compatibility with other OCPP-compliant systems and helps identify potential issues.
Monitoring and Logging
Implement comprehensive logging and monitoring for your OCPP communications to help troubleshoot issues and detect potential security breaches.
OCPP vs. Other Protocols
OCPP focuses on the communication between charging stations and management systems, while other protocols serve different purposes in the EV charging ecosystem:
Protocol | Purpose | Relationship to OCPP |
---|---|---|
OCPP | Communication between charging stations and management systems | - |
OCPI | Communication between charging networks for roaming | Complementary to OCPP, operates at a higher level |
ISO 15118 | Communication between vehicles and charging stations | Complementary to OCPP, operates at a lower level |
IEC 63110 | Management of electric vehicle charging infrastructure | Potential future alternative to OCPP |
Specification
The official OCPP specification is maintained by the Open Charge Alliance.
OCPP 2.0.1 SpecificationImplementation Tools
- Java OCPP Library
Open source Java implementation of OCPP
- Python OCPP Library
Python implementation of OCPP
- OCPI (Open Charge Point Interface)
Protocol for connecting EV charging networks for roaming
- ISO 15118
Vehicle-to-Grid Communication Interface
- CHAdeMO
DC charging protocol developed in Japan