MeterValues

Core CS->CSMS OCPP 2.0.1

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 MeterValueSampleInterval variable)
  • When the TriggerMessage command requests meter values
  • For clock-aligned meter readings (when ClockAlignedDataInterval is configured)

Expected Response

Empty response — the CSMS acknowledges with an empty {} object.

Key Differences from OCPP 1.6J

OCPP 1.6JOCPP 2.0.1
connectorId (integer)evseId (integer)
transactionId is an integertransactionId is a string (max 36)
context, format, location in sampled valuesSame, but also unitOfMeasure object with unit + multiplier

Usage Notes

  • transactionId is optional but recommended during active transactions for accurate billing
  • UnitOfMeasureType has a multiplier field: e.g., multiplier: 3 means the unit is × 10³ (kilo)
  • The default measurand is Energy.Active.Import.Register and default unit is Wh
  • You can include multiple sampledValue entries in a single MeterValueType — they share the same timestamp

Best Practices

  1. Always include Energy.Active.Import.Register — This is the billing-relevant measurement
  2. Use correct unitsWh for energy, W for power, A for current, V for voltage
  3. Link to transactions — Include transactionId when reporting during a session
  4. 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 multiplier field (e.g., reporting in kWh with multiplier: -3 and unit Wh)
  • 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