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';
requestPayload: JsonType
): Promise<void> {
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) {