A Python-based test toolkit to analyze and troubleshoot communication between roles in the e-mobility domain.
OCPP Compote is designed to test the 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
- Charging Station Management System (CSMS) for testing charging station communication behavior (OCPP 1.6J and OCPP 2.0.1 (Basic Functionality).
- 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 EMP functionalities are supported) based on Hubject OpenAPI specs.
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. 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.
For CSMS instrumentation, a REST API is accessible via http://localhost:8001/api.
The Swagger API documentation is accessible via http://localhost:8001/api/docs.
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.
Default connection to provided mock ERoaming service available under http://localhost:8000/oicp.
Point your browser to http://localhost:8000/gui.
APIs are accessible via http://localhost:8000/ as well as http://localhost:8000/api.
The Swagger API documentation is accessible via http://localhost:8000/docs and http://localhost:8000/api/docs.
The ERoaming Mock Service is derived from the Hubject OICP specification and utilizes code generated using the OpenAPI code generator.
API is accessible via http://localhost:8000/oicp.
The Swagger API documentation is accessible via http://localhost:8000/oicp/docs.
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).