diff --git a/modules/API/API.cpp b/modules/API/API.cpp index e8aac7ca5..11383bc33 100644 --- a/modules/API/API.cpp +++ b/modules/API/API.cpp @@ -525,7 +525,13 @@ void API::init() { << ", error: " << e.what(); } } - evse->call_force_unlock(connector_id); // + // match processing in ChargePointImpl::handleUnlockConnectorRequest + // so that OCPP UnlockConnector and everest_api/evse_manager/cmd/force_unlock + // perform the same action + types::evse_manager::StopTransactionRequest req; + req.reason = types::evse_manager::StopTransactionReason::UnlockCommand; + evse->call_stop_transaction(req); + evse->call_force_unlock(connector_id); }); // Check if a uk_random_delay is connected that matches this evse_manager