From factory to first transaction: pre-configuring OCPP before the chargers ship
The eleven values that decide whether a charger works on first power-up, what happens when each one is wrong, and the test to run before it leaves the factory.
Also available in 简体中文
A charger that will not connect behaves the same way regardless of why. The screen says offline, the platform shows nothing, and the first instinct is hardware. In practice, almost every first-power-up failure we have seen comes down to eleven configuration values, and nine of them can be set before the unit leaves the factory.
For a charger manufacturer this is not a technical footnote. It is the difference between a customer who powers up and starts earning, and a customer who opens a support ticket and starts doubting the product. The cost of that ticket is not the engineer’s hour. It is the four weeks of confidence.
Below is what has to be right, in the order the connection is negotiated, what breaks when each is wrong, and the test worth running before the crate closes.
1. The WebSocket URL — including the path, not just the host
The charger dials a URL, not a hostname. wss://csms.example.com is not the same endpoint as wss://csms.example.com/ocpp/CP-00412.
The path segment usually carries the charge point identity, and different backends use different conventions: /ocpp/{cpId}, /steve/websocket/CentralSystemService/{cpId}, /ws/{cpId}. What matters is that the path the charger dials and the identity it declares in BootNotification are the same object as far as the backend is concerned.
When it is wrong: the upgrade request returns 404 or 401. The charger retries on its backoff schedule and shows “connecting”, which on a status screen is indistinguishable from “no SIM signal”.
2. The subprotocol string
ocpp1.6, ocpp1.6j, ocpp2.0.1. This is sent in the HTTP upgrade header Sec-WebSocket-Protocol, and the backend must echo it back. A mismatch is rejected at handshake, before a single OCPP frame is exchanged.
When it is wrong: the TCP connection succeeds, the WebSocket upgrade fails, and nothing ever appears in the OCPP log — because there is no OCPP session to log. This is why subprotocol failures are routinely misdiagnosed as network problems.
Two practical notes: ocpp1.6 is the registered string for the JSON variant, and some backends additionally accept ocpp1.6j. Confirm which one your target backend echoes before you set it at the factory, and write the answer down — it is the single most common mismatch we are asked to debug.
3. The charge point identity
Unique per unit, stable for the life of the unit, and identical to the path segment above.
The failure here is not usually a wrong value. It is a duplicate. Two chargers shipped with the same default identity — CP001, test, 12345678, or a factory serial with a trailing digit stripped — will both connect, and both will fight over one session in the backend. Each will appear to go offline at random intervals, and each will look fine in isolation when a technician tests it.
When it is wrong: intermittent disconnects that stop when the other unit is powered down. Diagnosing this costs days, because nothing in either charger’s log looks abnormal.
The fix is procedural: bind the identity to the hardware serial at manufacture, never to a model default, and make the backend reject a second registration for a live identity rather than silently replacing it.
4. Security profile and certificate
On 1.6J, security profile 0 is unencrypted, 1 is basic auth over TLS, 2 is TLS with a client certificate, 3 is client certificate plus charge point certificate management. On 2.0.1 the same profiles apply with different variable names.
Two things go wrong at the factory. The first is profile mismatch: the backend expects a client certificate and the charger dials with profile 1. The second is a certificate with a validity window that starts in the factory’s timezone and a clock that has not yet synced.
When it is wrong: handshake rejected, or a connection that works for the first minutes after boot and then fails on certificate validation once NTP corrects the clock. The second variant is the more expensive one, because it passes the factory test.
5. Clock and timezone
wss certificate validation, BootNotification timestamps and every meter value depend on the clock. A charger that ships with a factory-set clock, or with no NTP server, will produce session timestamps that are wrong by hours and meter values that cannot be ordered.
When it is wrong: sessions that appear to end before they start, tariffs applied at the wrong rate, and disputes you cannot win because your own data is inconsistent.
Set at least two NTP sources and a timezone, and log the sync result in the commissioning record.
6. Heartbeat interval
Default is 300 seconds on most firmwares. This is not a performance setting; it is the length of the window in which a dead charger still looks alive.
A 300-second heartbeat means your platform can be showing green for up to five minutes after a charger has died. For a site where a driver is standing at the unit, five minutes is a long time. Most operators settle on 60 to 120 seconds and accept the extra traffic.
When it is wrong: either the platform detects failures too slowly, or the charger floods a cellular link with traffic on a metered SIM.
7. Meter value sampling
MeterValueSampleInterval, MeterValuesSampledData, and on 2.0.1 the SampledDataCtrlr equivalents. Three decisions: what is sampled, how often, and whether values are sent periodically or only at start and stop.
Sample too rarely and you cannot bill a time-of-use tariff or diagnose a power problem. Sample too often and a 40-port site produces a data volume that costs more in storage than the session is worth.
When it is wrong: the platform shows a flat energy curve, or finance cannot reproduce a bill.
8. Connector numbering
In 1.6, connector ID 0 means the whole charge point, and physical connectors start at 1. On 2.0.1 the equivalent is EVSE ID 0 for the station. Firmwares that number from 0, or that number DC guns and AC sockets in a different order than the label, produce sessions attributed to the wrong connector.
When it is wrong: revenue allocated to the wrong tariff, and a site report that does not match the physical site.
9. Network settings, including the captive portal
For cellular units: APN, and whether the SIM needs a PIN. For Ethernet units: whether DHCP is assumed.
The failure that catches people is the captive portal — hotel, campus, airport networks that intercept the first HTTP request. A WebSocket upgrade that meets a captive portal hangs rather than fails, and the charger sits in “connecting” forever.
When it is wrong: works in the factory, works at the integrator, fails at the customer’s site, and gets reported as a hardware fault.
10. Local authorisation list and offline behaviour
Push the local authorisation list at commissioning, not after the first outage. Set the offline transaction behaviour explicitly — buffer and upload, or refuse — and confirm the buffer size.
When it is wrong: the first network outage produces either lost revenue or a driver who cannot charge in an underground car park, depending on which default the firmware shipped with.
11. The default tariff
If the platform applies a default tariff to an unknown charger, set it deliberately. If it applies none, a newly connected charger will accept sessions and bill zero until someone notices.
When it is wrong: free charging for the first days of a site’s life, discovered at month-end.
The test worth running before the crate closes
Eleven values is a lot to trust to a build script. The check that catches almost all of them is short:
- Power the unit with the target backend reachable.
- Confirm
BootNotificationis accepted and the unit appears in the platform within 60 seconds. - Authorise a tag, start a session, confirm
MeterValuesarrive with a transaction ID. - Stop the session, confirm the transaction closes and the energy figure matches the charger’s own display.
- Send a remote start from the platform and confirm a session begins.
- Pull the network, confirm the charger enters offline behaviour, restore, confirm buffered sessions upload.
- Record: firmware version, identity, subprotocol, security profile, certificate expiry, and the result of each step.
Seven steps, twenty minutes, and it converts a class of field failures into a factory rejection. Chargers that fail step 2 or 5 are far cheaper to fix on the line than in a customer’s car park.
Why this is a commercial decision, not a technical one
For a manufacturer, the question is who absorbs the cost of the first-power-up failure. If the unit ships unconfigured, that cost lands on the customer — who then calls you. If it ships configured and tested, the cost is a few minutes on the line.
There is a second-order effect that matters more. Customers comparing two chargers with the same specification cannot tell them apart on the datasheet. They can tell them apart on the day the unit arrives: one needs a technician and a remote session, the other needs a power cable. That difference gets written into the next tender, often as “must support factory pre-configuration” — which then becomes a requirement that excludes the competitor who did not do it.
We do this on the platform side: the pre-configuration values, the test instance and the commissioning record are part of what a manufacturer gets, because a charger that arrives configured is a charger that does not generate a support ticket in its first week. If you are a manufacturer working through this list, the partnership page explains how the factory workflow fits, and the online OCPP simulator is the fastest way to run step 2 through step 6 against a real backend without shipping anything.