OCPP modules are located at
modules/EVSE/OCPP/ (OCPP 1.6) and modules/EVSE/OCPP201/ (OCPP 2.0.1). OCPP 2.1 library support is in development at lib/everest/ocpp/lib/ocpp/v21/.Available OCPP Modules
OCPP 1.6
Mature OCPP-J 1.6 implementation with full feature support
OCPP 2.0.1
Latest OCPP 2.0.1 standard with enhanced features
OCPP 1.6 Module
The OCPP module implements OCPP-J 1.6 (JSON over WebSocket) charge point functionality.Key Features
- WebSocket-based communication with CSMS
- Remote monitoring and control
- Smart charging with composite schedules
- Remote firmware updates
- Authorization management
- Transaction handling and MeterValues
- Configuration management
- Reservation support
- ISO 15118 Plug & Charge extensions
OCPP 1.6 Configuration
Path to the OCPP configuration file. Libocpp defines a JSON schema for this file.
Refer to the libocpp documentation for detailed configuration options.
Path to the OCPP user config. Used as an overlay for the original config. Changes from CSMS are written here.
Path to the persistent SQLite database directory
Directory where logs of all OCPP messages are written
Allow external WebSocket connect/disconnect control
Interval in seconds for publishing charging schedules. Set to 0 to publish only on changes.
Duration in seconds for requested charging schedules (from now)
Unit for composite schedules:
A (Amps) or W (Watts)Use Amps for AC charging stations and Watts for DC charging stations.
Delay in seconds before resuming message queue after reconnect. Required for some OCTT test cases.
OCPP 1.6 Provided Interfaces
main (ocpp_1_6_charge_point)
main (ocpp_1_6_charge_point)
Main OCPP 1.6 charge point interface providing:
- Connection management
- Transaction handling
- Remote operations
- Status notifications
auth_validator (auth_token_validator)
auth_validator (auth_token_validator)
Validates auth tokens with the CSMS via RemoteStartTransaction and authorization cache
auth_provider (auth_token_provider)
auth_provider (auth_token_provider)
Provides auth tokens received from CSMS remote start requests
data_transfer (ocpp_data_transfer)
data_transfer (ocpp_data_transfer)
Custom data transfer towards the CSMS
ocpp_generic (ocpp)
ocpp_generic (ocpp)
Generic OCPP interface for common operations
session_cost (session_cost)
session_cost (session_cost)
Send session cost information to connected modules
OCPP 1.6 Required Interfaces
evse_manager (evse_manager)
evse_manager (evse_manager)
Required: 1 to 128 EVSE managersConnects to EvseManager instances representing physical connectors.
auth (auth)
auth (auth)
Required: Authentication moduleHandles authorization requests and token validation.
system (system)
system (system)
Required: System operationsProvides system-level operations like reset and firmware updates.
security (evse_security)
security (evse_security)
Required: Security and certificate managementHandles TLS certificates and security profiles.
reservation (reservation)
reservation (reservation)
Required: Reservation managementHandles reservation requests from CSMS.
OCPP 2.0.1 Module
The OCPP201 module implements the latest OCPP 2.0.1 specification.OCPP 2.0.1 Features
- Device model with component/variable architecture
- Enhanced security profiles
- Transaction events instead of simple start/stop
- Improved smart charging (schedules v2)
- Display message support
- ISO 15118 certificate management
- Get/Set variable operations
- Custom data support
OCPP 2.0.1 Configuration
Path to the persistent SQLite database directory
Path to the SQLite database for the device model
Database for EVerest-specific device model components (EVSE, Connector) not managed by libocpp
Path to device model database migration files
Path to device model component config directory
Libocpp defines the schema for these configuration files.
Directory for OCPP message logs
Interval for publishing composite schedules. Set to 0 for publish on change only.
Duration in seconds for composite schedule requests
Unit for composite schedules:
A (Amps) or W (Watts)OCPP 2.0.1 Provided Interfaces
auth_validator (auth_token_validator)
auth_validator (auth_token_validator)
Validates tokens using CSMS, AuthorizationList, or AuthorizationCache
auth_provider (auth_token_provider)
auth_provider (auth_token_provider)
Provides authorization requests initiated by CSMS
data_transfer (ocpp_data_transfer)
data_transfer (ocpp_data_transfer)
Custom data transfer to CSMS
ocpp_generic (ocpp)
ocpp_generic (ocpp)
Generic OCPP interface
session_cost (session_cost)
session_cost (session_cost)
Session cost information
OCPP 2.0.1 Required Interfaces
Similar to OCPP 1.6 but with optional reservation support:- evse_manager (1-128 connections) - EVSE management
- system - System operations
- security - Certificate management
- auth - Authentication
- reservation (optional) - Reservation handling
- display_message (optional) - Display message support
Configuration Examples
OCPP 1.6 Setup
OCPP 2.0.1 Setup
OCPP Configuration File
Both modules require an OCPP configuration JSON file. Example structure:Refer to the libocpp documentation for complete configuration schema.
Smart Charging
Both OCPP modules support smart charging:CSMS Sends Schedule
Central system sends charging profile via SetChargingProfile (1.6) or SetChargingProfileRequest (2.0.1)
Security Profiles
OCPP 1.6 Security
- Profile 0: Unsecured HTTP (development only)
- Profile 1: Basic Authentication over HTTP
- Profile 2: TLS with Basic Authentication
- Profile 3: TLS with Client Certificates
OCPP 2.0.1 Security
- Security Profile 1: TLS with Basic Authentication
- Security Profile 2: TLS with Client Certificates
- Security Profile 3: TLS with Client Certificates + Enhanced Security
Message Logging
Both modules support detailed message logging:- All OCPP messages (requests and responses)
- WebSocket connection events
- Transaction events
- Error conditions
Integration with Auth Module
OCPP modules integrate with the Auth module:Troubleshooting
WebSocket Connection Issues
WebSocket Connection Issues
- Verify
CentralSystemURIin config - Check network connectivity and firewall rules
- Review TLS certificate configuration
- Check message logs for connection errors
Authorization Failures
Authorization Failures
Smart Charging Not Working
Smart Charging Not Working
- Verify evse_energy_sink connections
- Check composite schedule calculation
- Review charging profile validity periods
- Enable schedule publishing logs
Related Modules
Authentication
Auth module integration
EvseManager
EVSE management and control
ISO 15118
Plug & Charge integration
EvseSecurity
Certificate management
Additional Resources
Source Code Reference
OCPP 1.6:modules/EVSE/OCPP/OCPP.cpp- Main implementationmodules/EVSE/OCPP/manifest.yaml- Module configurationmodules/EVSE/OCPP/conversions.cpp- Type conversions
modules/EVSE/OCPP201/OCPP201.cpp- Main implementationmodules/EVSE/OCPP201/manifest.yaml- Module configurationmodules/EVSE/OCPP201/transaction_handler.cpp- Transaction management