Reference Guide · OCPP 1.6J · 9 min read

OCPP MeterValues: Reporting Energy Consumption

How to correctly send OCPP 1.6 MeterValues — sampledValue structure, measurands, units, context values, configuration keys, what to include in StopTransaction, and the minimum set required for accurate billing.

Published · Reviewed against official OCA specification
RC
By Rodolfo Carrillo
Quick answer

MeterValues sends periodic or event-triggered energy readings from the Charge Point to the CSMS. Each reading is a sampledValue with a value (always a string), a measurand (what is measured), and a unit. For billing, always include Energy.Active.Import.Register in Wh at transaction begin, periodically, and at transaction end.

What are MeterValues?

MeterValues reports real-time and historical energy measurements from the Charge Point's energy meter. It is the primary source of data for billing, grid management, and compliance reporting. Unlike StartTransaction and StopTransaction — which carry single snapshot readings — MeterValues can send multiple measurements at multiple points in time in a single message.

MeterValues is always initiated by the Charge Point (CP→CSMS). The CSMS responds with an empty CALLRESULT. The Charge Point sends MeterValues in three scenarios: periodically during a transaction (controlled by MeterValueSampleInterval), at transaction begin/end (controlled by MeterValuesTransaction), and on demand via a TriggerMessage from the CSMS.

Message structure

Field Required Description
connectorIdYesConnector the readings belong to. Use 0 for Charge Point-level aggregate readings.
meterValueYesArray of meter value objects. Each object has a timestamp and an array of sampledValue items.
transactionIdNoIf the readings belong to an active transaction, include the transactionId from StartTransaction. Enables the CSMS to link readings to the correct billing record.
CALL — MeterValues (Energy + Power, mid-session)
[ 2, "mv-001", "MeterValues", "connectorId": 1, "transactionId": 1001, "meterValue": [ "timestamp": "2025-05-12T10:30:00Z", "sampledValue": [ "value": "49430", "measurand": "Energy.Active.Import.Register", "unit": "Wh", "context": "Sample.Periodic" , "value": "7200", "measurand": "Power.Active.Import", "unit": "W", "context": "Sample.Periodic" ] ] ]

sampledValue fields

Field Required Description & key values
valueYesThe measurement as a string. Numbers must be quoted: "48.3" not 48.3.
measurandNoWhat is being measured. Defaults to Energy.Active.Import.Register if omitted. See measurand table below.
unitNoUnit of the value. Must match the measurand: Wh or kWh for energy, W or kW for power, A for current, V for voltage, Percent for SoC.
contextNoSample.Periodic (regular interval), Transaction.Begin (start of session), Transaction.End (end of session), Interruption.Begin/End (charging paused/resumed), Trigger (TriggerMessage-requested).
locationNoWhere the measurement is taken: Outlet (connector output), Inlet (grid input), Body (inside the CP), Cable, EV.
phaseNoFor multi-phase chargers: L1, L2, L3, L1-N, L2-N, L3-N, L1-L2, L2-L3, L3-L1.
formatNoRaw (plain number string) or SignedData (fiscally signed meter data, e.g. OCMF). Default is Raw.

Key measurands

measurand Typical unit Use case
Energy.Active.Import.Register Wh Absolute meter register — primary billing measurand. Always send at Transaction.Begin and Transaction.End.
Energy.Active.Import.Interval Wh Energy delivered in the last sample interval — relative, interval-scoped.
Power.Active.Import W Real-time charging power. Used for grid management and smart charging validation.
Current.Import A Current drawn by the EV. Use with phase for 3-phase chargers.
Voltage V Supply voltage. Use with phase for per-phase voltage monitoring.
SoC Percent EV state of charge (0–100%). Requires ISO 15118 communication between CP and EV.
Temperature Celsius Connector or internal temperature for thermal management.
Power.Factor Power factor (0–1). Useful for grid operators monitoring reactive power.

Configuration keys

Key Controls
MeterValueSampleInterval Interval in seconds for periodic MeterValues during a transaction. 0 = disabled. Typical: 60–300 s.
MeterValuesSampledData Comma-separated list of measurands to include in periodic samples (e.g. "Energy.Active.Import.Register,Power.Active.Import").
StopTxnSampledData Measurands to include in the transactionData of StopTransaction. Always include Energy.Active.Import.Register.
MeterValuesAlignedData Measurands for clock-aligned samples (sent at fixed clock intervals, e.g. on the hour, not relative to transaction start).
ClockAlignedDataInterval Interval in seconds for clock-aligned samples. 0 = disabled.

MeterValues in StopTransaction

StopTransaction has an optional transactionData field — an array of MeterValue objects with the same structure as the MeterValues message. This is the preferred place to send the final energy readings because it co-locates billing data with the session close event, reducing the risk of data loss from message ordering issues.

💡

Always include at least one Energy.Active.Import.Register entry with context: "Transaction.End" in transactionData. This gives the CSMS a self-contained billing record even if earlier periodic MeterValues were lost.

Minimum set for billing

For a compliant billing-ready MeterValues implementation, send at minimum:

  1. At Transaction.Begin: Energy.Active.Import.Register in Wh (same value as meterStart in StartTransaction).
  2. Periodically during the session: Energy.Active.Import.Register in Wh, and optionally Power.Active.Import in W.
  3. In StopTransaction.transactionData: Energy.Active.Import.Register in Wh with context: "Transaction.End".

For regulatory or fiscal metering requirements (e.g. Germany's Eichrecht), also include format: "SignedData" with OCMF-encoded values at Transaction.Begin and Transaction.End.

Common errors

value sent as a number, not a string

The schema requires value to be a string. Sending {"value": 48.3} instead of {"value": "48.3"} fails validation. This is the most common MeterValues bug.

unit inconsistent with measurand

Sending Energy.Active.Import.Register with unit "kW" (power unit) is semantically invalid. Always pair each measurand with its correct unit type.

Not including transactionId

Without transactionId, the CSMS cannot reliably link MeterValues to the correct session, especially on multi-connector units. Always include it for transaction-related readings.

Sending Interval measurand but expecting Register behavior

Energy.Active.Import.Interval resets to 0 each sample period. It cannot be used to reconstruct total session energy if messages are lost. Use Register for billing-critical data.

RC

Rodolfo Carrillo

OCPP integration engineer and creator of OCPP Tools. All articles are verified against the official OCA specification and tested using the on-site tools.

Tool

Build a frame in seconds

Form-driven payload builder — pick fields, get a valid frame, copy to clipboard.

Open Builder →

Frequently asked questions

What is the difference between Energy.Active.Import.Register and Energy.Active.Import.Interval?
Energy.Active.Import.Register is an absolute meter register reading — the total energy the meter has ever measured, like an odometer. Energy.Active.Import.Interval is a relative reading covering only the interval since the last MeterValues sample. For billing, Register values are preferred because they survive reboots and do not require sequential delivery.
Is the value field in sampledValue always a string?
Yes. The OCPP 1.6 schema defines value as type: "string" regardless of the measurand. Numbers must be serialized as strings — for example "48.3" not 48.3. Sending a numeric value will fail JSON Schema validation.
What is MeterValueSampleInterval?
MeterValueSampleInterval is a configuration key (integer, in seconds) that controls how often the Charge Point sends periodic MeterValues during a transaction. A value of 0 disables periodic sampling. Common production values are 60–300 seconds.
Should MeterValues be sent for connectorId 0?
ConnectorId 0 is used for Charge Point-level (aggregate) meter readings — for example, total site power consumption. Connector-specific readings use connectorId ≥ 1. For most billing use cases, use the specific connector ID.
What happens if MeterValues are lost due to a network outage?
The Charge Point should queue unsent MeterValues locally and retransmit them after reconnecting. The CSMS must accept out-of-order MeterValues and use the timestamp field — not server arrival time — for billing calculations. The critical record is meterStop in StopTransaction; MeterValues are supplementary.
What is the format field in sampledValue?
The format field indicates how the value is encoded: Raw (plain text number string) or SignedData (a digitally signed meter reading for fiscal metering, e.g. OCMF format). For regulatory billing in Germany and some EU markets, SignedData with OCMF-formatted values is required.

Sources & further reading

  • · Open Charge Alliance. (2015). Open Charge Point Protocol 1.6, Edition 2, §4.11 — MeterValues. https://openchargealliance.org/my-oca/ocpp/
  • · Open Charge Alliance. (2015). Open Charge Point Protocol 1.6, Edition 2, Appendix 1 — MeterValueSampleInterval, StopTxnSampledData. https://openchargealliance.org/my-oca/ocpp/
Last technical review: May 12, 2025

Continue learning