Developers

Customer documentation blukii Hub

In this documentation the api functions of the blukii Hub are described.

Push interface

The blukii Hub received data of all blukii Sensor Beacons or 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": "SMAA9ET9WL",
    "data": [
        {
            "blukiiId": "CC78AB6FFEBF",
            "macAddress": "CC78AB6FFEBF",
            "rssi": [
                {
                    "rssi": -55,
                    "timestamp": 1584449211921
                },
                {
                    "rssi": -54,
                    "timestamp": 1584449212522
                },
                {
                    "rssi": -55,
                    "timestamp": 1584449212829
                },
                {
                    "rssi": -56,
                    "timestamp": 1584449212929
                }
            ],
            "iBeaconData": [
                {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 3124,
                    "measuredPower": -57,
                    "timestamp": 1584449211921
                }
            ],
            "eddystoneUID": [
                {
                    "uidNamespace": "626C756B626561636F6E",
                    "uidInstance": "00000003000A",
                    "timestamp": 1584449212522
                }
            ],
            "eddystoneTLM": [
                {
                    "battery": 3000,
                    "temperature": 0,
                    "packets": 38591923,
                    "activeTime": 40524260,
                    "timestamp": 1584449212829
                }
            ],
            "eddystoneURL": [
                {
                    "url": "https://myin.fo/Iuaf8",
                    "timestamp": 1584449212929
                }
            ]
        },
        {
            "blukiiId": "CC78AB6FD698",
            "macAddress": "CC78AB6FD698",
            "type": "SENSOR_BEACON",
            "battery": 94,
            "advInterval": 100,
            "firmware": "003.007",
            "rssi": [
                {
                    "rssi": -59,
                    "timestamp": 1584449212158
                },
                {
                    "rssi": -62,
                    "timestamp": 1584449212470
                },
                {
                    "rssi": -58,
                    "timestamp": 1584449212088
                }
            ],
            "beaconSensorData": {
                "acceleration": [
                    {
                        "x": 551,
                        "y": 988,
                        "z": 457,
                        "timestamp": 1584449212158
                    }
                ],
                "magnetism": [
                    {
                        "x": 1388,
                        "y": -3539,
                        "z": 321,
                        "timestamp": 1584449212470
                    }
                ],
                "environment": [
                    {
                        "airPressure": 954.7,
                        "light": 0,
                        "humidity": 32,
                        "temperature": 21.234375,
                        "timestamp": 1584449212088
                    }
                ]
            }
        }
    ]
}

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:

Detailed description of the values

General

"blukiiId": "CC78AB6FD698"
"macAddress": "CC78AB6FD698",
"type": "SENSOR_BEACON",
"battery": 94,
"advInterval": 100,
"firmware": "003.007",

Rssi

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

"rssi": [
          {
            "rssi": -55,
            "timestamp": 1584449211921
          },
          {
            "rssi": -57,
            "timestamp": 1584449212829
          }
        ]

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": 1519734268623,
              "x": 4035,
              "y": -2220,
              "z": 5621
            },
            {
              "timestamp": 1519734266497,
              "x": 4013,
              "y": -2168,
              "z": 5690
            }
          ]

The records are sorted in ascending order according to timestamp.

Acceleration
"acceleration": [
                  {
                    "timestamp": 1519734269152,
                    "x": -24,
                    "y": -30,
                    "z": 1167
                  },
                  {
                    "timestamp": 1519734268602,
                    "x": -27,
                    "y": -29,
                    "z": 1172
                  }
                ]

The records are sorted in ascending order according to timestamp.

Environment
"environment": [
                  {
                    "timestamp": 1519734268362,
                    "airPressure": 938,
                    "light": 40,
                    "humidity": 14,
                    "temperature": 23.1875
                  },
                  {
                    "timestamp": 1519734267939,
                    "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": 1584449212186
                  },
                  {
                    "uuid": "626C756B-6969-2E63-6F6D-626561636F6E",
                    "major": 3,
                    "minor": 5002,
                    "measuredPower": -57,
                    "timestamp": 1584449213186
                  }
                ]

The records are sorted in ascending order according to timestamp.

Eddystone UID

"eddystoneUID": [
                  {
                    "uidNamespace": "F7826DA6BC5B71E0893E",
                    "uidInstance": "7A6C4E51414E",
                    "timestamp": 1584449212635
                  },
                  {
                    "uidNamespace": "F7826DA6BC5B71E0893E",
                    "uidInstance": "7A6C4E51414E",
                    "timestamp": 1584449213635
                  }
                ]

The records are sorted in ascending order according to timestamp.

Eddystone URL

"eddystoneURL": [
                  {
                    "url": "https://myin.fo/hgKfM",
                    "timestamp": 1584449212896
                  },
                  {
                    "url": "https://myin.fo/hgKfM",
                    "timestamp": 1584449213896
                  }
                ]

The records are sorted in ascending order according to timestamp.

Eddystone TLM

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

The records are sorted in ascending order according to timestamp.