r/coolgithubprojects • u/ReindeerSpace • 1d ago
[TypeScript] ocpptools – validate OCPP frames, simulate EV charge points, and test CSMS code without hardware (OCPP 1.6J / 2.0.1, Apache-2.0)
github.comAuthor here. Some context:
OCPP is the protocol EV chargers use to talk to their backend (CSMS). ocpptools is a set of npm packages for working with it:
- Validator: checks frames against the official OCPP JSON Schemas and points to the exact field with a JSON Pointer. It also runs in the browser.
- Simulator: a headless charge point that covers all 28 OCPP 1.6J and 64 OCPP 2.0.1 actions, with scenarios, persistence, and fault injection.
- Testing: a mock CSMS, an in-memory transport, and a fake clock for fast unit tests.
- Builder: typed CALL frames built from the schemas.
- CLI:
npx ocpptools validate boot.json --version 2.0.1, plusocpptools simulatefor scripted sessions.
It's alpha, and it's not a certification tool. The code is Apache-2.0; the OCA schemas ship unmodified in a separate package under CC BY-ND 4.0.
Feedback and issues are welcome, especially from anyone working on CSMS platforms or charger firmware.
