Fixed SoC for Cahors iccid/imsi accept empty values
MODIFY
src/assets/server/ocpp/schemas/boot-notification-request.json
src/assets/server/ocpp/schemas/boot-notification-request.json
"iccid": {
"type": "string",
"description": "string defining the iccid of the charge point. To be treated as case insensitive.",
- "minLength": 1,
+ "minLength": 0,
"maxLength": 20
},
"imsi": {
"type": "string",
"description": "string defining the imsi of the charge point. To be treated as case insensitive.",
- "minLength": 1,
+ "minLength": 0,
"maxLength": 20
},
"meterType": {
"type": "string",
"description": "string defining the meter type of the charge point. To be treated as case insensitive.",
- "minLength": 1,
+ "minLength": 0,
"maxLength": 25
},
"meterSerialNumber": {

MODIFY
src/server/ocpp/services/OCPPService.ts
src/server/ocpp/services/OCPPService.ts
@@ -1100,6 +1100,10 @@ export default class OCPPService {
if (OCPPUtils.isSocMeterValue(meterValue)) {
// Set current
transaction.currentStateOfCharge = Utils.convertToFloat(meterValue.value);
+ // If Transaction.Begin not provided (Cahors)
+ if (transaction.stateOfCharge === 0) {
+ transaction.stateOfCharge = transaction.currentStateOfCharge;
+ }
// Consumption?
} else if (OCPPUtils.isConsumptionMeterValue(meterValue)) {
// Update

Fixed SoC for Cahors iccid/imsi accept empty values