A Python-based test toolkit to analyze and troubleshoot communication between roles in the e-mobility domain.
OCPP Compote is designed to test system interactions between:
- Charge Points,
- Charging Point Operators (CPOs),
- Electro-Mobility Providers (EMPs), and
- ERoaming Services.
It provides partial backend implementations for CPOs and EMPs, allowing assement and testing of communication scenarios and behaviors using the Open Charge Point Protocol (OCPP) and the Open Intercharge Protocol (OICP).
-
5.1. CSMS (CPO) Service
5.2. EMPMS (EMP) Service
5.4. Additional Services
- Charging Station Management System (CSMS) for testing charging station communication behavior (OCPP 1.6J and OCPP 2.0.1 (Basic Functionality) as well as testing CSMS interaction with ERoaming services based on OICP 2.3.
- Electro-Mobility Provider Management System (EMPMS) to test EMP interaction with ERoaming services based on OICP 2.3.
- Mock ERoaming Service to validate connectivity and data flow for OICP 2.3.
- REST APIs for controlling and inspecting the backend behaviors based on FastAPI.
- Prototypical Web UIs to visualize or manually operate systems and services.
- Observability and Distributed Tracing using OpenTelemetry (experimental support).
- Protocols: OCPP 1.6J, OCPP 2.0.1 (basic functionality) based on Mobility House OCPP library.
- Protocols: OICP 2.3 (currently basic EMP and CPO functionalities are supported) based on Hubject OpenAPI specs.
- APIs: The Hubject Open Plug&Charge Environment is utilized for CSMS communication and obtaining relevant certificates (ISO15118-2).
Below is a high-level overview of how to set up OCPP Compote on your local machine.
- Clone the repository:
git clone https://github.com/dailab/ocppcompote.git
- Navigate to the cloned repository:
cd ocppcompote
Please see the requirements.txt
file and install with:
pip install -r requirements.txt
Please use a Python version 3.10+.
OCPP Compote utilizes the Mobility House OCPP library for OCPP communication of CSMS with charge points. In addition, OCPP Compote utilizes the OICP CPO OpenAPI specifications provided by Hubject. Navigate to the root directory, and launch via
uvicorn compote.csms.csms_engine:app --reload --log-level error --port 8001
Configure the csms service using the JSON file tmp/config_csms_16.json
.
Connect OCPP-compatible charging stations via Websocket to ws://localhost:8001/ocpp
.
Point your browser to http://localhost:8001/ui
.
http://localhost:8001/api
: CSMS Management and OCPPv16/v201 REST APIhttp://localhost:8001/api/docs
: Swagger API Documentation
http://localhost:8001/oicp_api
: CSMS OICP APIhttp://localhost:8001/oicp_api/docs
: Swagger API Documentation
http://localhost:8001/pnc_api
: CSMS PnC APIhttp://localhost:8001/pnc_api/docs
: Swagger API Documentation
Log files for the CSMS (csms_engine.py_*.log
) are provided in the /tmp
folder.
For EMP Service provision, OCPP Compote utilizes the OICP EMP OpenAPI specifications provided by Hubject. Navigate to the root directory, and launch via
uvicorn compote.emp.emp_engine:app --reload --log-level error --port 8000
Configure the emp service using the JSON file tmp/config_emp.json
.
Point your browser to http://localhost:8000/gui
.
http://localhost:8000/
: EMPMS Management APIhttp://localhost:8000/docs
: Swagger API Documentation
http://localhost:8000/oicp_api
: EMPMS OICP APIhttp://localhost:8000/oicp_api/docs
: Swagger API Documentation
http://localhost:8000/pnc_api
: EMPMS PnC APIhttp://localhost:8000/pnc_api/docs
: Swagger API Documentation
Log files for the EMPMS (emp_engine.py_*.log
) are provided in the /tmp
folder.
The ERoaming Mock Service is derived from the Hubject OICP specification and utilizes code generated using the OpenAPI code generator.
uvicorn compote.eroaming.mock_eroaming_engine:app --reload --log-level error --port 8002
Configure the e-roaming service using the JSON file tmp/config_eroaming.json
.
http://localhost:8002/oicp
: Mock E-Roaming OICP APIhttp://localhost:8002/oicp/docs
: Swagger API Documentation
Log files for the Mock E-Roaming Service (mock_eroaming_engine.py_*.log
) are provided in the /tmp
folder.
Please refer to the README.md
file in the cs_everest
folder.
A basic OCPP 1.6 charging station simulator is provided in the cs
folder.
Navigate to the cs folder and launch as follows:
python3 cs_engine.py
Configure the charging station simulator using the JSON file cs/tmp/config_cs.json
.
Zipkin can be utilized to view OpenTelemetry traces for the service architecture. To use Zipkin follow the instructions provided on https://github.com/openzipkin/zipkin. For using an already assembled Zipkin Docker container run:
docker run -d -p 9411:9411 openzipkin/zipkin
Using their default configuration, the services are configured to utilize Zipkin automatically.
Chic is a user interface for CPOs and EMPs that consolidates all other services (CSMS, EMPMS, E-Roaming Mock, EVerest Charging Station Simulator, OCPP Charging Station Simulator, Zipkin) into a unified platform. This integration facilitates straightforward and transparent message exchanges between the roles within the e-mobility domain along the communication paths illustrated in the diagram above
. Additionally, it enables the display of key metadata for enhanced traceability and analysis.
To start Chic, simply navigate to the compote/chic
directory and run:
docker buildx build --platform linux/amd64 -t compote/chic-amd64:latest .
docker run -d -p 3000:3000 compote/chic-amd64
Chic should now be available and can be reached by pointing your browser to http://localhost:3000
.
For a more detailed explanation, please refer to the dedicated Chic README.md
.
This open source project is funded by the German Federal Ministry for Economic Affairs and Climate Action as part of the EMoT project under Grant Agreement No. 01MV21009C.
OCPP Compote is licensed under the MIT license. All the libraries that OCPP Compote may depend on are licensed under the MIT license, except for the JSON Schema Validator, licensed under the BSD 3 Clause license and the ACE editor licensed under the Mozilla tri-license (MPL/GPL/LGPL).