OCPP 1.6-J (JSON over WebSocket) Central System for controlling EV chargers like the Wallbox 3.
go build -o ocpp-server ../ocpp-serverOptions:
-ocpp-port: WebSocket port for charger connections (default: 8080)-api-port: HTTP API port (default: 8081)-credentials-file: Path to JSON file with charge point credentials
The server supports Basic Auth for charge point authentication. Credentials can be provided via:
./ocpp-server --credentials-file /path/to/credentials.jsonFormat of credentials.json:
{
"wallbox1": "secretpassword123",
"wallbox2": "anotherpassword456"
}export OCPP_CREDENTIALS='{"wallbox1":"secretpassword123"}'
./ocpp-serverIn your Wallbox OCPP settings:
- URL:
ws://YOUR_SERVER_IP:8080/ocpp/wallbox1 - Username:
wallbox1(must match the charge point ID in the URL) - Password:
secretpassword123
If no credentials are configured, the server runs in open mode (any charger can connect).
In your Wallbox settings, configure OCPP with:
- URL:
ws://YOUR_SERVER_IP:8080/ocpp/CHARGER_ID - Replace
CHARGER_IDwith a unique identifier for your charger (e.g.,wallbox1)
curl http://localhost:8081/api/chargepointscurl http://localhost:8081/api/chargepoints/wallbox1curl http://localhost:8081/api/chargepoints/wallbox1/statuscurl http://localhost:8081/api/chargepoints/wallbox1/metercurl -X POST "http://localhost:8081/api/chargepoints/wallbox1/unlock?connector=1"curl -X POST "http://localhost:8081/api/chargepoints/wallbox1/lock?connector=1"curl -X POST "http://localhost:8081/api/chargepoints/wallbox1/start?connector=1&tag=MYTAG"curl -X POST "http://localhost:8081/api/chargepoints/wallbox1/stop?transaction=1"curl http://localhost:8081/api/chargepoints/wallbox1/configA Helm chart is available at https://loafoe.github.io/helm-charts
helm repo add loafoe https://loafoe.github.io/helm-charts
helm install ocpp loafoe/go-ocpp-server \
--set auth.enabled=true \
--set auth.credentials.wallbox1=secretpassword123 \
--set httpRoute.enabled=true \
--set httpRoute.hostname=ocpp.example.comOr use auto-provisioning to generate credentials:
helm install ocpp loafoe/go-ocpp-server \
--set auth.enabled=true \
--set provisioning.enabled=true \
--set provisioning.count=1 \
--set provisioning.idPrefix=wallboxThen retrieve the generated credentials:
kubectl get secret ocpp-go-ocpp-server-credentials -o jsonpath='{.data.credentials\.json}' | base64 -d- BootNotification
- Heartbeat
- StatusNotification
- MeterValues
- StartTransaction
- StopTransaction
- Authorize
- DataTransfer
- UnlockConnector
- ChangeAvailability
- RemoteStartTransaction
- RemoteStopTransaction
- GetConfiguration