Data Format

Forwarder sends data in JSON (JavaScript Object Notation). Each request sends data from one stream, so all the points have the very same id (see below).

Each data point is conclusively identified by

  • sn, medium, channel and index for paired sensor

  • uniq, medium or obis without channel and index for unpaired sensor

  • sn and obis with channel for energomaster sensor

  • sn and medium or obis without channel for gateway data

and contains exactly one value

Each data point contains these items:

  • timestamp [unsigned int]: time when value was measured in Homebase, seconds since Unix epoch.

  • sn [string]: unique serial number of Homebase, 16 characters [0-9A-F]{16}.

  • channel [unsigned int]: sensor number, unique in Homebase context. Not present for unpaired sensors.

  • uniq [string]: unique serial number of a sensor, 8 characters [0-9A-F]{8}. Not present for sensors that are not identified by UNIQ.

  • device [unsigned int]: device identifier, this is ID of sensor’s hardware.

  • medium [unsigned int]: medium identifier, unit of measurement. Not present for sensors that describe measured values using OBIS codes.

  • index [unsigned int]: value number. Not present for sensors that describe measured values using OBIS codes. The alternative for energomaster is channel in obis code.

  • obis [unsigned int]: OBIS code of the value. Not present for sensors that describe measured values using medium + index.

  • value [float]: measured value.

Notes:

  • Some sensors can measure several values of one medium. For example EOS6-PS (Powersense) has 3 independent current clamps and thus can measure 3 values in Watts. Those values are numbered 1, 2, 3. This is called index.

  • Device identifier, obis identifier and medium identifier are defined in Homebase Documentation.

  • Data point are not ordered by time or any other key.

Data in JSON format are encoded as a list of dictionaries. White characters may or may not be present in output.

Note, that index key do not have to be present in payload.

medium and obis keys are mutually exclusive. That means, that only one should be present in payload.

Example aggregated output

[
   {
      "timestamp": 1450436441,
      "sn": "1234567890ABCDEF",
      "channel": 1,
      "uniq": "05000001"
      "device": 5,
      "medium": 25,
      "index": 0,
      "value": 1000
   },
   {
      "timestamp": 1450436443,
      "sn": "1234567890ABCDEF",
      "channel": 1,
      "uniq": "05000001"
      "device": 5,
      "medium": 25,
      "index": 0,
      "value": 1000
   },
   {
      "timestamp": 1450436443,
      "sn": "1234567890ABCDEF",
      "channel": 1,
      "uniq": "05000001"
      "device": 5,
      "medium": 25,
      "index": 0,
      "value": 1000
   }
]

Example aggregated output

[
   {
      "timestamp": 1450436441,
      "sn": "1234567890ACCDEF",
      "device": 8,
      "obis": 1-3:1.7.0,
      "value": 1000
   }
]