From 9c0fcfda63dbbf24bbb240f2d4ba45667fbd9c9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 20 Mar 2026 20:10:38 +0100 Subject: [PATCH] fix(ocpp2.0): guard BroadcastChannel MeterValues for both VERSION_20 and VERSION_201 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. --- .../ChargingStationWorkerBroadcastChannel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts index ba414170..57a87856 100644 --- a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts @@ -470,7 +470,10 @@ export class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChanne private async handleMeterValues ( requestPayload?: BroadcastChannelRequestPayload ): Promise { - 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 -- 2.53.0