Skip to content

Repository files navigation

OCPP-RPC

Coverage Status GitHub Workflow Status GitHub issues GitHub license GitHub stars GitHub forks

OCPP-RPC

A client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protocols (e.g. OCPP1.6J, OCPP2.0.1J and OCPP2.1).

Requires Node.js >= 20

This module is built for Node.js and does not currently work in browsers.

Who is this for?

  • Anyone building an OCPP-based Charging Station or Charging Station Management System (CSMS) using Node.js.
  • Anyone looking for a simple yet robust symmetrical RPC framework that runs over WebSockets.

Features

  • 🛂 Authentication - Optional authentication step for initiating session data and filtering incoming clients.
  • 🔒 OCPP Security - Compatible with OCPP security profiles 1, 2 & 3.
  • 💬 Serve multiple subprotocols - Simultaneously serve multiple different subprotocols from the same service endpoint.
  • Strict Validation - Optionally enforce subprotocol schemas to prevent invalid calls & responses.
  • Automatic reconnects - Client supports automatic exponential-backoff reconnects.
  • Automatic keep-alive - Regularly performs pings, and drops dangling TCP connections.
  • Graceful shutdowns - Supports waiting for all in-flight messages to be responded to before closing sockets.
  • Clean closing of websockets - Supports sending & receiving WebSocket close codes & reasons.
  • Embraces abort signals - AbortSignals can be passed to most async methods.
  • Optional HTTP server - Bring your own HTTP server if you want to, or let RPCServer create one for you.

Installing

npm install ocpp-rpc

Usage Examples

See the Getting Started guide in the API docs.

API Docs

Full API documentation and guides are available.

Upgrading from an older version?

See the Upgrade guide.

Licenses

About

A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protocols.

Topics

Resources

Stars

135 stars

Watchers

9 watching

Forks

Used by

Contributors

Languages