A Scala library implementing the Open Charge Point Protocol (OCPP) for communication between EV chargers and central systems.
NewMotion/ocpp is a Scala library that implements the Open Charge Point Protocol (OCPP), a standard for communication between electric vehicle charging stations and central management systems. It provides data types, serialization, and remote procedure call mechanisms for OCPP messages, enabling developers to build EV charging infrastructure software.
Developers building electric vehicle charging management systems, charge point operators, and IoT backend engineers working with OCPP-compliant hardware.
It offers a type-safe, modular, and transport-flexible implementation of OCPP in Scala, supporting multiple protocol versions and roles while allowing integration with different WebSocket libraries for varied deployment needs.
Open Charge Point Protocol
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides Scala case classes for OCPP messages (e.g., AuthorizeReq, BootNotificationRes), enabling compile-time checks and reducing runtime errors in request/response handling.
Uses the cake pattern to abstract WebSocket implementations, allowing swaps for different scenarios like high-concurrency servers or load testing clients, as detailed in the README's integration examples.
Split into separate modules (ocpp-j-api, ocpp-json, ocpp-messages) to minimize dependency bloat, letting users import only what they need for serialization or connection management.
Implements OCPP 1.5 and 1.6 over JSON with partial OCPP 2.0 support, and handles both Charge Point and Central System roles for bidirectional communication.
The README explicitly states OCPP 2.0 support is partial, missing features like full error codes, security mechanisms, and all message types, requiring manual implementation for production use.
Implementing non-default WebSocket libraries requires deep understanding of the cake pattern, as shown in the lengthy, abstract server example that spans multiple layers and methods.
The README notes open-source users should prefer the IHomer fork for active support and Maven Central publishing, suggesting this version may have slower updates or dependency management issues.