ocpp-ws-cli
v1.0.0
Published
The ultimate CLI ecosystem for ocpp-ws-io
Downloads
112
Readme
ocpp-ws-cli
🚀 Quick Start
Global Installation:
npm install -g ocpp-ws-cliRun instantly via npx:
npx ocpp-ws-cliRunning without arguments launches the Interactive Main Menu.
🔥 Featured Commands
ocpp simulate : The Stateful Charge Point Simulator
Boot a fully interactive, terminal-based Virtual Charge Point directly from your CLI.
- Automated Boot Sequence: Automatically connects, sends
BootNotification, negotiates theinterval, and manages the WebSocketHeartbeatloop. - Real-Time Hardware Dashboard: Watch a beautiful, auto-refreshing ASCII interface updating every second with live physical metrics:
- 🔌 Voltage (V) & ⚡ Current (A)
- ⚡ Live Power (kW)
- 🔋 Energy Consumed (Wh)
- 🌡️ Temperature (°C)
- 🚗 State of Charge (SoC %)
- Interactive Keyboard Controls:
[A]Authorize: Swipe a virtual RFID badge.[T]Start: InitiateStartTransaction.[M]Meter: BroadcastMeterValueswith dynamic power curve generation.[E]Stop: PushStopTransactionwith final registers.[S]State: Toggle betweenAvailableandFaultedstates to test CSMS alarms.
- Protocol-Aware Dispatching: Automatically upgrades from flat OCPP 1.6 structures to modern
TransactionEventloop frameworks when connected as OCPP 2.0.1+. - Reverse RPC Ready: Actively listens and reacts to CSMS
RemoteStartTransaction,RemoteStopTransaction,UnlockConnector,Reset, and more.
ocpp mock : Server-Sent Events (SSE) Mock Server
Spin up a randomized HTTP SSE stream of Mock OCPP Data to accelerate your Frontend UI development without needing physical hardware.
- Instantly streams dummy
MeterValues,StatusNotification, andHeartbeatevents. - Configurable broadcast rates and host ports via interactive prompts.
ocpp audit : Production Security Audit
Launch the interactive "OCPP-WS-IO Production Auditing Guide" wizard.
- Runs automated tests to pre-fill audit checkpoints.
- Generates a comprehensive markdown audit report (
audit-report.md) verifying strict mode schema enforcement, rate-limiting, secure WSS handshakes, and caching topologies.
ocpp certs : Local Certificate Generation
Bypass complicated bash scripts and instantly generate 4096-bit local Root CAs and signed Server/Client .pem certificates.
- Designed explicitly for rapidly testing OCA Security Profile 2 (TLS) and Profile 3 (mTLS) directly on
localhost.
ocpp test : OCTT Compliance Test Suites
Execute modularized test suites against your servers:
transport- Core WebSocket connection resilience.rpc- Strict 2-CALL / 3-CALLRESULT validation.security- Basic Auth and TLS robustness limits.chaos- Extreme malformed JSON/DDOS payload fuzzing.
ocpp generate : Type Generation
Read your custom JSON schemas and output exact TypeScript .d.ts declaration libraries for 100% strict type safety across your entire charging network.
ocpp load-test : Distributed Load Testing Engine
A distributed load testing engine capable of simulating thousands of concurrent Charge Point connections.
- Simulates intense traffic spikes with staggered connections.
- Generates detailed metrics for successful and failed requests.
ocpp fuzz : Protocol Chaos Engine (Fuzzer)
A protocol fuzzer that sends malformed, invalid, or unexpected payloads.
- Floods the server with protocol anomalies using multiple concurrent worker threads.
- Validates that strict-mode schema enforcement and error handling are robust.
📚 Documentation
For complete usage, architecture planning, and API examples, check out the official documentation at: ocpp-ws-io GitHub Repository
