This repository extends matth-x/MicroOcppSimulator with project-specific Docker, depot generation, and CitrineOS integration.
- OCPP 1.6 and OCPP 2.0.1 simulator support
- Docker-based local simulator setup
- Depot CSV to simulator generation via
./generate-depot.sh - Multi-container generation via
./generate-simulators.sh - Automatic CitrineOS IP discovery for generated
mo_storedata
- Docker
- Docker Compose (
docker composeordocker-compose) yqforgenerate-simulators.sh
Create the shared external network before starting containers:
docker network create fnx-platform-netClone the repository:
git clone git@github.com:Fenexity/MicroOcppSimulator.git
cd MicroOcppSimulatorGenerate depot simulators from a CSV file:
./generate-depot.sh depot-data/chargers-darmstadt.csv 1.6If CitrineOS restarted and its container IP changed, refresh the stored URLs:
./generate-depot.sh --update-urlGenerate files only, without starting containers:
./generate-depot.sh depot-data/darmstadt-depot.csv 1.6 --no-startGenerated outputs:
simulator-config-depot.ymldocker-compose-depot.ymlmo_store_depot/
Edit the simulator definition:
nano simulator-config.ymlGenerate and start:
./start-simulators.shManagement commands:
docker-compose -f docker-compose.generated.yml ps
docker-compose -f docker-compose.generated.yml logs -f
docker-compose -f docker-compose.generated.yml down
./cleanup-simulators.shFor the fixed two-simulator setup:
docker-compose up -d
docker-compose downThe shared external network is configured in:
docker-compose.ymldocker-compose.generated.ymldocker-compose-depot.ymlsimulator-config.ymlsimulator-config-depot.yml
The current external network name is:
fnx-platform-net
Example:
global:
network_name: "fnx-platform-net"
citrineos_service: "fenexity-citrineos"
mo_store_base_path: "./mo_store_generated"
simulators:
v16:
count: 2
base_port: 7101
ocpp_version: "1.6"
csms_url_template: "ws://citrineos:8092/{charger_id}"
base_charger_id: "charger-v16"
container_prefix: "microocpp-sim-v16"
environment:
MO_ENABLE_V201: "0"
v201:
count: 1
base_port: 7201
ocpp_version: "2.0.1"
csms_url_template: "ws://citrineos:8081/{charger_id}"
base_charger_id: "charger-v201"
container_prefix: "microocpp-sim-v201"
auth_password: ""
environment:
MO_ENABLE_V201: "1"
BASIC_AUTH_PASSWORD: ""The simulator workflow expects:
- a running CitrineOS container
- the simulator containers attached to
fnx-platform-net - the CitrineOS container discoverable by name for IP detection
The scripts update generated WebSocket configuration with the detected CitrineOS container IP. If the IP changes after a restart, run:
./generate-depot.sh --update-url.
├── AGENTS.md
├── Dockerfile
├── README.md
├── cleanup-simulators.sh
├── config/
├── depot-data/
├── docker-compose-depot.yml
├── docker-compose.generated.yml
├── docker-compose.standalone.yml
├── docker-compose.yml
├── generate-depot.sh
├── generate-simulators.sh
├── mo_store/
├── scripts/
├── simulator-config-depot.yml
├── simulator-config.yml
├── start-simulators.sh
└── templates/
docker-compose.generated.ymlanddocker-compose-depot.ymlare generated artifacts and may be overwritten by the scripts.- Depot generation uses
charging_station_idfrom the input CSV. - OCPP 1.6 and OCPP 2.0.1 use different backend ports and
mo_storetemplates.