MeterValues
Sent by the Charging Station to report meter readings for a specific EVSE. Used for periodic energy reporting outside of a TransactionEvent.
Quick Reference
Required Fields
evseId integer ID of the EVSE to which the meter values belong (0 = Charging Station level)
meterValue array[MeterValueType] One or more meter value objects, each with a timestamp and array of sampled values
Optional Fields
transactionId string(36) If provided, links these meter values to a specific transaction
Example Payload
{
"evseId": 1,
"transactionId": "txn-abc123",
"meterValue": [
{
"timestamp": "2024-01-15T10:45:00Z",
"sampledValue": [
{
"value": 16500,
"measurand": "Energy.Active.Import.Register",
"unitOfMeasure": {
"unit": "Wh"
}
},
{
"value": 7.2,
"measurand": "Power.Active.Import",
"unitOfMeasure": {
"unit": "kW"
}
}
]
}
]
} Example Full Frame
[
2,
"msg-001",
"MeterValues",
{
"evseId": 1,
"transactionId": "txn-abc123",
"meterValue": [
{
"timestamp": "2024-01-15T10:45:00Z",
"sampledValue": [
{
"value": 16500,
"measurand": "Energy.Active.Import.Register",
"unitOfMeasure": {
"unit": "Wh"
}
},
{
"value": 7.2,
"measurand": "Power.Active.Import",
"unitOfMeasure": {
"unit": "kW"
}
}
]
}
]
}
]
Format: [MessageType, MessageId, Action, Payload]
Overview
MeterValues reports energy and other electrical measurements from an EVSE to the CSMS. While TransactionEvent can also carry meter values at transaction start/end, MeterValues is used for periodic reporting during a session.
When to Send
- Periodically during a charging session (interval controlled by
MeterValueSampleIntervalvariable) - When the
TriggerMessagecommand requests meter values - For clock-aligned meter readings (when
ClockAlignedDataIntervalis configured)
Expected Response
Empty response — the CSMS acknowledges with an empty {} object.
Key Differences from OCPP 1.6J
| OCPP 1.6J | OCPP 2.0.1 |
|---|---|
connectorId (integer) | evseId (integer) |
transactionId is an integer | transactionId is a string (max 36) |
context, format, location in sampled values | Same, but also unitOfMeasure object with unit + multiplier |
Usage Notes
transactionIdis optional but recommended during active transactions for accurate billingUnitOfMeasureTypehas amultiplierfield: e.g.,multiplier: 3means the unit is × 10³ (kilo)- The default measurand is
Energy.Active.Import.Registerand default unit isWh - You can include multiple
sampledValueentries in a singleMeterValueType— they share the same timestamp
Best Practices
- Always include Energy.Active.Import.Register — This is the billing-relevant measurement
- Use correct units —
Whfor energy,Wfor power,Afor current,Vfor voltage - Link to transactions — Include
transactionIdwhen reporting during a session - Send on state changes — Consider sending meter values when charging state changes
Testing Tips
- Test with multiple measurands in a single meterValue entry
- Test the
multiplierfield (e.g., reporting in kWh withmultiplier: -3and unitWh) - Verify the CSMS correctly associates readings with transactions via
transactionId
Common Errors
TypeConstraintViolation
Cause: connectorId used instead of evseId
Solution: OCPP 2.0.1 uses evseId, not connectorId
PropertyConstraintViolation
Cause: meterValue array is empty
Solution: meterValue must contain at least 1 MeterValueType object