Migrating to ocpp-ws-io
Guides for moving a central system or charging station from ocpp-rpc, @voltbras/ts-ocpp or ocpp-ts to ocpp-ws-io, each checked against both libraries.
Each guide maps one library's API to ocpp-ws-io, and lists what changes on the wire: defaults, error replies and connection behaviour. The other library's code and ocpp-ws-io's were run side by side, and every snippet on these pages type-checks against the library it is written for.
From ocpp-rpc
The closest model: renamed classes and options, the auth callback's single argument, handlers without reply(), and stricter defaults.
From @voltbras/ts-ocpp
One handler per action instead of a switch, promises instead of Either, and validation that you switch on.
From ocpp-ts
handle() and return values instead of action events and callbacks, server.auth() instead of the authorization event.
A charging station and a central system don't have to move together: an ocpp-ws-io server serves charging stations that still run the other library, and the other way round.
Upgrading to 3.1
What changes from ocpp-ws-io 3.0.x to 3.1.0 — the wildcard handler's one-argument signature, empty OCPP 1.6 payloads, and the protocol proxy, smart charge engine and CLI moving into the package.
From ocpp-rpc
Move an ocpp-rpc server or charging station to ocpp-ws-io — the renamed classes and options, the auth callback's single argument, handlers without reply(), events, and the defaults and replies that differ on the wire.