commandName,
commandPayload,
);
+ this.emit(ChargingStationEvents.updated);
}
private handleResponseMessage(response: Response): void {
logger.error(`${this.logPrefix()} ${errorMsg}`);
throw new OCPPError(ErrorType.PROTOCOL_ERROR, errorMsg);
}
- this.emit(ChargingStationEvents.updated);
} else {
throw new OCPPError(
ErrorType.PROTOCOL_ERROR,
import { OCPPError } from '../../../exception';
import {
type ChangeConfigurationResponse,
- ChargingStationEvents,
type ClearChargingProfileResponse,
ErrorType,
type GenericResponse,
OCPP16ChargePointStatus.Available,
);
}
- chargingStation.emit(ChargingStationEvents.updated);
}
private async handleResponseStopTransaction(
}
resetConnectorStatus(chargingStation.getConnectorStatus(transactionConnectorId!)!);
chargingStation.stopMeterValues(transactionConnectorId!);
- chargingStation.emit(ChargingStationEvents.updated);
const logMsg = `${chargingStation.logPrefix()} Transaction with id ${
requestPayload.transactionId
} STOPPED on ${
import { OCPPError } from '../../exception';
import { PerformanceStatistics } from '../../performance';
import {
+ ChargingStationEvents,
type ErrorCallback,
type ErrorResponse,
ErrorType,
.catch(reject)
.finally(() => {
chargingStation.requests.delete(messageId);
+ chargingStation.emit(ChargingStationEvents.updated);
});
};
ocppError,
);
chargingStation.requests.delete(messageId);
+ chargingStation.emit(ChargingStationEvents.updated);
reject(ocppError);
};