ocpp-rpc
    Preparing search index...

    ocpp-rpc

    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.

    • 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.
    • 🛂 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.
    npm install ocpp-rpc
    

    See the Getting Started guide in the API docs.

    Full API documentation and guides are available.

    See the Upgrade guide.