added site area with dc charger
MODIFY
test/api/SmartChargingTest.ts
test/api/SmartChargingTest.ts
@@ -106,7 +106,7 @@ describe('Smart Charging Service', function() {
this.pending = testData.pending;
this.timeout(1000000);
- describe('With component SmartCharging (tenant utsmartcharg)', () => {
+ describe('With component SmartCharging (tenant utsmartcharging)', () => {
before(async () => {
global.database = new MongoDBStorage(config.get('storage'));
await global.database.start();
@@ -155,6 +155,7 @@ describe('Smart Charging Service', function() {
testData.chargingStationContext = testData.siteAreaContext.getChargingStationContext(ContextDefinition.CHARGING_STATION_CONTEXTS.ASSIGNED_OCPP16);
testData.siteAreaContext.siteArea.voltage = 230;
testData.siteAreaContext.siteArea.numberOfPhases = 3;
+ // Console.log(testData.chargingStationContext);
});
after(async () => {
@@ -469,7 +470,6 @@ describe('Smart Charging Service', function() {
const transactionResponse = await testData.chargingStationContext.startTransaction(connectorId, tagId, meterStart, startDate);
await testData.chargingStationContext.setConnectorStatus(chargingStationConnector1Charging);
const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
- console.log(JSON.stringify(chargingProfiles, null, ' '));
expect(chargingProfiles).containSubset([{
'chargingStationID': 'cs-16-ut-site-withSmartChargingSinglePhased',
'connectorID': chargingStationConnector1Charging.connectorId,
@@ -538,7 +538,6 @@ describe('Smart Charging Service', function() {
const transactionResponse = await testData.chargingStationContext.startTransaction(connectorId, tagId, meterStart, startDate);
await testData.chargingStationContext.setConnectorStatus(chargingStationConnector2Charging);
const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
- console.log(JSON.stringify(chargingProfiles, null, ' '));
expect(chargingProfiles[0]).containSubset({
'chargingStationID': 'cs-16-ut-site-withSmartChargingSinglePhased',
'connectorID': 1,
@@ -671,7 +670,6 @@ describe('Smart Charging Service', function() {
it('Test for two cars charging with lower site area limit', async () => {
testData.siteAreaContext.siteArea.maximumPower = 10000;
const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
- console.log(JSON.stringify(chargingProfiles, null, ' '));
expect(chargingProfiles[0]).containSubset({
'chargingStationID': 'cs-16-ut-site-withSmartChargingSinglePhased',
'connectorID': 1,
@@ -683,7 +681,11 @@ describe('Smart Charging Service', function() {
'stackLevel': 2,
'chargingSchedule': {
'chargingRateUnit': 'A',
- 'chargingSchedulePeriod': [
+ 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ });
+ expect(chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
{
'startPeriod': 0,
'limit': 0
@@ -696,11 +698,7 @@ describe('Smart Charging Service', function() {
'startPeriod': 1800,
'limit': 0
}
- ],
- 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
- }
- }
- });
+ ]);
expect(chargingProfiles[1]).containSubset({
'chargingStationID': 'cs-16-ut-site-withSmartChargingSinglePhased',
'connectorID': 2,
@@ -760,5 +758,215 @@ describe('Smart Charging Service', function() {
]);
});
});
+
+ describe('Test for DC site area', () => {
+ before(async () => {
+ testData.siteContext = testData.tenantContext.getSiteContext(ContextDefinition.SITE_CONTEXTS.SITE_BASIC);
+ testData.siteAreaContext = testData.siteContext.getSiteAreaContext(ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_DC);
+ testData.chargingStationContext = testData.siteAreaContext.getChargingStationContext(ContextDefinition.CHARGING_STATION_CONTEXTS.ASSIGNED_OCPP16);
+ testData.siteAreaContext.siteArea.voltage = 230;
+ testData.siteAreaContext.siteArea.numberOfPhases = 3;
+ });
+
+ after(async () => {
+ await testData.chargingStationContext.setConnectorStatus(chargingStationConnector1Available);
+ await testData.chargingStationContext.setConnectorStatus(chargingStationConnector2Available);
+ });
+
+
+ it('Test for one car charging', async () => {
+ const connectorId = 1;
+ const tagId = testData.userContext.tags[0].id;
+ const meterStart = 180;
+ const startDate = new Date;
+ const transactionResponse = await testData.chargingStationContext.startTransaction(connectorId, tagId, meterStart, startDate);
+ await testData.chargingStationContext.setConnectorStatus(chargingStationConnector1Charging);
+ const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
+ expect(chargingProfiles).containSubset([{
+ 'chargingStationID': 'cs-16-ut-site-withSmartChargingDC',
+ 'connectorID': chargingStationConnector1Charging.connectorId,
+ 'chargePointID': 1,
+ 'profile': {
+ 'transactionId': transactionResponse.transactionId,
+ 'chargingProfileId': 1,
+ 'chargingProfileKind': 'Absolute',
+ 'chargingProfilePurpose': 'TxProfile',
+ 'stackLevel': 2,
+ 'chargingSchedule': {
+ 'chargingRateUnit': 'A',
+ 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ }]);
+ expect(chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
+ {
+ 'startPeriod': 0,
+ 'limit': 654
+ },
+ {
+ 'startPeriod': 900,
+ 'limit': 654
+ },
+ {
+ 'startPeriod': 1800,
+ 'limit': 654
+ }
+ ]);
+ });
+
+ it('Test for two cars charging', async () => {
+ const connectorId = 2;
+ const tagId = testData.userContext.tags[0].id;
+ const meterStart = 180;
+ const startDate = new Date;
+ const transactionResponse = await testData.chargingStationContext.startTransaction(connectorId, tagId, meterStart, startDate);
+ await testData.chargingStationContext.setConnectorStatus(chargingStationConnector2Charging);
+ const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
+ expect(chargingProfiles[0]).containSubset({
+ 'chargingStationID': 'cs-16-ut-site-withSmartChargingDC',
+ 'connectorID': 1,
+ 'chargePointID': 1,
+ 'profile': {
+ 'chargingProfileId': 1,
+ 'chargingProfileKind': 'Absolute',
+ 'chargingProfilePurpose': 'TxProfile',
+ 'stackLevel': 2,
+ 'chargingSchedule': {
+ 'chargingRateUnit': 'A',
+ 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ });
+ expect(chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
+ {
+ 'startPeriod': 0,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 900,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 1800,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 2700,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 3600,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 4500,
+ 'limit': 327
+ },
+ ]);
+ expect(chargingProfiles[1]).containSubset({
+ 'chargingStationID': 'cs-16-ut-site-withSmartChargingDC',
+ 'connectorID': 2,
+ 'chargePointID': 1,
+ 'profile': {
+ 'chargingProfileId': 2,
+ 'chargingProfileKind': 'Absolute',
+ 'chargingProfilePurpose': 'TxProfile',
+ 'stackLevel': 2,
+ 'chargingSchedule': {
+ 'chargingRateUnit': 'A',
+ 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ });
+ expect(chargingProfiles[1].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
+ {
+ 'startPeriod': 0,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 900,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 1800,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 2700,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 3600,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 4500,
+ 'limit': 327
+ },
+ ]);
+ });
+ it('Test for two cars charging with lower site area limit', async () => {
+ testData.siteAreaContext.siteArea.maximumPower = 100000;
+ const chargingProfiles = await smartChargingIntegration.buildChargingProfiles(testData.siteAreaContext.siteArea);
+ expect(chargingProfiles[0]).containSubset({
+ 'chargingStationID': 'cs-16-ut-site-withSmartChargingDC',
+ 'connectorID': 1,
+ 'chargePointID': 1,
+ 'profile': {
+ 'chargingProfileId': 1,
+ 'chargingProfileKind': 'Absolute',
+ 'chargingProfilePurpose': 'TxProfile',
+ 'stackLevel': 2,
+ 'chargingSchedule': {
+ 'chargingRateUnit': 'A',
+ 'duration': chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ });
+ expect(chargingProfiles[0].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
+ {
+ 'startPeriod': 0,
+ 'limit': 107
+ },
+ {
+ 'startPeriod': 900,
+ 'limit': 107
+ },
+ {
+ 'startPeriod': 1800,
+ 'limit': 107
+ },
+ ]);
+ expect(chargingProfiles[1]).containSubset({
+ 'chargingStationID': 'cs-16-ut-site-withSmartChargingDC',
+ 'connectorID': 2,
+ 'chargePointID': 1,
+ 'profile': {
+ 'chargingProfileId': 2,
+ 'chargingProfileKind': 'Absolute',
+ 'chargingProfilePurpose': 'TxProfile',
+ 'stackLevel': 2,
+ 'chargingSchedule': {
+ 'chargingRateUnit': 'A',
+ 'duration': chargingProfiles[1].profile.chargingSchedule.chargingSchedulePeriod.length * 15 * 60
+ }
+ }
+ });
+ expect(chargingProfiles[1].profile.chargingSchedule.chargingSchedulePeriod).containSubset([
+ {
+ 'startPeriod': 0,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 900,
+ 'limit': 327
+ },
+ {
+ 'startPeriod': 1800,
+ 'limit': 327
+ }
+ ]);
+ });
+ });
});
});

MODIFY
test/api/context/ContextBuilder.ts
test/api/context/ContextBuilder.ts
@@ -4,6 +4,7 @@ import { SettingDB, SettingDBContent } from '../../../src/types/Setting';
import AssetStorage from '../../../src/storage/mongodb/AssetStorage';
import BillingContext from './BillingContext';
import CentralServerService from '../client/CentralServerService';
+import ChargingStation from '../../types/ChargingStation';
import CompanyStorage from '../../../src/storage/mongodb/CompanyStorage';
import Constants from '../../../src/utils/Constants';
import Factory from '../../factories/Factory';
@@ -303,11 +304,25 @@ export default class ContextBuilder {
const newChargingStationContext = await newTenantContext.createSinglePhasedChargingStation(chargingStationDef.ocppVersion, chargingStationTemplate, null, siteAreaModel);
await siteAreaContext.addChargingStation(newChargingStationContext.getChargingStation());
} else if (siteAreaModel.smartCharging && siteAreaModel.numberOfPhases === 3) {
- const chargingStationTemplate = Factory.chargingStation.build();
+ let chargingStationTemplate: ChargingStation;
+ if (siteAreaModel.name === `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_DC}`) {
+ chargingStationTemplate = Factory.chargingStation.buildChargingStationDC();
chargingStationTemplate.id = chargingStationDef.baseName + '-' + siteAreaModel.name;
console.log(`${buildTenant.id} (${buildTenant.name}) - Charging Station '${chargingStationTemplate.id}'`);
- const newChargingStationContext = await newTenantContext.createChargingStation(chargingStationDef.ocppVersion, chargingStationTemplate, null, siteAreaModel);
+ const newChargingStationContext = await newTenantContext.createChargingStationDC(chargingStationDef.ocppVersion, chargingStationTemplate, null, siteAreaModel);
+ await siteAreaContext.addChargingStation(newChargingStationContext.getChargingStation());
+ } else if (siteAreaModel.name === `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_THREE_PHASED}`) {
+ chargingStationTemplate = Factory.chargingStation.build();
+ chargingStationTemplate.id = chargingStationDef.baseName + '-' + siteAreaModel.name;
+ console.log(`${buildTenant.id} (${buildTenant.name}) - Charging Station '${chargingStationTemplate.id}'`);
+ let newChargingStationContext = await newTenantContext.createChargingStation(chargingStationDef.ocppVersion, chargingStationTemplate, null, siteAreaModel);
+ await siteAreaContext.addChargingStation(newChargingStationContext.getChargingStation());
+ chargingStationTemplate = Factory.chargingStation.buildChargingStationSinglePhased();
+ chargingStationTemplate.id = chargingStationDef.baseName + '-' + siteAreaModel.name + '-' + 'singlePhased';
+ console.log(`${buildTenant.id} (${buildTenant.name}) - Charging Station '${chargingStationTemplate.id}'`);
+ newChargingStationContext = await newTenantContext.createSinglePhasedChargingStation(chargingStationDef.ocppVersion, chargingStationTemplate, null, siteAreaModel);
await siteAreaContext.addChargingStation(newChargingStationContext.getChargingStation());
+ }
} else {
const chargingStationTemplate = Factory.chargingStation.build();
chargingStationTemplate.id = chargingStationDef.baseName + '-' + siteAreaModel.name;

MODIFY
test/api/context/ContextDefinition.ts
test/api/context/ContextDefinition.ts
@@ -33,7 +33,7 @@ export default class ContextDefinition {
TENANT_BILLING: 'utbilling', // Only billing and pricing component is active
TENANT_ASSET: 'utasset', // Only asset component is active
TENANT_CAR: 'utcar', // Only car component is active
- TENANT_SMART_CHARGING: 'utsmartcharg' // Organization and Smart Charging components are active
+ TENANT_SMART_CHARGING: 'utsmartcharging' // Organization and Smart Charging components are active
};
static readonly SITE_CONTEXTS: any = {
@@ -49,6 +49,7 @@ export default class ContextDefinition {
WITHOUT_ACL: 'withoutACL', // ACL is inactive
WITH_SMART_CHARGING_THREE_PHASED: 'withSmartChargingThreePhased', // Smart Charging is active three phased
WITH_SMART_CHARGING_SINGLE_PHASED: 'withSmartChargingSinglePhased', // Smart Charging is active single phased
+ WITH_SMART_CHARGING_DC: 'withSmartChargingDC', // Smart Charging is active DC
};
static readonly CHARGING_STATION_CONTEXTS: any = {
@@ -581,6 +582,15 @@ export default class ContextDefinition {
maximumPower: 100000,
voltage: 230,
siteName: ContextDefinition.SITE_CONTEXTS.SITE_BASIC
+ },
+ { // With smart charging DC
+ id: '5ce249a2372f0b1c8caf5444',
+ name: `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_DC}`,
+ smartCharging: true,
+ numberOfPhases: 3,
+ maximumPower: 200000,
+ voltage: 230,
+ siteName: ContextDefinition.SITE_CONTEXTS.SITE_BASIC
}
];
@@ -599,8 +609,9 @@ export default class ContextDefinition {
`${ContextDefinition.SITE_CONTEXTS.SITE_WITH_AUTO_USER_ASSIGNMENT}-${ContextDefinition.SITE_AREA_CONTEXTS.WITHOUT_ACL}`,
`${ContextDefinition.SITE_CONTEXTS.SITE_WITH_OTHER_USER_STOP_AUTHORIZATION}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_ACL}`,
`${ContextDefinition.SITE_CONTEXTS.SITE_WITH_OTHER_USER_STOP_AUTHORIZATION}-${ContextDefinition.SITE_AREA_CONTEXTS.WITHOUT_ACL}`,
+ `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_THREE_PHASED}`,
`${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_SINGLE_PHASED}`,
- `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_THREE_PHASED}`]
+ `${ContextDefinition.SITE_CONTEXTS.SITE_BASIC}-${ContextDefinition.SITE_AREA_CONTEXTS.WITH_SMART_CHARGING_DC}`]
},
{
baseName: ContextDefinition.CHARGING_STATION_CONTEXTS.ASSIGNED_OCPP15, // Concatenated with siteAreaName

MODIFY
test/api/context/TenantContext.ts
test/api/context/TenantContext.ts
@@ -332,7 +332,7 @@ export default class TenantContext {
type: (connectorsDef && connectorsDef[i].type ? connectorsDef[i].type : 'U'),
power: (connectorsDef && connectorsDef[i].power ? connectorsDef[i].power : 7360),
numberOfConnectedPhase: (connectorsDef && connectorsDef[i].numberOfConnectedPhase ? connectorsDef[i].numberOfConnectedPhase : 1),
- amperage: (connectorsDef && connectorsDef[i].amperage ? connectorsDef[i].amperage : 32),
+ amperage: (connectorsDef && connectorsDef[i].amperage ? connectorsDef[i].amperage : 654),
};
}
for (const connector of createdChargingStation.connectors) {
@@ -383,6 +383,81 @@ export default class TenantContext {
return createdCS;
}
+ async createChargingStationDC(ocppVersion, chargingStation = Factory.chargingStation.build({
+ id: faker.random.alphaNumeric(12)
+ }), connectorsDef = null, siteArea = null) {
+ const ocppService = await this.getOCPPService(ocppVersion);
+ const response = await ocppService.executeBootNotification(chargingStation.id, chargingStation);
+ // Check
+ expect(response).to.not.be.null;
+ expect(response.status).to.eql('Accepted');
+ expect(response).to.have.property('currentTime');
+ let createdChargingStation = await this.getAdminCentralServerService().getEntityById(
+ this.getAdminCentralServerService().chargingStationApi, chargingStation);
+ expect(createdChargingStation.maximumPower).to.eql(150000);
+ expect(createdChargingStation.powerLimitUnit).to.eql('W');
+ for (let i = 0; i < (connectorsDef ? connectorsDef.length : 2); i++) {
+ createdChargingStation.connectors[i] = {
+ connectorId: i + 1,
+ status: (connectorsDef && connectorsDef[i].status ? connectorsDef[i].status : 'Available'),
+ errorCode: (connectorsDef && connectorsDef[i].errorCode ? connectorsDef[i].errorCode : 'NoError'),
+ timestamp: (connectorsDef && connectorsDef[i].timestamp ? connectorsDef[i].timestamp : new Date().toISOString()),
+ type: (connectorsDef && connectorsDef[i].type ? connectorsDef[i].type : 'CCS'),
+ power: (connectorsDef && connectorsDef[i].power ? connectorsDef[i].power : 150000),
+ numberOfConnectedPhase: (connectorsDef && connectorsDef[i].numberOfConnectedPhase ? connectorsDef[i].numberOfConnectedPhase : 3),
+ amperage: (connectorsDef && connectorsDef[i].amperage ? connectorsDef[i].amperage : 96),
+ };
+ }
+ for (const connector of createdChargingStation.connectors) {
+ await ocppService.executeStatusNotification(createdChargingStation.id, connector);
+ }
+ createdChargingStation = await this.getAdminCentralServerService().getEntityById(
+ this.getAdminCentralServerService().chargingStationApi, chargingStation);
+ // Charging Station
+ expect(createdChargingStation.voltage).to.eql(230);
+ // Connectors
+ expect(createdChargingStation.connectors.length).to.eql(2,
+ `Number of connector of charging station ${createdChargingStation.id} must be 2`);
+ expect(createdChargingStation.connectors[0].power).to.eql(150000,
+ `Connector ID 1 of charging station ${createdChargingStation.id} must have 150000 W`);
+ // Expect(createdChargingStation.connectors[0].amperage).to.eql(654,
+ // `Connector ID 1 of charging station ${createdChargingStation.id} must have 654 A`);
+ expect(createdChargingStation.connectors[0].type).to.eql('CCS',
+ `Connector ID 1 of charging station ${createdChargingStation.id} must have CCS connector`);
+ expect(createdChargingStation.connectors[1].power).to.eql(150000,
+ `Connector ID 2 of charging station ${createdChargingStation.id} must have 150000 W`);
+ // Expect(createdChargingStation.connectors[1].amperage).to.eql(654,
+ // `Connector ID 2 of charging station ${createdChargingStation.id} must have 654 A`);
+ expect(createdChargingStation.connectors[1].type).to.eql('CCS',
+ `Connector ID 2 of charging station ${createdChargingStation.id} must have CCS connector`);
+ // Charge Points
+ expect(createdChargingStation.chargePoints.length).to.eql(1,
+ `Number of charge point of charging station ${createdChargingStation.id} must be 1`);
+ expect(createdChargingStation.chargePoints[0].currentType).to.eql('DC');
+ expect(createdChargingStation.chargePoints[0].numberOfConnectedPhase).to.eql(3,
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} must have 3 phases`);
+ expect(createdChargingStation.chargePoints[0].cannotChargeInParallel).to.eql(false,
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} cannot charge in parallel`);
+ expect(createdChargingStation.chargePoints[0].sharePowerToAllConnectors).to.eql(true,
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} cannot share power`);
+ expect(createdChargingStation.chargePoints[0].excludeFromPowerLimitation).to.eql(false,
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} cannot be excluded from power limitation`);
+ expect(createdChargingStation.chargePoints[0].ocppParamForPowerLimitation).to.eql('Device/GridCurrent',
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} must have OCPP param 'Device/GridCurrent'`);
+ expect(createdChargingStation.chargePoints[0].efficiency).to.eql(95,
+ `Charge Point ID 1 of charging station ${createdChargingStation.id} must have efficiency 95`);
+ // Assign to Site Area
+ if (siteArea) {
+ createdChargingStation.siteAreaID = siteArea.id;
+ await this.getAdminCentralServerService().updateEntity(
+ this.getAdminCentralServerService().chargingStationApi, createdChargingStation);
+ }
+ const createdCS = new ChargingStationContext(createdChargingStation, this);
+ await createdCS.initialize();
+ this.context.createdChargingStations.push(createdCS);
+ return createdCS;
+ }
+
async createRegistrationToken(siteAreaID: string = null): Promise<string> {
const registrationTokenResponse = await this.centralAdminServerService.registrationApi.create({
description: `Test Token for site area ${siteAreaID}`,

MODIFY
test/factories/ChargingStationFactory.ts
test/factories/ChargingStationFactory.ts
@@ -15,6 +15,13 @@ const chargingStationSinglePhased = Factory.define('chargingStation')
.attr('chargeBoxSerialNumber', () => 'EV.2S7P44' + faker.random.alphaNumeric(15).toUpperCase())
.attr('firmwareVersion', () => faker.random.alphaNumeric(25));
+const chargingStationDC = Factory.define('chargingStation')
+ .attr('chargePointVendor', () => 'DELTA')
+ .attr('chargePointModel', () => '10616')
+ .attr('chargePointSerialNumber', () => faker.random.alphaNumeric(25))
+ .attr('chargeBoxSerialNumber', () => '20071984' + faker.random.alphaNumeric(15).toUpperCase())
+ .attr('firmwareVersion', () => faker.random.alphaNumeric(25));
+
export default class ChargingStationFactory {
static build(attributes?, options?) {
return chargingStationThreePhased.build(attributes, options);
@@ -23,4 +30,8 @@ export default class ChargingStationFactory {
static buildChargingStationSinglePhased(attributes?, options?) {
return chargingStationSinglePhased.build(attributes, options);
}
+
+ static buildChargingStationDC(attributes?, options?) {
+ return chargingStationDC.build(attributes, options);
+ }
}

added site area with dc charger