Skip to content

Modbus data fields

Version 3.0 of the API introduces the /modbus/* endpoints, which return raw data collected from the registers of supported modbus meters, such as the CETA PMC-220 (single phase) and PMC-340B (3 phase) NMI pattern approved meters.

Cumulative data

Note that the energy values (kWh_*) returned by the PMC devices are cumulative data values, not interval data. This differs from the Wattwatchers Long and Short energy values returned by the API.

kWh

Real energy data is returned in units of 0.01 kWh, not Joules, which differs from the Wattwatchers Long and Short real energy values returned by the API.

kVAh

Reactive energy data is returned in units of 0.01 kVAh, not Joules, which differs from the Wattwatchers Long and Short reactive energy values returned by the API.

Lists vs. indvidual entries

Retrieving data from the /modbus/{device-id} endpoint returns a list of entries matching the specified fromTs and toTs timestamp values, e.g. [{ <object 1 values> }, { <object 2 values> }, etc. ]

Retrieving data from the /modbus/{device-id}/latest or /modbus/{device-id}/first endpoints will return a single JSON object, e.g. { <object values> }.

No data

If there is no data for a device (i.e. it's uninitialised) or the device you are calling the /modbus/* endooint for is not a modbus device, a 204 No Data response will be returned.

If a device has data, but the query parameters specified don't match any data, an empty list (e.g. []) will be returned for the /modbus/{device-id} endpoint.

Non-modbus device

If you attempt to request modbus data (using the /modbus/{device-id} endpoint) for a device that doesn't support modbus data, you will get a 422 Unprocessable Entity status response:

{
    "code": "UNPROCESSABLE ENTITY",
    "httpCode": 422,
    "message": "You have attempted to query modbus data for a device ID that does not support it"
}

Common data object values

The following fields are present in data from both the PMC-220 and PMC-340B devices.

Property Data type Units Notes
kVAh Int 0.01 kVAh Apparent power
kWh_Exp Int 0.01 kWh Real energy export
kWh_Imp Int 0.01 kWh Real energy import
kWh_Net Int 0.01 kWh Real energy net
kWh_Tot Int 0.01 kWh Real energy total
kvarh_Q1 Int 0.01 kvarh kvarh of Q1
kvarh_Q2 Int 0.01 kvarh kvarh of Q2
kvarh_Q3 Int 0.01 kvarh kvarh of Q3
kvarh_Q4 Int 0.01 kvarh kvarh of Q4
kvarh_Imp Int 0.01 kvarh kvarh import
kvarh_Exp Int 0.01 kvarh kvarh export
kvarh_Net Int 0.01 kvarh kvarh net
kvarh_Tot Int 0.01 kvarh kvarh total
model String N/A The device model that was attached to the device at the time the data was collected. Can be used to determine what the payload structure is. Currently only PMC-220 and PMC-340B values are supported.
timestamp Int Seconds since Unix epoch The Unix timestamp when the data was captured on the device.

PMC-220 object values

Example data entry

{
  "_I": 0.3065536916255951,
  "_PF": 0.5856215357780457,
  "_V": 245.0169219970703,
  "kVAh": 616,
  "kWh_Exp": 0,
  "kWh_Imp": 283,
  "kWh_Net": 283,
  "kWh_Tot": 283,
  "kvarh_Exp": 173,
  "kvarh_Imp": 0,
  "kvarh_Net": -173,
  "kvarh_Tot": 173,
  "model": "PMC-220",
  "timestamp": 1546956000
}

PMC-220 specific fields

Property Data type Units Notes
_I Float Amperes The Current value
_PF Float - The Power Factor value
_V Float Volts The Voltage value

PMC-340B object values

{
  "_Ia": 0.0,
  "_Ib": 0.0,
  "_Ic": 0.0,
  "_PFa": 1.0,
  "_PFb": 1.0,
  "_PFc": 1.0,
  "_Uan": 244.8056182861328,
  "_Ubn": 122.43417358398438,
  "_Ucn": 122.45341491699219,
  "kVAh": 0,
  "kWh_Exp": 0,
  "kWh_Imp": 0,
  "kWh_Net": 0,
  "kWh_Tot": 0,
  "kWh_Exp_a": 0,
  "kWh_Exp_b": 0,
  "kWh_Exp_c": 0,
  "kWh_Imp_a": 1355,
  "kWh_Imp_b": 0,
  "kWh_Imp_c": 0,
  "kvarh_Q1": 0,
  "kvarh_Q2": 0,
  "kvarh_Q3": 0,
  "kvarh_Q4": 0,
  "kvarh_Exp": 0,
  "kvarh_Imp": 0,
  "kvarh_Net": 0,
  "kvarh_Tot": 0,
  "model": "PMC-340B",
  "timestamp": 1546952400
}

PMC-340B specific fields

The PMC-340B device returns three-pase data. Where relevant, values for each phase is labeled with an a, b or c suffix.

Property Data type Units Notes
_Ia, _Ib, _Ic Float Amperes The Current value for the relevant phase.
_PFa, _PFb, _PFc Float - The Power Factor value for the relevant phase.
_Uan, _Ubn, _Ucn Float Volts The phase-neutral Voltage value for the relevant phase.
kWh_Imp_a, kWh_Imp_b, kWh_Imp_c Int 0.01 kWh Imported total energy value for the relevant phase.
kWh_Exp_a, kWh_Exp_b, kWh_Exp_c Int 0.01 kWh Exported total energy value for the relevant phase.