Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
this._bootNotificationResponse = await this.sendBootNotification();
if (!this._isRegistered()) {
registrationRetryCount++;
- await Utils.sleep(this._bootNotificationResponse.interval * 1000);
+ await Utils.sleep(this._bootNotificationResponse?.interval ? this._bootNotificationResponse.interval * 1000 : Constants.OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL);
}
} while (!this._isRegistered() && (registrationRetryCount <= this._getRegistrationMaxRetries() || this._getRegistrationMaxRetries() === -1));
}
static readonly OCPP_VERSION_16 = '1.6';
static readonly OCPP_VERSION_20 = '2.0';
+ static readonly OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL = 60000; // Ms
static readonly OCPP_ERROR_TIMEOUT = 60000; // 60 sec
static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms