Read and change charger settings
Set a charger's light and cable behaviour once and let Flowion keep it there, online or offline. Read and write any other setting directly.
On this page
Flowion gives every charger the same settings object, whatever its make. You say what you want, and Flowion brings the charger there in the background, including a charger that is offline when you ask. For anything the settings object does not cover, you can read and write the charger's own settings directly.
See a charger's settings
200Response
The real response has one entry per setting; two are shown here. It answers from what Flowion already knows, so it is instant and works while the charger is offline. Every setting carries the same fields:
| Field | Tells you |
|---|---|
target | What the charger is being held at |
actual | What the charger last reported |
syncing | true while Flowion is still bringing the charger to target |
supported | Whether this charger has the setting at all |
readOnly | The charger reports it cannot be changed |
derived | Flowion sets it for you from the charger's access rules |
overridden | target was set on this charger, rather than coming from the model's default |
syncError | Why the last attempt to apply target failed, if it did |
A charger that has never connected shows supported: false everywhere. That changes once it connects and reports what it has.
Change a setting
Two settings are yours to change today:
lightIntensity: the brightness of the charger's own lighting, from0.0(off) to1.0, in whole-percent steps.unlockOnUnplug: whether the charger releases its cable lock when the driver unplugs at the car, so the cable can be taken away.
The response is the full settings object, with syncing: true on what you changed. The charger is not contacted during the request, so the call behaves the same whether it is online, offline or not yet installed. Watch syncing go back to false to know the charger has caught up.
To go back to the model's default, send {"target": null} for that setting. Changing settings takes the ocpp.settings.update permission; see Permissions and policies.
Every value is checked before anything is written, so one bad value leaves all of them unchanged:
An unknown setting name, a read-only one or a value of the wrong type answers
422 invalidRequest.A value out of range, or between two steps (
0.255), answers422 invalidSettingValue. The message names the nearest valid value.
A charger with a fixed (tethered) cable has nothing to unlock, so it reports unlockOnUnplug as readOnly: true.
Read any other setting
Every charger has many more settings than the settings object covers. Some chargers expose them as configuration keys (a flat list of named values), others as variables grouped by the part of the charger they belong to (a connector, the meter, the controller). The API reads both. Each charger uses one of the two.
Flowion keeps a copy of whichever kind the charger has, refreshed on its own and whenever you read live:
# A charger with configuration keys
# A charger with variables; q filters by name
Both answer instantly and work while the charger is offline. Use them to display and audit. Ask the charger itself when you are about to act on a value:
200Response
Leave keys out to read every key the charger has. For a charger with variables, the same live read is POST .../commands/get-variables, with a list of {"component": {"name": ...}, "variable": {"name": ...}} pairs. Each pair comes back with its own status and value.
Change any other setting
value is always a string: "60", not 60. For a charger with variables, use POST .../commands/set-variables:
These calls wait for the charger's answer, so the charger has to be online. A 200 means the charger answered. Read its verdict in status:
status | What to do |
|---|---|
Accepted | Done |
RebootRequired | Stored, but only takes effect after a restart |
Rejected | The charger refused the value. Check the manufacturer's allowed range |
NotSupported | The charger has no such key |
A variable can also come back UnknownComponent or UnknownVariable. Before sending, Flowion checks each variable against the charger's reported list and answers 422 unknownVariable without contacting the charger if it is not there. If you know the variable exists (say, after a firmware update the charger has not reported yet), add "skipDeviceModelCheck": true.
The heartbeat interval is managed by Flowion. Writing it answers 422 csmsManagedSetting.
Settings worth checking on a new charger
| Setting (configuration key) | Why it matters |
|---|---|
MeterValueSampleInterval | Too long and sessions look empty between readings; too short and the charger sends more traffic than you need |
MeterValuesSampledData | Must include an energy reading, or sessions record no consumption |
StopTransactionOnEVSideDisconnect | Decides whether unplugging at the car ends the session |
MinimumStatusDuration | Lets the charger skip very short status changes, so a connector can go from preparing to charging with nothing in between |
Chargers with variables have equivalents under their own names.
When a live call fails
| Code | Meaning | What to do |
|---|---|---|
409 | The charger is not connected | Wait for it to come online, or use the stored copy |
422 | Not expressible on this charger, or refused before sending | Read error: unsupported means the charger uses the other kind of setting |
502 | The charger disconnected mid-call or sent an answer Flowion could not read | Retry once it is back |
503 | The command could not be sent | Retry shortly |
504 | The charger did not answer within about 35 seconds | Read the value back before you retry a write |
Endpoints
Charging stations · Configuration · Commands
For how these map onto the charger protocol, see How Flowion maps onto OCPP.