UnlockConnector is one of the simpler but emotionally significant OCPP messages. When a driver cannot pull the cable out, because the session ended but the connector lock has not released, this is the message that helps.
It’s also the message you don’t want to need. A properly-functioning charger releases the cable automatically when the session ends. UnlockConnector is the safety valve for when the normal flow breaks.
This article covers how it works, when to use it, and why it should be a last resort.
Why connector locks exist
EV chargers physically lock the cable into the connector during charging. This serves several purposes:
Safety. Pulling a high-current cable while energized would create an arc, potentially damaging connectors and posing a risk to the user. The lock ensures the cable can’t be removed while current is flowing.
Theft prevention. Without a lock, anyone could unplug your car and steal the cable.
Session continuity. The lock prevents accidental disconnections that would interrupt charging.
The lock engages when charging starts. It should disengage when charging ends and current has fully stopped.
The normal release flow
A well-functioning session ends like this:
- User stops the session (via app, RFID re-tap, or full charge reached).
- Charger ramps down current to zero.
- Contactor opens; circuit is now de-energized.
- Charger sends StopTransaction (1.6) or TransactionEvent (Ended) (2.0.1).
- Charger releases the connector lock (motor disengages).
- User pulls the cable.
flowchart TD
A[User stops session] --> B[Current ramps<br/>to zero]
B --> C[Contactor opens<br/>circuit de-energized]
C --> D[Charger reports<br/>session ended]
D --> E[Lock motor<br/>disengages]
E --> F[User pulls cable]
E -. flow breaks .-> G[Cable stuck<br/>send UnlockConnector]
style G fill:#fde68a,stroke:#d97706
The transaction messages in step 4 differ by protocol version. See StartTransaction and StopTransaction for 1.6 and TransactionEvent in 2.0.1. The lock release itself is automatic, and UnlockConnector exists for when that flow breaks.
When the cable gets stuck
Several scenarios cause the lock to stay engaged unexpectedly.
CSMS connection lost during session end. Charger ended the session locally but couldn’t notify the CSMS. Lock-release logic may depend on getting confirmation; if the logic is too strict, the lock stays.
Software bug. Race condition or state-machine error in the firmware leaves the lock state inconsistent.
Power glitch. Brief power blip mid-release leaves the lock partially-released or in an unknown state.
Mechanical issue. Lock motor failed; the cable is physically stuck.
Charger faulted. A fault during session end may pause the release sequence.
Session never properly ended. User pulled away without ending the session; charger thinks session is still in progress.
In the first 4-5 cases, UnlockConnector usually resolves the issue. In the last (mechanical), a technician visit is needed. Several of these overlap with failure modes covered in common OCPP errors explained: a lost CSMS connection, a faulted charger, a session that never ended cleanly.
The OCPP message
The request names one connector and nothing else. OCPP 1.6:
[2, "ul-1", "UnlockConnector", { "connectorId": 2 }]
[3, "ul-1", { "status": "Unlocked" }]
The 1.6 statuses:
- Unlocked. Lock released successfully.
- UnlockFailed. The charger tried but couldn’t release.
- NotSupported. The charger doesn’t implement UnlockConnector, typically because it has no lock of its own to release.
OCPP 2.0.1 addresses the connector through its EVSE, and the response can carry an optional statusInfo with a reason:
[2, "ul-2", "UnlockConnector", { "evseId": 1, "connectorId": 1 }]
[3, "ul-2", { "status": "OngoingAuthorizedTransaction" }]
The 2.0.1 statuses are Unlocked, UnlockFailed, OngoingAuthorizedTransaction and UnknownConnector. NotSupported is gone; the 2.0.1 use case assumes the station has a connector lock.
What happens when a session is still running
This is where 1.6 and 2.0.1 differ, and where most CSMS logic built on one version breaks on the other.
OCPP 1.6 stops the session for you. The 1.6 specification says that if a transaction is in progress on the connector, the charger shall finish it first, as described for StopTransaction, and then unlock. The stop carries its own reason code, so you can tell it apart from a driver stop:
[2, "st-881", "StopTransaction", {
"transactionId": 881,
"meterStop": 18342,
"timestamp": "2026-11-28T09:41:07Z",
"reason": "UnlockCommand"
}]
So on 1.6, UnlockConnector is a stop command with a side effect. A support agent who sends it to the wrong connector ends a stranger’s session.
OCPP 2.0.1 refuses. If an authorized transaction is ongoing on that connector, the station shall not unlock it and shall not stop the transaction; it answers OngoingAuthorizedTransaction (F05.FR.02). To release a cable mid-session on 2.0.1 you stop the session first with RequestStopTransaction, wait for the TransactionEvent Ended (or for authorization to end), and then send UnlockConnector.
The word “authorized” matters. On a station whose transaction only ends when the cable is unplugged (a TxStopPoint of EVConnected), a session the driver has already stopped with their card is still open but no longer authorized. UnlockConnector is allowed then, and the TransactionEvent that follows can carry triggerReason UnlockCommand.
| Situation | OCPP 1.6 charger | OCPP 2.0.1 charger |
|---|---|---|
| No transaction, cable stuck | Tries to unlock, returns Unlocked or UnlockFailed | Same |
| Authorized transaction running | Stops it (StopTransaction reason UnlockCommand), then unlocks | Returns OngoingAuthorizedTransaction, keeps charging |
| Transaction open but already deauthorized | Stops it, then unlocks | Unlocks; the transaction continues until the cable is out |
| No cable detected | Implementation-specific | Must still attempt the unlock and report the result (F05.FR.06) |
| Connector id does not exist | No dedicated status; expect UnlockFailed or a CALLERROR | Returns UnknownConnector |
| Charger has no lock to release | NotSupported | No dedicated status; the use case assumes a lock |
Which lock UnlockConnector can actually release
UnlockConnector drives the charger’s own cable retention lock, the actuator in a socketed charger that holds a detachable cable in place. The 2.1 specification adds that it is not meant for opening a connector access door.
On a charger with a tethered cable, which includes every DC fast charger and many AC wallboxes, the plug is held by the lock in the vehicle’s inlet, and the car decides when to release it. Sending UnlockConnector to that charger can’t free the plug. What helps instead is ending the session cleanly so the car sees charging stop, then having the driver unlock the car (most cars release the inlet lock with the key or in the car’s charging menu). Support scripts that answer every stuck-cable call with UnlockConnector waste the first five minutes on tethered chargers.
When to send UnlockConnector
A few legitimate triggers.
User calls support stuck at charger. Support agent verifies the charger thinks the session is over, confirms current isn’t flowing, sends UnlockConnector.
Self-service in app. Some networks expose a “release cable” button in their app, with safety guards. The user triggers UnlockConnector themselves.
Automated recovery. Operations sees a connector stuck in Finishing state for an extended period and triggers UnlockConnector automatically. This relies on accurate connector status, so see the StatusNotification deep dive for how Finishing is reported and how often it is reported late.
Maintenance access. Tech needs to remove a cable for replacement. UnlockConnector before physical work.
Safety considerations
UnlockConnector should only be sent when it’s safe.
Check the session state before you send it. On 1.6 the charger will end a running transaction to honour the unlock, so the CSMS has to check first that the connector has no session it wants to keep. On 2.0.1 the station refuses while an authorized transaction runs, but your CSMS should still not rely on the refusal.
Current must be zero before the lock opens. Pulling a cable under load risks arcing and injury. A well-built charger opens its contactor and confirms zero current before driving the lock, on every version. Verify that on your own hardware rather than assuming it.
Confirm intent for self-service. A user accidentally tapping “release cable” mid-session is bad UX. Confirmation dialogs help.
Audit unlock events. Every UnlockConnector should be logged with who, when, why. Useful for support analysis and abuse prevention.
Where to put the button (or not)
A UX decision: should users have direct access to UnlockConnector?
Arguments for:
- Self-service is faster than support call.
- Most issues are simple enough for users to handle.
- Empowers users.
Arguments against:
- Users may use it inappropriately (mid-session out of impatience).
- Support context (confirmed end-of-session) is hard to verify in the app.
- Risk of abuse / misuse.
A compromise: expose the option with appropriate warnings (“Only use if your session has ended and the cable is stuck”). Audit usage.
Whether to expose this to drivers directly or keep it behind a support agent is a policy decision, and it turns on a single question: can you be confident the cable is de-energised before the lock releases? If the charger enforces that internally, self-service is reasonable. If it does not, an agent in the loop is the safety control.
Operational patterns
A few patterns for handling stuck cables operationally.
Automated detection. Monitor connectors in Finishing state. If duration exceeds 5 minutes (or whatever threshold), alert or auto-unlock.
Tiered response:
- Auto-unlock first (try UnlockConnector).
- If UnlockFailed, alert operations.
- If still stuck, dispatch a technician.
User self-service via app: as above, with safety guards.
Support team capability: support agents should be able to trigger UnlockConnector quickly when a user reports an issue.
Troubleshooting a stuck cable
| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| UnlockConnector returns Unlocked, driver still can’t pull the plug | Tethered cable: the vehicle inlet holds the plug, or the cable is under tension | Is the cable fixed to the charger? Is the driver pulling at an angle? | Driver unlocks the car and pushes the plug in slightly before pulling |
| 2.0.1 returns OngoingAuthorizedTransaction | The session is still authorized | Last TransactionEvent for that EVSE | RequestStopTransaction, wait for Ended, then unlock |
| 1.6 session ended unexpectedly with reason UnlockCommand | Someone sent UnlockConnector to a busy connector | CSMS audit log for the command and its connectorId | Make the CSMS check connector status before sending |
| UnlockFailed every time on one connector | Jammed or failed lock actuator | Repeat once after a minute; look for errorCode ConnectorLockFailure in a 1.6 StatusNotification, or a lock fault in a 2.0.1 NotifyEvent | Dispatch a technician |
| UnknownConnector (2.0.1) | Wrong evseId and connectorId pair | The station’s EVSE and connector layout from its device model | Send the pair the station reported at boot |
| Request times out | Charger offline or busy with another call | Last Heartbeat, WebSocket state | Fix connectivity first; a timed-out unlock may still have run |
What chargers should do
For firmware engineers.
Implement UnlockConnector reliably. It’s a critical safety feature. Should work even when many other things are broken.
Verify safety before unlocking. Don’t unlock if current is flowing. Don’t unlock if a session is genuinely active.
Handle motor failures gracefully. If the lock motor fails physically, return UnlockFailed; don’t silently fail.
Report status accurately. UnlockFailed should mean the unlock genuinely failed. Don’t return Unlocked optimistically.
Test the unhappy paths. What if power glitches mid-unlock? What if the connector is partially seated? Edge cases matter.
What CSMSes should do
A few principles.
Provide an admin-facing unlock UI with audit logging.
Expose user-facing self-service with confirmation and warnings.
Monitor stuck connectors automatically.
Handle UnlockFailed gracefully. Tell the user what to do next (call support, etc.).
Audit log every unlock. Useful for analysis.
A note on connector design
The need for UnlockConnector partly reflects the limits of connector lock design. Modern locks are mostly reliable. Older charger hardware had higher rates of stuck cables.
A high rate of UnlockConnector usage concentrated on one charger model is a signal worth acting on. It usually means aging lock actuators or a design weakness, and it is visible in your data long before it becomes a pattern of complaints.
Track unlock frequency per charger as a maintenance indicator.
The honest summary
UnlockConnector is the safety valve for stuck cables. Use it sparingly and only when safe. Build self-service into your app with appropriate guards. Monitor unlock frequency as a hardware health signal. Most charging sessions never need UnlockConnector; for the ones that do, having it work cleanly resolves user frustration before it becomes a support escalation.
If you are building out your OCPP knowledge, What is OCPP? and the OCPP version comparison put this message in the wider protocol context.