From: Jérôme Benoit Date: Mon, 31 Jul 2023 21:08:21 +0000 (+0200) Subject: fix: ensure all charging station changes are pushed at start transaction X-Git-Tag: v1.2.20~53 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4294bc6b158a69b6132b07bffca9d371ac93a64a;p=e-mobility-charging-stations-simulator.git fix: ensure all charging station changes are pushed at start transaction error Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index a2cfc531..a1fa0e43 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -728,7 +728,6 @@ export class OCPP16ResponseService extends OCPPResponseService { ): Promise { resetConnectorStatus(chargingStation.getConnectorStatus(connectorId)!); chargingStation.stopMeterValues(connectorId); - parentPort?.postMessage(buildUpdatedMessage(chargingStation)); if ( chargingStation.getConnectorStatus(connectorId)?.status !== OCPP16ChargePointStatus.Available ) { @@ -738,6 +737,7 @@ export class OCPP16ResponseService extends OCPPResponseService { OCPP16ChargePointStatus.Available, ); } + parentPort?.postMessage(buildUpdatedMessage(chargingStation)); } private async handleResponseStopTransaction(