From 3ba49ba9f96d06c09f19009dcbe9360eb172782a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 1 Feb 2021 01:18:13 +0100 Subject: [PATCH] Fix connectors status at reset. 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 | 1 + src/charging-station/ocpp/1.6/OCPP16ResponseService.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 863d5111..c532eea0 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -461,6 +461,7 @@ export default class ChargingStation { } if (this.isRegistered()) { await this.startMessageSequence(); + this.hasStopped && (this.hasStopped = false); if (this.hasSocketRestarted && this.isWebSocketOpen()) { if (!Utils.isEmptyArray(this.messageQueue)) { this.messageQueue.forEach((message, index) => { diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index a17c2e92..31802460 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -24,7 +24,6 @@ export default class OCPP16ResponseService extends OCPPResponseService { this.chargingStation.heartbeatSetInterval ? this.chargingStation.restartHeartbeat() : this.chargingStation.startHeartbeat(); this.chargingStation.addConfigurationKey(OCPP16StandardParametersKey.HeartBeatInterval, payload.interval.toString()); this.chargingStation.addConfigurationKey(OCPP16StandardParametersKey.HeartbeatInterval, payload.interval.toString(), false, false); - this.chargingStation.hasStopped && (this.chargingStation.hasStopped = false); } else if (payload.status === OCPP16RegistrationStatus.PENDING) { logger.info(this.chargingStation.logPrefix() + ' Charging station in pending state on the central server'); } else { -- 2.34.1