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.

PropertyData typeUnitsNotes
kVAhInt0.01 kVAhApparent power
kWh_ExpInt0.01 kWhReal energy export
kWh_ImpInt0.01 kWhReal energy import
kWh_NetInt0.01 kWhReal energy net
kWh_TotInt0.01 kWhReal energy total
kvarh_Q1Int0.01 kvarhkvarh of Q1
kvarh_Q2Int0.01 kvarhkvarh of Q2
kvarh_Q3Int0.01 kvarhkvarh of Q3
kvarh_Q4Int0.01 kvarhkvarh of Q4
kvarh_ImpInt0.01 kvarhkvarh import
kvarh_ExpInt0.01 kvarhkvarh export
kvarh_NetInt0.01 kvarhkvarh net
kvarh_TotInt0.01 kvarhkvarh total
modelStringN/AThe 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.
timestampIntSeconds since Unix epochThe 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

PropertyData typeUnitsNotes
_IFloatAmperesThe Current value
_PFFloat-The Power Factor value
_VFloatVoltsThe 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.

PropertyData typeUnitsNotes
_Ia, _Ib, _IcFloatAmperesThe Current value for the relevant phase.
_PFa, _PFb, _PFcFloat-The Power Factor value for the relevant phase.
_Uan, _Ubn, _UcnFloatVoltsThe phase-neutral Voltage value for the relevant phase.
kWh_Imp_a, kWh_Imp_b, kWh_Imp_cInt0.01 kWhImported total energy value for the relevant phase.
kWh_Exp_a, kWh_Exp_b, kWh_Exp_cInt0.01 kWhExported total energy value for the relevant phase.