Complete AuthorizeRemoteTxRequests support in remote start transaction
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index feffa05da837ce929da0dce630a6a9f5601f2c87..10806bd295bf93134f8ec3734c597378b2788fba 100644 (file)
@@ -503,13 +503,13 @@ export default class ChargingStation {
         break;
     }
     // OCPP parameters
+    if (!this.getConfigurationKey(StandardParametersKey.SupportedFeatureProfiles)) {
+      this.addConfigurationKey(StandardParametersKey.SupportedFeatureProfiles, `${SupportedFeatureProfiles.Core},${SupportedFeatureProfiles.Local_Auth_List_Management},${SupportedFeatureProfiles.Smart_Charging}`);
+    }
     this.addConfigurationKey(StandardParametersKey.NumberOfConnectors, this.getNumberOfConnectors().toString(), true);
     if (!this.getConfigurationKey(StandardParametersKey.MeterValuesSampledData)) {
       this.addConfigurationKey(StandardParametersKey.MeterValuesSampledData, MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER);
     }
-    if (!this.getConfigurationKey(StandardParametersKey.SupportedFeatureProfiles)) {
-      this.addConfigurationKey(StandardParametersKey.SupportedFeatureProfiles, SupportedFeatureProfiles.Core);
-    }
     if (!this.getConfigurationKey(StandardParametersKey.ConnectorPhaseRotation)) {
       const connectorPhaseRotation = [];
       for (const connector in this.connectors) {
@@ -527,6 +527,13 @@ export default class ChargingStation {
       }
       this.addConfigurationKey(StandardParametersKey.ConnectorPhaseRotation, connectorPhaseRotation.toString());
     }
+    if (!this.getConfigurationKey(StandardParametersKey.AuthorizeRemoteTxRequests)) {
+      this.addConfigurationKey(StandardParametersKey.AuthorizeRemoteTxRequests, 'true');
+    }
+    if (!this.getConfigurationKey(StandardParametersKey.LocalAuthListEnabled)
+        && this.getConfigurationKey(StandardParametersKey.SupportedFeatureProfiles).value.includes(SupportedFeatureProfiles.Local_Auth_List_Management)) {
+      this.addConfigurationKey(StandardParametersKey.LocalAuthListEnabled, 'false');
+    }
     this.stationInfo.powerDivider = this.getPowerDivider();
     if (this.getEnableStatistics()) {
       this.performanceStatistics = new PerformanceStatistics(this.stationInfo.chargingStationId);