Skip to content

v2.0.0 — OCPP 2.0.1, Schema Validation, Web UI

Choose a tag to compare

@apostoldevel apostoldevel released this 15 Mar 01:22
· 45 commits to master since this release

What's New

OCPP 2.0.1 Support

  • 13 OCPP 2.0.1 messages — full charging session lifecycle (BootNotification, Heartbeat, StatusNotification, Authorize, TransactionEvent, MeterValues, RequestStartTransaction, RequestStopTransaction, Reset, SetVariables, GetVariables, ChangeAvailability, DataTransfer)
  • 3-tier model — Station → EVSE → Connector (instead of flat connector list)
  • 5 built-in 2.0.1 emulator stations (CP201–CP205) with different configurations
  • Protocol auto-detection via Sec-WebSocket-Protocol header

JSON Schema Validation

  • All incoming WebSocket messages validated against official OCPP JSON Schemas
  • 87 OCPP 1.6 + 103 OCPP 2.0.1 schemas loaded at startup
  • Powered by nlohmann/json-schema-validator

Web UI

  • Dark-themed dashboard with real-time station monitoring
  • Station detail view with OCPP command panel (19 commands for 1.6, 7 for 2.0.1)
  • Live OCPP message log via WebSocket
  • Schema-driven command forms with recursive nested object support
  • Zero dependencies — Vue 3 global build, no npm/build step required

Rewritten on libapostol v2

  • Migrated from libdelphi to libapostol — modern C++20 framework
  • Single epoll event loop for HTTP, WebSocket, and PostgreSQL
  • JSON configuration (replaced INI format)

Docker & Deployment

  • One-command install: curl -fsSL https://raw.githubusercontent.com/apostoldevel/ocpp-cs/master/install.sh | bash
  • Multi-stage Dockerfile with configurable build args (WITH_POSTGRESQL, WITH_SSL)
  • Webhook auth via environment variables (WEBHOOK_AUTH, WEBHOOK_USERNAME, WEBHOOK_PASSWORD, WEBHOOK_TOKEN)
  • Swagger UI at /docs/ with full OpenAPI spec

REST API

  • /api/v1/CentralSystem/ChargePointList — list connected stations
  • OCPP 1.6 and 2.0.1 commands via REST endpoints
  • OpenAPI specification included

Quick Start

git clone --recursive https://github.com/apostoldevel/ocpp-cs.git
cd ocpp-cs
docker compose up

Open http://localhost:9220 — 9 emulator stations connect automatically.

Breaking Changes

  • Configuration format changed from INI to JSON
  • Requires C++20 compiler (GCC 12+ or Clang 16+)
  • CMake 3.25+ required

Assets

  • cs_v2.0.0_Linux.tgz — pre-built binary (x86_64, Debian Bookworm, without PostgreSQL)
  • cs_v2.0.0_Linux.tgz.sha256 — SHA-256 checksum