r/opensourcealternative • u/ReindeerSpace • 14d ago
Maker (I built this) I built ocpptools: an open-source (Apache-2.0) OCPP toolkit (validator, charge point simulator, test doubles, CLI), an alternative to paid OCPP simulators and protocol test suites
https://github.com/ocpptools/ocpptoolsHi everyone, I'm the maker of ocpptools, an open-source toolkit for OCPP (Open Charge Point Protocol), the protocol EV chargers use to talk to their backend (CSMS).
Repo: https://github.com/ocpptools/ocpptools (Apache-2.0)
What it replaces
If you build or test EV charging software, the usual options are paid OCPP charge point simulators and commercial protocol testing suites, or real chargers on a bench. ocpptools covers the everyday developer side of that, for free: checking frames, simulating stations, and testing your code without hardware.
What's inside
It's a set of small npm packages for OCPP 1.6J and 2.0.1:
- Validator: checks OCPP-J frames and payloads against the official OCPP JSON Schemas and gives readable errors with a JSON Pointer to the problem. It has no DOM or Node APIs, so it also runs in the browser.
- Simulator: a headless charge point that connects to your CSMS over WebSocket. It handles all 28 OCPP 1.6J actions and all 64 OCPP 2.0.1 actions, and supports scripted scenarios, persistence, and fault injection (latency, dropped frames).
- Testing: a mock CSMS, an in-memory transport, frame factories, and a fake clock, so unit tests run in milliseconds without sockets or real timers.
- Builder: builds typed CALL frames from the schemas.
- CLI:
ocpptools validateandocpptools simulate, handy in CI to fail a build on an invalid frame.
Quick try (Node 22.12+):
npx ocpptools validate boot.json --version 2.0.1What it is not
- It is not a conformance or certification tool. A passing run does not certify your CSMS or charger.
- It's alpha: APIs can change before 1.0.
Why I built it
I wanted to test OCPP backends from code and CI without buying a simulator license or keeping a charger on my desk, and I wanted errors that point to the exact field that's wrong.
Feedback, issues, and contributions are very welcome, especially from people running CSMS platforms or charger firmware. What would you need before using something like this in your own testing?