OCPP CLI
Development Tools
Utilities for mocking APIs and generating telemetry.
ocpp mock
A Mock API Server Generator. It creates a simple HTTP server with Server-Sent Events (SSE) that your frontend team can use to develop dashboards without needing a real running CSMS backend.
Usage
ocpp mock [options]Options
| Option | Alias | Default | Description |
|---|---|---|---|
--port | -p | 8080 | The HTTP port to listen on. |
--rate | -r | 500 | The interval in milliseconds for generating random events. |
How it works
- Starts an HTTP server at
http://localhost:8080. - Exposes an
/eventsendpoint that streams randomStatusNotificationandMeterValuesupdates via SSE. - Frontend apps can subscribe to this stream to visualize charging sessions in real-time.