From: Jérôme Benoit Date: Wed, 5 Jun 2024 17:04:08 +0000 (+0200) Subject: fix: fix firmware update in progress detection X-Git-Tag: v1.3.4~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=382b62c45d665e66d4a2f3ad5ac7ecc6396859c7;p=e-mobility-charging-stations-simulator.git fix: fix firmware update in progress detection 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 d92d526e..773d01e3 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -1304,7 +1304,10 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion commandPayload.retrieveDate = convertToDate(commandPayload.retrieveDate)! const { retrieveDate } = commandPayload - if (chargingStation.stationInfo?.firmwareStatus !== OCPP16FirmwareStatus.Installed) { + if ( + chargingStation.stationInfo?.firmwareStatus != null && + chargingStation.stationInfo.firmwareStatus !== OCPP16FirmwareStatus.Installed + ) { logger.warn( `${chargingStation.logPrefix()} ${moduleName}.handleRequestUpdateFirmware: Cannot simulate firmware update: firmware update is already in progress` )