The early return in handleMeterValues only checked VERSION_201, missing
VERSION_20. A station configured with ocppVersion '2.0' would fall
through to the OCPP 1.6 path and call convertToInt on a UUID string.
private async handleMeterValues (
requestPayload?: BroadcastChannelRequestPayload
): Promise<MeterValuesResponse> {
- if (this.chargingStation.stationInfo?.ocppVersion === OCPPVersion.VERSION_201) {
+ if (
+ this.chargingStation.stationInfo?.ocppVersion === OCPPVersion.VERSION_20 ||
+ this.chargingStation.stationInfo?.ocppVersion === OCPPVersion.VERSION_201
+ ) {
return await this.chargingStation.ocppRequestService.requestHandler<
MeterValuesRequest,
MeterValuesResponse