From ae711c83a337c84226f8b7533f054dd74359a759 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 13 Mar 2022 19:31:03 +0100 Subject: [PATCH] Ensure the boot notification response is updated at boot notification message trigger MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 2 +- src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index bd355771..09cfa74f 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -80,10 +80,10 @@ export default class ChargingStation { public performanceStatistics!: PerformanceStatistics; public heartbeatSetInterval!: NodeJS.Timeout; public ocppRequestService!: OCPPRequestService; + public bootNotificationResponse!: BootNotificationResponse | null; private readonly index: number; private configurationFile!: string; private bootNotificationRequest!: BootNotificationRequest; - private bootNotificationResponse!: BootNotificationResponse | null; private connectorsConfigurationHash!: string; private ocppIncomingRequestService!: OCPPIncomingRequestService; private readonly messageBuffer: Set; diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 6e66807d..38907105 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -919,6 +919,9 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer }, { skipBufferingOnError: true, triggerMessage: true } ) + .then((value) => { + this.chargingStation.bootNotificationResponse = value; + }) .catch(() => { /* This is intentional */ }); -- 2.34.1