Introduction to Ecosystem
The complete, type-safe OCPP 1.6/2.0.1/2.1 ecosystem for Node.js & NestJS — RPC, Smart Charging, Protocol Translation, and Simulation.
The complete, type-safe OCPP ecosystem for Node.js.
Historically, building an OCPP-compliant network has been an infrastructure nightmare. ocpp-ws-io ecosystem provides a modular, plug-and-play suite of tools built from the ground up in TypeScript to solve the hardest challenges in EV charging: end-to-end WebSocket RPC, Smart Charging power distribution, legacy-to-modern Protocol Translation, and enterprise-grade Load Testing.
🌍 The Ecosystem
Building a Charge Point Management System (CSMS) or Simulator shouldn't require you to invent everything from scratch. Our modular approach splits the complexities of the protocol into fully tested, interoperable packages.
1. Core RPC (ocpp-ws-io)
The foundational WebSocket RPC library. End-to-end type safety, JSON schema validation, Security Profiles 0-3 (mTLS), and Redis clustering.
2. Protocol Proxy (ocpp-ws-io/proxy)
Seamlessly translate legacy OCPP 1.6 chargers to modern 2.1 central systems using transport-agnostic middleware pipelines.
3. Smart Charge Engine (ocpp-ws-io/smart-charge)
A library-agnostic mathematical solver that distributes constraint-limited grid power safely among active EV charging sessions.
4. Terminal & Testing (the ocpp CLI)
The ultimate developer tooling. Boot virtual charge points in your terminal, generate local certs, and hurl load-test spikes at your server.
5. Visual Simulator (ocpp-ws-simulator)
A full-featured browser GUI emulator for visual debugging and demos. Try it live at ocpp.rohittiwari.me
6. Observability (voltlog-io)
High-performance, structured logging layer powering the ecosystem's network diagnostics.
Architecture Overview
The true power of the ecosystem is how effortlessly the components integrate:
Quick Starts
Choose the package you want to explore first:
Instantiate a strictly-typed WebSocket server with ocpp-ws-io.
npm install ocpp-ws-ioRequires Node.js 20 or later.
import { OCPPServer } from "ocpp-ws-io";
const server = new OCPPServer({ protocols: ["ocpp1.6", "ocpp2.1"] });
server.on("client", (client) => {
client.handle("ocpp1.6", "BootNotification", ({ params }) => {
return { status: "Accepted", currentTime: new Date().toISOString(), interval: 300 };
});
});
await server.listen(3000);