Fixed vendor in lower case + badge ID
MODIFY
.github/workflows/unit-tests.yml
.github/workflows/unit-tests.yml
@@ -37,18 +37,18 @@ jobs:
cache: npm
- name: Install NodeJs Packages
run: npm ci
- - name: Build production sources
+ - name: Build sources
run: |
cp src/assets/configs-ci/config.json src/assets
npm run build:dev
- - name: Start Server in Prod mode
+ - name: Start Server
run: |
npm run start:dev & sleep 10
- - name: Create Unit Test context
+ - name: Create Integration Test data
run: |
if [ ! -d test/config ]; then mkdir -p test/config; fi
cp src/assets/configs-ci/local.json test/config
npm run mochatest:createContext
- - name: Run Unit Test
+ - name: Run Integration Tests
run: npm run mochatest

MODIFY
src/integration/charging-station-vendor/ChargingStationVendorFactory.ts
src/integration/charging-station-vendor/ChargingStationVendorFactory.ts
@@ -8,7 +8,7 @@ import KebaChargingStationVendorIntegration from './keba/KebaChargingStationVend
export default class ChargingStationVendorFactory {
public static getChargingStationVendorImpl(chargingStation: ChargingStation): ChargingStationVendorIntegration {
let chargingStationVendorImpl: ChargingStationVendorIntegration = null;
- switch (chargingStation.chargePointVendor) {
+ switch (chargingStation.chargePointVendor.toLowerCase()) {
case ChargerVendor.EVBOX:
chargingStationVendorImpl = new EVBOXChargingStationVendorIntegration(chargingStation);
break;
@@ -37,7 +37,7 @@ export default class ChargingStationVendorFactory {
case ChargerVendor.ATESS:
case ChargerVendor.SAP_LABS_FRANCE:
case ChargerVendor.CIRCONTROL:
- case ChargerVendor.CIRCONTROL_BIS:
+ case ChargerVendor.XCHARGE:
case ChargerVendor.JOINON:
case ChargerVendor.LAFON_TECHNOLOGIES:
case ChargerVendor.ALFEN:

MODIFY
src/server/ocpp/validation/OCPPValidation.ts
src/server/ocpp/validation/OCPPValidation.ts
@@ -153,8 +153,8 @@ export default class OCPPValidation extends SchemaValidator {
private cleanUpTagID(tagID: string): string {
// Handle bug in Tag ID ending with ;NULL on some Charging Stations
- if (typeof tagID === 'string') {
- tagID = tagID.replace(';NULL', '');
+ if (tagID && typeof tagID === 'string' && tagID.toLowerCase().endsWith(';null')) {
+ tagID = tagID.slice(0, tagID.length - 5);
}
return tagID;
}

MODIFY
src/types/ChargingStation.ts
src/types/ChargingStation.ts
@@ -318,50 +318,51 @@ export type OCPPParams = {
params: OcppParameter[];
};
+// IMPORTANT: Always enter vendors in lower case
export enum ChargerVendor {
- ARK_AC_EV_CHARGER = 'Ark AC EV Charger',
- ALFEN = 'Alfen BV',
- ALPITRONIC = 'alpitronic GmbH',
- BENDER = 'Bender GmbH Co. KG',
- CFOS = 'cFos',
- DBTCEV = 'DBT-CEV',
- EBEE = 'Ebee',
- ECOTAP = 'Ecotap',
- ENPLUS = 'EN+',
- EXADYS = 'EXADYS',
- EVBOX = 'EV-BOX',
- EVMETER = 'EV Meter',
+ ARK_AC_EV_CHARGER = 'ark ac ev charger',
+ ALFEN = 'alfen bv',
+ ALPITRONIC = 'alpitronic gmbh',
+ BENDER = 'bender gmbh co. kg',
+ CFOS = 'cfos',
+ DBTCEV = 'dbt-cev',
+ EBEE = 'ebee',
+ ECOTAP = 'ecotap',
+ ENPLUS = 'en+',
+ EXADYS = 'exadys',
+ EVBOX = 'ev-box',
+ EVMETER = 'ev meter',
INNOGY = 'innogy',
- INGETEAM = 'INGETEAM',
- INGETEAM_ENERGY = 'INGETEAM ENERGY',
+ INGETEAM = 'ingeteam',
+ INGETEAM_ENERGY = 'ingeteam energy',
EFACEC = 'pt.efacec',
- IES = 'IES',
- HDM = 'HDM',
- HAGER = 'Hager',
- WALLBOX_CHARGERS = 'Wall Box Chargers',
- SCHNEIDER = 'Schneider Electric',
- WEBASTO = 'Webasto',
- DELTA_ELECTRONICS = 'Delta Electronics',
- DELTA = 'DELTA',
- ABB = 'ABB',
- LEGRAND = 'Legrand',
- ATESS = 'ATESS',
- MENNEKES = 'MENNEKES',
- KEBA = 'Keba AG',
- SAP_LABS_FRANCE = 'SAP Labs France Caen',
- CIRCONTROL = 'CIRCONTROL',
- CIRCONTROL_BIS = 'Circontrol',
- JOINON = 'JOINON',
- JOINT = 'Joint',
- NEXANS = 'Nexans',
+ IES = 'ies',
+ HDM = 'hdm',
+ HAGER = 'hager',
+ WALLBOX_CHARGERS = 'wall box chargers',
+ SCHNEIDER = 'schneider electric',
+ WEBASTO = 'webasto',
+ DELTA_ELECTRONICS = 'delta electronics',
+ DELTA = 'delta',
+ ABB = 'abb',
+ XCHARGE = 'xcharge',
+ LEGRAND = 'legrand',
+ ATESS = 'atess',
+ MENNEKES = 'mennekes',
+ KEBA = 'keba ag',
+ SAP_LABS_FRANCE = 'sap labs france caen',
+ CIRCONTROL = 'circontrol',
+ JOINON = 'joinon',
+ JOINT = 'joint',
+ NEXANS = 'nexans',
AIXCHARGE = 'aixcharge',
- LAFON_TECHNOLOGIES = 'LAFON TECHNOLOGIES',
- TRITIUM = 'Tritium',
- GREEN_MOTION = 'Green Motion',
+ LAFON_TECHNOLOGIES = 'lafon technologies',
+ TRITIUM = 'tritium',
+ GREEN_MOTION = 'green motion',
G2_MOBILITY = 'com.g2mobility',
- MEAECN = 'MEAECN',
- KOSTAD = 'Kostad',
- KEMPOWER = 'Kempower',
- GROWATT = 'Growatt',
- SETEC = 'SETEC-POWER'
+ MEAECN = 'meaecn',
+ KOSTAD = 'kostad',
+ KEMPOWER = 'kempower',
+ GROWATT = 'growatt',
+ SETEC = 'setec-power'
}

Fixed vendor in lower case + badge ID