Connect API - OCPP Wallbox Onboarding
TL;DR
POST /vendors/{id}/connectionswithtype: "ocpp"→ readflowOptions[name="ocppUrl"]from the response → display thewss://URL to the user → user enters it in their wallbox config- Do not use the URL from
GET /connection-options; it is a randomized preview. The URL to configure is always the one inflowOptions[name="ocppUrl"] - Only one open connection allowed per user — if you need a new one,
DELETEthe old connection first (devices must be unlinked first) - Any wallbox that connects to the user's OCPP endpoint is attached to that one open connection — even if its configured URL still carries the device tag of an earlier, deleted connection (see URL adoption). The connection's
ocppUrlthen reflects the identity the wallbox actually connected with - The wallbox won't show up in
GET /vendors/{id}/devicesuntil it actually connects to the OCPP endpoint — tell users to save & restart - Plugging in does not start charging by itself — see Charging Behaviour After Plug-in
Complete flow for connecting OCPP wallboxes via the Connect API.
Notes
- Vendor/Model is a 1 to 1 relation (one Vendor per Model)
- Only one pending connection at a time (this constraint might be removed in future)
- Similar to form flow
Step 1: List Vendors
Code
Response:
Code
Step 2: Get Connection Options
Code
Response:
Code
OCPP-HOME-ID: unique OCPP identifier per home/user, automatically created by the Connect APIDEVICE-TAG: Some devices require this id, but it's optional for others. In case the device requires the ID, it will be added by the Connect API. If not required, this part of the URL will not be provided
Warning — do not display this URL to the user. The
DEVICE-TAGsegment in this pre-creation response is freshly randomized on every read and is never persisted. Use this endpoint only to discover the flow type and field layout. The URL to give to the user is the one returned asflowOptions[name="ocppUrl"]after you create the connection in Step 3 — that one is stable.
Step 3: Create Connection
Code
Request:
Code
Response:
Code
Note: Read the URL from
flowOptions[name="ocppUrl"].data. Match byname, not by index — order is not guaranteed. The device tag in the URL is minted and persisted when the connection is created; the URL does not re-roll on reads. The same array is re-surfaced on everyGET /v1/users/{userId}/vendors/connections?vendorId=...call, so you can recover the URL later without re-creating the connection.There is one case where the URL legitimately changes after creation: if a wallbox that is still configured with an older OCPP URL connects, it is adopted into this connection and the
ocppUrlswitches to the identity the wallbox actually uses — see URL adoption. Always re-readflowOptionsbefore configuring a wallbox rather than relying on a URL you stored earlier.
Step 4: User Interaction required: Enter OCPP URL in Wallbox
Ask the wallbox owner to:
- Open the configuration interface of their wallbox (web UI or app).
- Locate the setting for the OCPP server URL (sometimes called backend URL or charge point management URL).
- Use the
ocppUrlvalue from theflowOptionsarray returned in Step 3: Create Connection (or re-fetched viaGET /v1/users/{userId}/vendors/connections?vendorId={vendorId}) in the wallbox device. - Save/apply the configuration and, if required by the device, restart the wallbox.
As soon as the wallbox connects to the OCPP endpoint, it will appear in Step 6: List Devices from Vendor.
URL Adoption (Lenient Matching)
Since there is only one open connection per user at a time, matching is deliberately lenient: every wallbox that connects to the user's OCPP endpoint is attached to that one open connection — the device tag in its configured URL does not have to match the tag minted at creation. A wallbox still configured with the URL of an earlier, deleted connection is therefore adopted just the same. After adoption, the connection's ocppUrl in flowOptions reflects the identity the wallbox actually connected with, which may differ from the URL returned when the connection was created.
This makes re-onboarding simple — do not reconfigure the wallbox:
- Delete the device (
DELETE /v1/users/{userId}/devices/{deviceId}), then the connection. - Create a new connection. The wallbox — still configured with its previous URL — is adopted automatically, typically within ~10 seconds and without a restart.
- It appears in
GET …/vendors/{vendorId}/devices?connectionId={newConnectionId}— create the device from there.
Two rules follow from this behavior:
flowOptions[name="ocppUrl"]is the single source of truth. Re-read it viaGET /v1/users/{userId}/vendors/connections?vendorId={vendorId}before configuring anything in the wallbox; never reuse a URL you stored earlier.- Never reconfigure the wallbox after it has been adopted. Switching it to the freshly minted URL at that point creates a second identity: the connection is already bound to the old one, no status messages match the device you created, and it stays in
waitingForStatusindefinitely.
If you explicitly want a fresh identity, remove the OCPP URL from the wallbox (or take it offline) before creating the new connection. With nothing connecting, no adoption happens, and the minted URL from flowOptions is the one to configure.
Step 5: Delete Connection (Optional)
In case the connection is not established, the connection should be deleted as there may only be one connection with unassigned OCPP devices at a time per userId.
Code
Response: 204 on success
Important: All devices attached to the connection must be deleted first (via
DELETE /v1/users/{userId}/devices/{deviceId}). If you attempt to delete a connection with linked devices, the endpoint will return an error.
Step 6: List Devices from Vendor
Code
Response:
Code
Step 7: Create Device in Connect API
Code
Request:
Code
Response:
Code
Charging Behaviour After Plug-in
clever-PV does not start a charging session just because a cable was plugged in. What happens next depends on two things:
1. The charger's own authorization setting — a setting on the wallbox itself, not controlled by the Connect API. clever-PV never rejects an authorization the charger requests, so:
- Free charging / plug-and-charge / local RFID: the charger starts on its own; clever-PV observes it (
display-charging-statebecomescharging). - Wait for the backend: the charger stays in
awaitingStartuntil a start is sent.
2. Whether an optimization is enabled in clever-PV
smart-modetrueplus an active feature (solar-optimization,price-control,soc-plan,target-charging,time-control): clever-PV starts the session itself once the feature's condition is met — no per-session trigger. A self-started session is regulated or stopped by the surplus loop unlesscharging-modeischargeAlways.smart-modefalse: clever-PV stays passive. A backend-gated charger has to be triggered every session viaon-offorboost.
on-offis not a stored preference — itsstatemirrors the live charging state, so anondoes not carry over to the next plug-in.boostis per session as well and is cleared on unplug.
Track the session via display-charging-state: noCarConnected → awaitingStart → charging. Writes return 202; re-fetch the device afterwards.