X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2F1.6%2FOCPP16ResponseService.ts;h=47021ca6014f8f90c4488b72e9591f19b29afadf;hb=65554cc3fc240ee17d57c57ec60a2a0da4d757ba;hp=38a29976a115160c558bed39b03196cf16ddd5fe;hpb=7369e417367e4cc49fe81afb15cfe47eadca9459;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index 38a29976..47021ca6 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -34,6 +34,7 @@ import logger from '../../../utils/Logger'; import Utils from '../../../utils/Utils'; import type ChargingStation from '../../ChargingStation'; import { ChargingStationConfigurationUtils } from '../../ChargingStationConfigurationUtils'; +import { ChargingStationUtils } from '../../ChargingStationUtils'; import OCPPResponseService from '../OCPPResponseService'; import { OCPP16ServiceUtils } from './OCPP16ServiceUtils'; @@ -65,7 +66,10 @@ export default class OCPP16ResponseService extends OCPPResponseService { requestPayload: JsonType ): Promise { if (chargingStation.isRegistered() || commandName === OCPP16RequestCommand.BOOT_NOTIFICATION) { - if (this.responseHandlers.has(commandName)) { + if ( + this.responseHandlers.has(commandName) && + ChargingStationUtils.isCommandSupported(commandName, chargingStation.stationInfo) + ) { try { await this.responseHandlers.get(commandName)(chargingStation, payload, requestPayload); } catch (error) {