const payload: MeterValuesRequest = {
connectorId,
transactionId,
- meterValue,
+ meterValue: [meterValue],
};
await this.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.METER_VALUES);
} catch (error) {
const payload: MeterValuesRequest = {
connectorId,
transactionId,
- meterValue: beginMeterValue,
+ meterValue: [beginMeterValue],
};
await this.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.METER_VALUES);
} catch (error) {
const payload: MeterValuesRequest = {
connectorId,
transactionId,
- meterValue: endMeterValue,
+ meterValue: [endMeterValue],
};
await this.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.METER_VALUES);
} catch (error) {
export interface MeterValuesRequest {
connectorId: number;
transactionId?: number;
- meterValue: OCPP16MeterValue | OCPP16MeterValue[];
+ meterValue: OCPP16MeterValue[];
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface