From ab11404a829ad48ba10c88bd701f47b1c96f9c41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 10 Nov 2023 19:23:47 +0100 Subject: [PATCH] feat: add template tunable to stop transaction at CS stop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 1 + src/charging-station/ChargingStation.ts | 2 +- src/types/ChargingStationTemplate.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6c1d9de..5c800ed2 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ But the modifications to test have to be done to the files in the build target d | outOfOrderEndMeterValues | true/false | false | boolean | send Transaction.End MeterValues out of order. Need to relax OCPP specifications strict compliance ('ocppStrictCompliance' parameter) | | meteringPerTransaction | true/false | true | boolean | enable metering history on a per transaction basis | | transactionDataMeterValues | true/false | false | boolean | enable transaction data MeterValues at stop transaction | +| stopTransactionsOnStopped | true/false | true | boolean | enable stop transactions on charging station stop | | mainVoltageMeterValues | true/false | true | boolean | include charging stations main voltage MeterValues on three phased charging stations | | phaseLineToLineVoltageMeterValues | true/false | false | boolean | include charging stations line to line voltage MeterValues on three phased charging stations | | customValueLimitationMeterValues | true/false | true | boolean | enable limitation on custom fluctuated value in MeterValues | diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index e7b71b05..033152d6 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -2183,7 +2183,7 @@ export class ChargingStation extends EventEmitter { private async stopMessageSequence( reason?: StopTransactionReason, - stopTransactions = true, + stopTransactions = this.stationInfo?.stopTransactionsOnStopped ?? true, ): Promise { // Stop WebSocket ping this.stopWebSocketPing(); diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index 68c20597..5fd77851 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -119,6 +119,7 @@ export interface ChargingStationTemplate { outOfOrderEndMeterValues?: boolean; meteringPerTransaction?: boolean; transactionDataMeterValues?: boolean; + stopTransactionsOnStopped?: boolean; mainVoltageMeterValues?: boolean; phaseLineToLineVoltageMeterValues?: boolean; customValueLimitationMeterValues?: boolean; -- 2.34.1