Ensure the boot notification response is updated at boot notification
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 18:31:03 +0000 (19:31 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 18:31:03 +0000 (19:31 +0100)
message trigger

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts

index bd3557717e273e7fa75acd65a0c562452cb8ec53..09cfa74f42e4d13d13245981b55e7a80d31d4921 100644 (file)
@@ -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<string>;
index 6e66807df9409c1c331354b8939d62f650bc1ce5..38907105c4884f7d81b6d4657a562fa41f6eef44 100644 (file)
@@ -919,6 +919,9 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer
                 },
                 { skipBufferingOnError: true, triggerMessage: true }
               )
+              .then((value) => {
+                this.chargingStation.bootNotificationResponse = value;
+              })
               .catch(() => {
                 /* This is intentional */
               });