From 43bb4cd9ccb69bbf6b22fc6d8b58c79792a1d865 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 13 Mar 2022 22:08:46 +0100 Subject: [PATCH] Add chargePointSerialNumberPrefix support to CS template MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 3 ++- src/charging-station/ChargingStation.ts | 3 +++ src/types/ChargingStationInfo.ts | 1 + src/types/ChargingStationTemplate.ts | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7afb56f5..93245715 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,8 @@ But the modifications to test have to be done to the files in the build result d | fixedName | true/false | false | boolean | use the baseName as the charging stations unique name | | chargePointModel | | '' | string | charging stations model | | chargePointVendor | | '' | string | charging stations vendor | -| chargeBoxSerialNumberPrefix | | '' | string | charging stations serial number prefix | +| chargePointSerialNumberPrefix | | '' | string | charge point serial number prefix | +| chargeBoxSerialNumberPrefix | | '' | string | charge box serial number prefix (deprecated in OCPP 1.6) | | firmwareVersion | | '' | string | charging stations firmware version | | power | | | float \| float[] | charging stations maximum power value(s) | | powerSharedByConnectors | true/false | false | boolean | charging stations power shared by its connectors | diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 90b788a6..d9840987 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -834,6 +834,9 @@ export default class ChargingStation { ...(!Utils.isUndefined(this.stationInfo.chargeBoxSerialNumberPrefix) && { chargeBoxSerialNumber: this.stationInfo.chargeBoxSerialNumberPrefix, }), + ...(!Utils.isUndefined(this.stationInfo.chargePointSerialNumberPrefix) && { + chargePointSerialNumber: this.stationInfo.chargePointSerialNumberPrefix, + }), ...(!Utils.isUndefined(this.stationInfo.firmwareVersion) && { firmwareVersion: this.stationInfo.firmwareVersion, }), diff --git a/src/types/ChargingStationInfo.ts b/src/types/ChargingStationInfo.ts index 732bf00a..28895067 100644 --- a/src/types/ChargingStationInfo.ts +++ b/src/types/ChargingStationInfo.ts @@ -3,6 +3,7 @@ import ChargingStationTemplate from './ChargingStationTemplate'; export default interface ChargingStationInfo extends ChargingStationTemplate { chargingStationId?: string; chargeBoxSerialNumber?: string; + chargePointSerialNumber?: string; maxPower?: number; // Always in Watt powerDivider?: number; } diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index ee7df49a..d61ce81f 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -51,6 +51,7 @@ export default interface ChargingStationTemplate { fixedName?: boolean; chargePointModel: string; chargePointVendor: string; + chargePointSerialNumberPrefix?: string; chargeBoxSerialNumberPrefix?: string; firmwareVersion?: string; iccid?: string; -- 2.34.1