mooved populate templates to try
MODIFY
src/start.ts
src/start.ts
import CentralSystemConfiguration, { CentralSystemImplementation } from './types/configuration/CentralSystemConfiguration';
+import { ChargingStationTemplate, ConnectorType, CurrentType } from './types/ChargingStation';
import { ServerAction, ServerType } from './types/Server';
import AsyncTaskConfiguration from './types/configuration/AsyncTaskConfiguration';
import AsyncTaskManager from './async-task/AsyncTaskManager';
import CentralSystemRestServiceConfiguration from './types/configuration/CentralSystemRestServiceConfiguration';
+import { ChargingRateUnitType } from './types/ChargingProfile';
import ChargingStationConfiguration from './types/configuration/ChargingStationConfiguration';
+import ChargingStationTemplateStorage from './storage/mongodb/ChargingStationTemplateStorage';
import Configuration from './utils/Configuration';
import Constants from './utils/Constants';
-import ContextBuilder from '../test/api/context/ContextBuilder';
import I18nManager from './utils/I18nManager';
import JsonOCPPServer from './server/ocpp/json/JsonOCPPServer';
import LocalCarCatalogBootstrap from './bootstrap/LocalCarCatalogBootstrap';
@@ -173,7 +175,7 @@ export default class Bootstrap {
// -------------------------------------------------------------------------
startTimeMillis = await this.logAndGetStartTimeMillis('Charging Station templates is being updated...');
// Load and Save the Charging Station templates
- await ContextBuilder.populateTemplates();
+ await this.populateTemplates();
await this.logDuration(startTimeMillis, 'Charging Station templates have been updated successfully');
// -------------------------------------------------------------------------
// Import Local Car Catalogs
@@ -322,6 +324,396 @@ export default class Bootstrap {
}
return serverTypes;
}
+
+ private static async populateTemplates(): Promise<void> {
+ let created = 0;
+ // Check if there is existing templates
+ const existingTemplates = await global.database.getCollection<any>(Constants.DEFAULT_TENANT_ID, 'chargingstationtemplates').findOne({});
+ if (existingTemplates) {
+ return;
+ }
+ try {
+ let chargingStationTemplates: ChargingStationTemplate[] = [
+ // Template Schneider~EV2S22P44|EVC1S22P4E4E
+ {
+ id: null,
+ template: {
+ chargePointVendor: "Schneider Electric",
+ extraFilters: {
+ chargePointModel: "MONOBLOCK|City \\(On Street\\)",
+ chargeBoxSerialNumber: "EV\\.2S22P44|EVC1S22P4E4E"
+ },
+ technical: {
+ maximumPower: 44160,
+ voltage: 230,
+ powerLimitUnit: ChargingRateUnitType.AMPERE,
+ chargePoints: [
+ {
+ chargePointID: 1,
+ currentType: CurrentType.AC,
+ amperage: 192,
+ numberOfConnectedPhase: 3,
+ cannotChargeInParallel: false,
+ sharePowerToAllConnectors: false,
+ excludeFromPowerLimitation: false,
+ ocppParamForPowerLimitation: "maxintensitysocket",
+ power: 44160,
+ voltage: null,
+ efficiency: null,
+ connectorIDs: [
+ 1,
+ 2
+ ]
+ }
+ ],
+ connectors: [
+ {
+ connectorId: 1,
+ type: ConnectorType.TYPE_2,
+ power: 22080,
+ amperage: 96,
+ chargePointID: 1
+ },
+ {
+ connectorId: 2,
+ type: ConnectorType.TYPE_2,
+ power: 22080,
+ amperage: 96,
+ chargePointID: 1
+ }
+ ]
+ },
+ capabilities: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ capabilities: {
+ supportStaticLimitation: true,
+ supportChargingProfiles: true,
+ supportRemoteStartStopTransaction: true,
+ supportUnlockConnector: true,
+ supportReservation: false,
+ supportCreditCard: false,
+ supportRFIDCard: false
+ }
+ }
+ ],
+ ocppStandardParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "AllowOfflineTxForUnknownId": "true",
+ "AuthorizationCacheEnabled": "false",
+ "StopTransactionOnInvalidId": "true"
+ }
+ }
+ ],
+ ocppVendorParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.2\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "authenticationmanager": "2",
+ "ocppconnecttimeout": "60",
+ "clockaligneddatainterval": "0",
+ "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
+ "metervaluesampleinterval": "60",
+ "emsetting": "3",
+ "enableevdetection": "true",
+ "useautotimemanagment": "true",
+ "timeservername": "pool.ntp.org",
+ "monophasedloadsheddingfloorvalue": "6",
+ "triphasedloadsheddingfloorvalue": "6"
+ }
+ },
+ {
+ supportedFirmwareVersions: [
+ "3\\.[3-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "authenticationmanager": "2",
+ "ocppconnecttimeout": "60",
+ "clockaligneddatainterval": "0",
+ "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
+ "metervaluesampleinterval": "60",
+ "emsetting": "3",
+ "enableevdetection": "true",
+ "useautotimemanagment": "true",
+ "timeservername": "pool.ntp.org",
+ "websocketpinginterval": "30",
+ "monophasedloadsheddingfloorvalue": "6",
+ "triphasedloadsheddingfloorvalue": "6"
+ }
+ }
+ ]
+ }
+ },
+ // Template Schneider~EV2S7P44|EVC1S7P4E4E
+ {
+ id: null,
+ template: {
+ chargePointVendor: "Schneider Electric",
+ extraFilters: {
+ chargePointModel: "MONOBLOCK|City \\(On Street\\)",
+ chargeBoxSerialNumber: "EV\\.2S7P44|EVC1S7P4E4E"
+ },
+ technical: {
+ maximumPower: 14720,
+ voltage: 230,
+ powerLimitUnit: ChargingRateUnitType.AMPERE,
+ chargePoints: [
+ {
+ chargePointID: 1,
+ currentType: CurrentType.AC,
+ amperage: 64,
+ numberOfConnectedPhase: 1,
+ cannotChargeInParallel: false,
+ sharePowerToAllConnectors: false,
+ excludeFromPowerLimitation: false,
+ ocppParamForPowerLimitation: "maxintensitysocket",
+ power: 14720,
+ voltage: null,
+ efficiency: null,
+ connectorIDs: [
+ 1,
+ 2
+ ]
+ }
+ ],
+ connectors: [
+ {
+ connectorId: 1,
+ type: ConnectorType.TYPE_2,
+ power: 7360,
+ amperage: 32,
+ chargePointID: 1
+ },
+ {
+ connectorId: 2,
+ type: ConnectorType.TYPE_2,
+ power: 7360,
+ amperage: 32,
+ chargePointID: 1
+ }
+ ]
+ },
+ capabilities: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ capabilities: {
+ supportStaticLimitation: true,
+ supportChargingProfiles: true,
+ supportRemoteStartStopTransaction: true,
+ supportUnlockConnector: true,
+ supportReservation: false,
+ supportCreditCard: false,
+ supportRFIDCard: false
+ }
+ }
+ ],
+ ocppStandardParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "AllowOfflineTxForUnknownId": "true",
+ "AuthorizationCacheEnabled": "false",
+ "StopTransactionOnInvalidId": "true"
+ }
+ }
+ ],
+ ocppVendorParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.2\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "authenticationmanager": "2",
+ "ocppconnecttimeout": "60",
+ "clockaligneddatainterval": "0",
+ "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
+ "metervaluesampleinterval": "60",
+ "emsetting": "3",
+ "enableevdetection": "true",
+ "useautotimemanagment": "true",
+ "timeservername": "pool.ntp.org",
+ "monophasedloadsheddingfloorvalue": "6",
+ "triphasedloadsheddingfloorvalue": "6"
+ }
+ },
+ {
+ supportedFirmwareVersions: [
+ "3\\.[3-4]\\.0\\..*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "authenticationmanager": "2",
+ "ocppconnecttimeout": "60",
+ "clockaligneddatainterval": "0",
+ "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
+ "metervaluesampleinterval": "60",
+ "emsetting": "3",
+ "enableevdetection": "true",
+ "useautotimemanagment": "true",
+ "timeservername": "pool.ntp.org",
+ "websocketpinginterval": "30",
+ "monophasedloadsheddingfloorvalue": "6",
+ "triphasedloadsheddingfloorvalue": "6"
+ }
+ }
+ ]
+ }
+ },
+ // Template Delta~10616
+ {
+ id: null,
+ template: {
+ chargePointVendor: "DELTA",
+ extraFilters: {
+ chargePointModel: "10616"
+ },
+ technical: {
+ maximumPower: 150000,
+ voltage: 230,
+ powerLimitUnit: ChargingRateUnitType.WATT,
+ chargePoints: [
+ {
+ chargePointID: 1,
+ currentType: CurrentType.DC,
+ amperage: 654,
+ numberOfConnectedPhase: 3,
+ cannotChargeInParallel: false,
+ sharePowerToAllConnectors: true,
+ excludeFromPowerLimitation: false,
+ ocppParamForPowerLimitation: "Device/GridCurrent",
+ power: 150000,
+ efficiency: 95,
+ voltage: null, // mandatory but never provided in the json templates
+ connectorIDs: [
+ 1,
+ 2
+ ]
+ }
+ ],
+ connectors: [
+ {
+ connectorId: 1,
+ type: ConnectorType.COMBO_CCS,
+ power: 150000,
+ chargePointID: 1
+ },
+ {
+ connectorId: 2,
+ type: ConnectorType.COMBO_CCS,
+ power: 150000,
+ chargePointID: 1
+ }
+ ]
+ },
+ capabilities: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-3]\\..*",
+ "3\\.4.*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ capabilities: {
+ supportStaticLimitation: true,
+ supportChargingProfiles: true,
+ supportRemoteStartStopTransaction: true,
+ supportUnlockConnector: true,
+ supportReservation: true,
+ supportCreditCard: false,
+ supportRFIDCard: true
+ }
+ }
+ ],
+ ocppStandardParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-3]\\..*",
+ "3\\.4.*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "AuthorizationCacheEnabled": "False",
+ "AuthorizeRemoteTxRequests": "True",
+ "ClockAlignedDataInterval": "0",
+ "ConnectionTimeOut": "60",
+ "LocalPreAuthorize": "True",
+ "LocalAuthorizeOffline": "True",
+ "StopTransactionOnInvalidId": "True",
+ "MeterValuesAlignedData": "0",
+ "MeterValueSampleInterval": "60",
+ "MeterValuesSampledData": "SoC,Energy.Active.Import.Register,Power.Active.Import,Current.Import,Voltage",
+ "StopTransactionOnEVSideDisconnect": "True",
+ "UnlockConnectorOnEVSideDisconnect": "True",
+ "WebSocketPingInterval": "30",
+ }
+ }
+ ],
+ ocppVendorParameters: [
+ {
+ supportedFirmwareVersions: [
+ "3\\.[2-3]\\..*",
+ "3\\.4.*"
+ ],
+ supportedOcppVersions: [
+ "1.6"
+ ],
+ parameters: {
+ "OCPP/idTagConversion": "HexZerofill4or7byte"
+ }
+ }
+ ]
+ }
+ }
+ ];
+ for (const template of chargingStationTemplates) {
+ template.createdOn = new Date();
+ await ChargingStationTemplateStorage.saveChargingStationTemplate(template);
+ created++;
+ };
+ } catch (error) {
+ console.log(`>>>> Error while importing the charging station templates : ${error.message as string}`);
+ }
+ // Log in the default tenant
+ console.log(`>>>> ${created} charging station template(s) created in the default tenant`);
+ }
}
// Start

MODIFY
test/api/context/ContextBuilder.ts
test/api/context/ContextBuilder.ts
@@ -428,394 +428,4 @@ export default class ContextBuilder {
}
return newTenantContext;
}
-
- public static async populateTemplates(): Promise<void> {
- let created = 0;
- // Check if there is existing templates
- const existingTemplates = await global.database.getCollection<any>(Constants.DEFAULT_TENANT_ID, 'chargingstationtemplates').findOne({});
- if (existingTemplates) {
- return;
- }
- try {
- let chargingStationTemplates: ChargingStationTemplate[] = [
- // Template Schneider~EV2S22P44|EVC1S22P4E4E
- {
- id: null,
- template: {
- chargePointVendor: "Schneider Electric",
- extraFilters: {
- chargePointModel: "MONOBLOCK|City \\(On Street\\)",
- chargeBoxSerialNumber: "EV\\.2S22P44|EVC1S22P4E4E"
- },
- technical: {
- maximumPower: 44160,
- voltage: 230,
- powerLimitUnit: ChargingRateUnitType.AMPERE,
- chargePoints: [
- {
- chargePointID: 1,
- currentType: CurrentType.AC,
- amperage: 192,
- numberOfConnectedPhase: 3,
- cannotChargeInParallel: false,
- sharePowerToAllConnectors: false,
- excludeFromPowerLimitation: false,
- ocppParamForPowerLimitation: "maxintensitysocket",
- power: 44160,
- voltage: null,
- efficiency: null,
- connectorIDs: [
- 1,
- 2
- ]
- }
- ],
- connectors: [
- {
- connectorId: 1,
- type: ConnectorType.TYPE_2,
- power: 22080,
- amperage: 96,
- chargePointID: 1
- },
- {
- connectorId: 2,
- type: ConnectorType.TYPE_2,
- power: 22080,
- amperage: 96,
- chargePointID: 1
- }
- ]
- },
- capabilities: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- capabilities: {
- supportStaticLimitation: true,
- supportChargingProfiles: true,
- supportRemoteStartStopTransaction: true,
- supportUnlockConnector: true,
- supportReservation: false,
- supportCreditCard: false,
- supportRFIDCard: false
- }
- }
- ],
- ocppStandardParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "AllowOfflineTxForUnknownId": "true",
- "AuthorizationCacheEnabled": "false",
- "StopTransactionOnInvalidId": "true"
- }
- }
- ],
- ocppVendorParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.2\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "authenticationmanager": "2",
- "ocppconnecttimeout": "60",
- "clockaligneddatainterval": "0",
- "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
- "metervaluesampleinterval": "60",
- "emsetting": "3",
- "enableevdetection": "true",
- "useautotimemanagment": "true",
- "timeservername": "pool.ntp.org",
- "monophasedloadsheddingfloorvalue": "6",
- "triphasedloadsheddingfloorvalue": "6"
- }
- },
- {
- supportedFirmwareVersions: [
- "3\\.[3-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "authenticationmanager": "2",
- "ocppconnecttimeout": "60",
- "clockaligneddatainterval": "0",
- "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
- "metervaluesampleinterval": "60",
- "emsetting": "3",
- "enableevdetection": "true",
- "useautotimemanagment": "true",
- "timeservername": "pool.ntp.org",
- "websocketpinginterval": "30",
- "monophasedloadsheddingfloorvalue": "6",
- "triphasedloadsheddingfloorvalue": "6"
- }
- }
- ]
- }
- },
- // Template Schneider~EV2S7P44|EVC1S7P4E4E
- {
- id: null,
- template: {
- chargePointVendor: "Schneider Electric",
- extraFilters: {
- chargePointModel: "MONOBLOCK|City \\(On Street\\)",
- chargeBoxSerialNumber: "EV\\.2S7P44|EVC1S7P4E4E"
- },
- technical: {
- maximumPower: 14720,
- voltage: 230,
- powerLimitUnit: ChargingRateUnitType.AMPERE,
- chargePoints: [
- {
- chargePointID: 1,
- currentType: CurrentType.AC,
- amperage: 64,
- numberOfConnectedPhase: 1,
- cannotChargeInParallel: false,
- sharePowerToAllConnectors: false,
- excludeFromPowerLimitation: false,
- ocppParamForPowerLimitation: "maxintensitysocket",
- power: 14720,
- voltage: null,
- efficiency: null,
- connectorIDs: [
- 1,
- 2
- ]
- }
- ],
- connectors: [
- {
- connectorId: 1,
- type: ConnectorType.TYPE_2,
- power: 7360,
- amperage: 32,
- chargePointID: 1
- },
- {
- connectorId: 2,
- type: ConnectorType.TYPE_2,
- power: 7360,
- amperage: 32,
- chargePointID: 1
- }
- ]
- },
- capabilities: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- capabilities: {
- supportStaticLimitation: true,
- supportChargingProfiles: true,
- supportRemoteStartStopTransaction: true,
- supportUnlockConnector: true,
- supportReservation: false,
- supportCreditCard: false,
- supportRFIDCard: false
- }
- }
- ],
- ocppStandardParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "AllowOfflineTxForUnknownId": "true",
- "AuthorizationCacheEnabled": "false",
- "StopTransactionOnInvalidId": "true"
- }
- }
- ],
- ocppVendorParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.2\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "authenticationmanager": "2",
- "ocppconnecttimeout": "60",
- "clockaligneddatainterval": "0",
- "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
- "metervaluesampleinterval": "60",
- "emsetting": "3",
- "enableevdetection": "true",
- "useautotimemanagment": "true",
- "timeservername": "pool.ntp.org",
- "monophasedloadsheddingfloorvalue": "6",
- "triphasedloadsheddingfloorvalue": "6"
- }
- },
- {
- supportedFirmwareVersions: [
- "3\\.[3-4]\\.0\\..*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "authenticationmanager": "2",
- "ocppconnecttimeout": "60",
- "clockaligneddatainterval": "0",
- "metervaluessampleddata": "Energy.Active.Import.Register,Current.Import,Current.Import.L1,Current.Import.L2,Current.Import.L3,Voltage,Voltage.L1,Voltage.L2,Voltage.L3",
- "metervaluesampleinterval": "60",
- "emsetting": "3",
- "enableevdetection": "true",
- "useautotimemanagment": "true",
- "timeservername": "pool.ntp.org",
- "websocketpinginterval": "30",
- "monophasedloadsheddingfloorvalue": "6",
- "triphasedloadsheddingfloorvalue": "6"
- }
- }
- ]
- }
- },
- // Template Delta~10616
- {
- id: null,
- template: {
- chargePointVendor: "DELTA",
- extraFilters: {
- chargePointModel: "10616"
- },
- technical: {
- maximumPower: 150000,
- voltage: 230,
- powerLimitUnit: ChargingRateUnitType.WATT,
- chargePoints: [
- {
- chargePointID: 1,
- currentType: CurrentType.DC,
- amperage: 654,
- numberOfConnectedPhase: 3,
- cannotChargeInParallel: false,
- sharePowerToAllConnectors: true,
- excludeFromPowerLimitation: false,
- ocppParamForPowerLimitation: "Device/GridCurrent",
- power: 150000,
- efficiency: 95,
- voltage: null, // mandatory but never provided in the json templates
- connectorIDs: [
- 1,
- 2
- ]
- }
- ],
- connectors: [
- {
- connectorId: 1,
- type: ConnectorType.COMBO_CCS,
- power: 150000,
- chargePointID: 1
- },
- {
- connectorId: 2,
- type: ConnectorType.COMBO_CCS,
- power: 150000,
- chargePointID: 1
- }
- ]
- },
- capabilities: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-3]\\..*",
- "3\\.4.*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- capabilities: {
- supportStaticLimitation: true,
- supportChargingProfiles: true,
- supportRemoteStartStopTransaction: true,
- supportUnlockConnector: true,
- supportReservation: true,
- supportCreditCard: false,
- supportRFIDCard: true
- }
- }
- ],
- ocppStandardParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-3]\\..*",
- "3\\.4.*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "AuthorizationCacheEnabled": "False",
- "AuthorizeRemoteTxRequests": "True",
- "ClockAlignedDataInterval": "0",
- "ConnectionTimeOut": "60",
- "LocalPreAuthorize": "True",
- "LocalAuthorizeOffline": "True",
- "StopTransactionOnInvalidId": "True",
- "MeterValuesAlignedData": "0",
- "MeterValueSampleInterval": "60",
- "MeterValuesSampledData": "SoC,Energy.Active.Import.Register,Power.Active.Import,Current.Import,Voltage",
- "StopTransactionOnEVSideDisconnect": "True",
- "UnlockConnectorOnEVSideDisconnect": "True",
- "WebSocketPingInterval": "30",
- }
- }
- ],
- ocppVendorParameters: [
- {
- supportedFirmwareVersions: [
- "3\\.[2-3]\\..*",
- "3\\.4.*"
- ],
- supportedOcppVersions: [
- "1.6"
- ],
- parameters: {
- "OCPP/idTagConversion": "HexZerofill4or7byte"
- }
- }
- ]
- }
- }
- ];
- for (const template of chargingStationTemplates) {
- template.createdOn = new Date();
- await ChargingStationTemplateStorage.saveChargingStationTemplate(template);
- created++;
- };
- } catch (error) {
- console.log(`>>>> Error while importing the charging station templates : ${error.message as string}`);
- }
- // Log in the default tenant
- console.log(`>>>> ${created} charging station template(s) created in the default tenant`);
- }
}

mooved populate templates to try