From: Jérôme Benoit Date: Wed, 17 Nov 2021 17:21:03 +0000 (+0100) Subject: Fix local badge authorisation X-Git-Tag: v1.1.31~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=71068fb926ca5fea4b811159ca958891d345ef38;p=e-mobility-charging-stations-simulator.git Fix local badge authorisation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index eb0bdb80..c8c6b969 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -296,12 +296,13 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer this.chargingStation.getConnectorStatus(transactionConnectorId).localAuthorizeIdTag = commandPayload.idTag; this.chargingStation.getConnectorStatus(transactionConnectorId).idTagLocalAuthorized = true; authorized = true; - } - if (!authorized && this.chargingStation.getMayAuthorizeAtRemoteStart()) { + } else if (this.chargingStation.getMayAuthorizeAtRemoteStart()) { const authorizeResponse = await this.chargingStation.ocppRequestService.sendAuthorize(transactionConnectorId, commandPayload.idTag); if (authorizeResponse?.idTagInfo?.status === OCPP16AuthorizationStatus.ACCEPTED) { authorized = true; } + } else { + logger.warn(`${this.chargingStation.logPrefix()} The charging station configuration expects authorize at remote start transaction but local authorization or authorize is enabled`); } if (authorized) { // Authorization successful, start transaction