Developers

blukii Hub JSON API

In this documentation the JSON API structure is described.

Software version: 3.0.4.4.

Push interface overview

The blukii Hub receives data of all blukii Smart Beacons and sends it to your configured server. You must ensure that your server correctly interprets and processes the data from the blukii Hub. The data is sent from the blukii Hub via a HTTP POST or HTTP PUT interface in JSON format. The following is a structure of a JSON record. The structure of a data record depends on the hardware variant and the configuration of the blukii Sensor Beacon or blukii Smart Beacon. In the example below, the following configuration was used:

Output example of the push interface

{
    "id": "hubAEB6DC04",
    "localIp": "192.168.178.41",
    "items": [
        {
            "macAddress": "04EE03DBD02B",
            "blukiiId": "blukii BXXXXX 04EE03DBD02B",
            "batteryPct": 100,
            "batteryMV": 3363,
            "activeTime": 236,
            "timestamp": 1657898818334,
            "rssi": [
                {
                    "rssi": -57,
                    "timestamp": 1657898818023
                },
                {
                    "rssi": -58,
                    "timestamp": 1657898818650
                },
                {
                    "rssi": -57,
                    "timestamp": 1657898818334
                },
                {
                    "rssi": -57,
                    "timestamp": 1657898818863
                }
            ],
            "iBeaconData": [
                {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 1,
                    "measuredPower": -57,
                    "timestamp": 1657898818023
                }
            ],
            "eddystoneTLM": [
                {
                    "batteryMV": 3363,
                    "temperature": 0,
                    "packets": 241,
                    "activeTime": 2360,
                    "timestamp": 1657898818650
                }
            ],
            "eddystoneUID": [
                {
                    "uidNamespace": "626C756B626561636F6E",
                    "uidInstance": "000000030001",
                    "timestamp": 1657898818334
                }
            ],
            "deviceTracing": {
                "id": 13,
                "devices": [
                    {
                        "id": 11,
                        "rssi": -45,
                        "timestamp": 1657898818863
                    },
                    {
                        "id": 10,
                        "rssi": -45,
                        "timestamp": 1657898818863
                    },
                    {
                        "id": 3,
                        "rssi": -59,
                        "timestamp": 1657898818863
                    }
                ]
            }
        },
        {
            "macAddress": "CC78AB5E7627",
            "blukiiId": "blukii BXXXXX CC78AB5E7627",
            "type": "SENSOR_BEACON",
            "batteryPct": 100,
            "advInterval": 400,
            "firmware": "003.011",
            "timestamp": 1657898818128,
            "rssi": [
                {
                    "rssi": -18,
                    "timestamp": 1657898818545
                },
                {
                    "rssi": -18,
                    "timestamp": 1657898817396
                },
                {
                    "rssi": -18,
                    "timestamp": 1657898817813
                },
                {
                    "rssi": -18,
                    "timestamp": 1657898818128
                }
            ],
            "beaconSensorData": {
                "environment": [
                    {
                        "airPressure": 1008.9,
                        "light": 245,
                        "humidity": 49,
                        "temperature": 26.5625,
                        "timestamp": 1657898818545
                    }
                ],
                "magnetism": [
                    {
                        "x": -36,
                        "y": 16,
                        "z": 1212,
                        "timestamp": 1657898817396
                    }
                ],
                "acceleration": [
                    {
                        "x": 1294,
                        "y": 982,
                        "z": -4651,
                        "timestamp": 1657898817813
                    }
                ]
            },
            "iBeaconData": [
                {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 1,
                    "measuredPower": -57,
                    "timestamp": 1657898818128
                }
            ]
        }
    ]
}

Basically, a new block is added per blukii from which the Hub receives data. Such a block always consists of:

Depending on the configuration and hardware variant of the blukii, the following parts may be added:

Description of nodes and values

General

"macAddress": "CC78AB5E7627",
"blukiiId": "blukii BXXXXX CC78AB5E7627",
"type": "SENSOR_BEACON",
"batteryPct": 100,
"batteryMV": 3363,
"activeTime": 236,
"advInterval": 400,
"firmware": "003.011",
"timestamp": 1657898818128,

Rssi

Rssi contains a list of records, in JSON format, with the following content:

"rssi": [
    {
        "rssi": -57,
        "timestamp": 1657898818023
    },
    {
        "rssi": -58,
        "timestamp": 1657898818650
    },
    {
        "rssi": -57,
        "timestamp": 1657898818334
    }
],

The records are sorted in ascending order according to timestamp.

Beacon Sensor Data

"beaconSensorData": [
                      "magnetism": [ ... ],
                      "acceleration": [ ... ],
                      "environment": [ ... ]
]

Entries that are available depending on the configuration of the blukiis:

Magnetism

Magnetism contains a list of records, in JSON format, with the following content:

"magnetism": [
            {
              "timestamp": 1657898817396,
              "x": 4035,
              "y": -2220,
              "z": 5621
            },
            {
              "timestamp": 1657898817813,
              "x": 4013,
              "y": -2168,
              "z": 5690
            }
          ]

The records are sorted in ascending order according to timestamp.

Acceleration

"acceleration": [
                  {
                    "timestamp": 1657898817396,
                    "x": -24,
                    "y": -30,
                    "z": 1167
                  },
                  {
                    "timestamp": 1657898817813,
                    "x": -27,
                    "y": -29,
                    "z": 1172
                  }
                ]

The records are sorted in ascending order according to timestamp.

Environment

"environment": [
                  {
                    "timestamp": 1657898817396,
                    "airPressure": 938,
                    "light": 40,
                    "humidity": 14,
                    "temperature": 23.1875
                  },
                  {
                    "timestamp": 1657898817813,
                    "airPressure": 938,
                    "light": 40,
                    "humidity": 14,
                    "temperature": 23.1875
                  }
                ]

The records are sorted in ascending order according to timestamp.

iBeacon Data

"iBeaconData": [
                  {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 5002,
                    "measuredPower": -57,
                    "timestamp": 1657898818023
                  },
                  {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 5002,
                    "measuredPower": -57,
                    "timestamp": 1657898818650
                  }
                ]

The records are sorted in ascending order according to timestamp.

Eddystone UID

"eddystoneUID": [
                  {
                    "uidNamespace": "F7826DA6BC5B71E0893E",
                    "uidInstance": "7A6C4E51414E",
                    "timestamp": 1657898818334
                  },
                  {
                    "uidNamespace": "F7826DA6BC5B71E0893E",
                    "uidInstance": "7A6C4E51414E",
                    "timestamp": 1657898818650
                  }
                ]

The records are sorted in ascending order according to timestamp.

Eddystone TLM

"eddystoneTLM": [
                  {
                    "batteryMV": 3000,
                    "temperature": 22.5,
                    "packets": 38589588,
                    "activeTime": 40501320,
                    "timestamp": 1584449212283
                  },
                  {
                    "batteryMV": 3000,
                    "temperature": 22.5,
                    "packets": 38589589,
                    "activeTime": 40501320,
                    "timestamp": 1584449212392
                  }
                ]

The records are sorted in ascending order according to timestamp.

Device Tracing

"deviceTracing": {
    "id": 13,
    "devices": [
        {
            "id": 11,
            "rssi": -45,
            "timestamp": 1657898818863
        },
        {
            "id": 10,
            "rssi": -45,
            "timestamp": 1657898818863
        },
        {
            "id": 3,
            "rssi": -59,
            "timestamp": 1657898818863
        }
    ]
}

The records are sorted in ascending order according to timestamp.