Introducing ocpp-ws-io
A modern, type-safe library for building OCPP 1.6, 2.0.1+ applications in Node.js.

Rohit Tiwari
@rohittiwari-devocpptypescriptnodejswebsocket
We are excited to introduce ocpp-ws-io, a new comprehensive library designed to simplify the development of EV charging infrastructure. Whether you are building a Central System (CSMS) or a Charging Station simulator, ocpp-ws-io provides the tools you need to do it with confidence and type safety.
Why ocpp-ws-io?
Building OCPP applications can be challenging due to the complexity of the protocol and the need for robust WebSocket handling. ocpp-ws-io addresses these challenges by providing:
- Type Safety: Full TypeScript support with auto-generated types for all OCPP messages.
- Protocol Support: Seamless handling of OCPP 1.6, 2.0.1, and upcoming 2.1.
- Security: Built-in support for all security profiles (0-3), including TLS and mutual authentication.
- Validation: strict mode to validate messages against official JSON schemas.
Getting Started
Getting started is as simple as installing the package:
npm install ocpp-ws-ioCreate a simple client:
import { OCPPClient, SecurityProfile } from "ocpp-ws-io";
const client = new OCPPClient({
endpoint: "ws://localhost:3000",
identity: "CP001",
protocols: ["ocpp1.6"],
securityProfile: SecurityProfile.NONE,
});
await client.connect();Explore our documentation to learn more!