Take a charger in and out of service

Stop new sessions on a whole charger or one outlet while it stays online and reporting, then bring it back when the fault is fixed.

2 min readEdit this page
On this page

A broken socket, a car park closed for works, a unit waiting for a part: you want the charger to stay connected and reporting, but to stop accepting new drivers. That is one command, and one more to bring it back.

Take a whole charger out of service

POST/v1/charging-stations/$CHARGER/commandsbash
curl -X POST "$API/charging-stations/$CHARGER/commands" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"type": "changeAvailability",
       "connectorId": 0,
       "kind": "Inoperative"}'

connectorId: 0 with no evseId means the whole charger.

Take one outlet out of service

Name the outlet by its evseId, the number in the charger's EVSE list, and keep connectorId at 0:

POST/v1/charging-stations/$CHARGER/commandsbash
curl -X POST "$API/charging-stations/$CHARGER/commands" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"type": "changeAvailability",
       "evseId": 2,
       "connectorId": 0,
       "kind": "Inoperative"}'

Bring it back

Send the same request with "kind": "Operative". Restarting the charger does not do it: chargers remember being taken out of service across restarts and power cuts, so a unit pulled for a fault does not quietly come back on its own.

Check that it took effect

The call returns a command straight away, with status: "queued" or "sent". Follow it until the charger answers, by polling GET .../commands/{commandId} or watching live updates. Sending commands covers the full lifecycle. Once the command settles, result.status says what happened:

result.statusMeaning
AcceptedIn effect now
ScheduledAccepted, and takes effect when the session running on it ends
RejectedThe charger refused

Scheduled is the usual answer when you take a busy outlet out of service. A charger does not cut off a driver mid-session, so that outlet is still charging someone until they finish. Wait for the connector to show Unavailable before sending a technician. To take it out now, stop the session first, then change availability.

Read where a charger stands

Each connector's status in the connector list shows the current state:

statusMeaning
AvailableFree for the next driver
OccupiedIn use: a car is plugged in, charging or finishing
ReservedHeld for one driver
UnavailableOut of service
FaultedBroken, by the charger's own report

A charger can also report Unavailable for its own reasons, such as while installing a firmware update. Faulted means it took itself out of service without anyone asking, which is the one worth alerting on.

Endpoints

Commands · EVSEs and connectors · Charging stations

In the API reference