Skip to content

dailab/ocppcompote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCPP Compote

A Python-based test toolkit to analyze and troubleshoot communication between roles in the e-mobility domain.

Overview

Info

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).

Table of Contents

  1. Features

  2. OCPP Support

  3. OICP Support

  4. Installation

    4.1 Local Installation

    4.2 Dependencies and Requirements

  5. Usage

    5.1. CSMS (CPO) Service

    5.2. EMPMS (EMP) Service

    5.3. ERoaming Mock Service

    5.4. Additional Services

  6. Notes and License


1. Features

  • 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).

2. OCPP Support


3. OICP Support

  • Protocols: OICP 2.3 (currently basic EMP and CPO functionalities are supported) based on Hubject OpenAPI specs.

3. Plug-and-Charge Support


4. Installation

Below is a high-level overview of how to set up OCPP Compote on your local machine.

4.1 Local Installation

  1. Clone the repository:
git clone https://github.com/dailab/ocppcompote.git
  1. Navigate to the cloned repository:
cd ocppcompote

4.2 Dependencies and Requirements

Please see the requirements.txt file and install with:

pip install -r requirements.txt

Please use a Python version 3.10+.


5. Usage

5.1 CSMS (CPO) Service

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

Configuration

Configure the csms service using the JSON file tmp/config_csms_16.json.

OCPP CSMS

Connect OCPP-compatible charging stations via Websocket to ws://localhost:8001/ocpp.

Web UI

Point your browser to http://localhost:8001/ui.

REST API

Logging

Log files for the CSMS (csms_engine.py_*.log) are provided in the /tmp folder.

5.2 EMPMS (EMP) Service

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

Configuration

Configure the emp service using the JSON file tmp/config_emp.json.

Web UI

Point your browser to http://localhost:8000/gui.

REST API

Logging

Log files for the EMPMS (emp_engine.py_*.log) are provided in the /tmp folder.

5.3 ERoaming Mock Service

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

Configuration

Configure the e-roaming service using the JSON file tmp/config_eroaming.json.

REST API

Logging

Log files for the Mock E-Roaming Service (mock_eroaming_engine.py_*.log) are provided in the /tmp folder.

5.4 Additional Services

5.4.1 EVerest Charging Station Simulator

Please refer to the README.md file in the cs_everest folder.

5.4.2 OCPP Charging Station Simulator

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

Configuration

Configure the charging station simulator using the JSON file cs/tmp/config_cs.json.

5.4.3 Zipkin

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.

5.4.4 Chic

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.

Quick Start

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.


6. Notes and License

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).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published