In this documentation the JSON API structure is described.
Software version: 3.0.4.4.
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:
blukii Hub
Serial number: hubAEB6DC04
IP address in local network: 192.168.178.41
blukii Smart Beacon
blukii_address: 04EE03DBD02B
Frames iBeacon, Eddystone UID, Eddystone TLM and Device Tracing enabled
blukii Sensor Beacon
blukii_address: CC78AB5E7627
all sensor readings are sent
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:
macAddress: MAC Address of the blukii.
rssi: Returns a list of records with information about the Bluetooth connection.
Depending on the configuration and hardware variant of the blukii, the following parts may be added:
beaconSensorData: Returns a list of data with magnetism, acceleration and/or environment data.
iBeaconData: Returns a list of datasets with the iBeacon Data such as UUID, Major, Minor and measured Power.
eddystoneUID: Returns a list of datasets with uidNamespace and uidInstance.
eddystoneTLM: Returns a list of datasets with the Eddystone TLM data.
"macAddress": "CC78AB5E7627",
"blukiiId": "blukii BXXXXX CC78AB5E7627",
"type": "SENSOR_BEACON",
"batteryPct": 100,
"batteryMV": 3363,
"activeTime": 236,
"advInterval": 400,
"firmware": "003.011",
"timestamp": 1657898818128,
macAddress: Bluetooth MAC address of the current blukii. This field is always available.
blukiiId: blukii Id of the current blukii. This field is always available.
type: The type of the blukii Beacon. Valid values: “SENSOR_BEACON” and “SMART_BEACON”. If this field is not defined, the type is “SMART_BEACON”.
batteryPct: Battery state of the last received Frame. Value is in [%]. This field is only included, when it was received.
batteryMV: Battery state of the last received Frame. Value is in milli volts (mV). This field is only included, when it was received.
activeTime: Active life time since last startup. Value is in seconds. This field is only included, when it was received.
advInterval: Advertising interval of the Beacon. This field is only included, when it was received.
firmware: Firmware version of the beacon. This field is only included, when it was received.
timestamp: UTC timestamp in milliseconds of the last received frame. This field is always available.
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
}
],
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
rssi: RSSI measured value in [dBm].
The records are sorted in ascending order according to timestamp.
"beaconSensorData": [
"magnetism": [ ... ],
"acceleration": [ ... ],
"environment": [ ... ]
]
Entries that are available depending on the configuration of the blukiis:
magnetism: Returns a list of data sets with measured values of the magnetic sensor.
acceleration: Returns a list of data records with measured values of the acceleration sensor.
environment: Returns a list of datasets with environmental metrics such as barometric pressure, light, humidity, and temperature.
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
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
x: Magnetic flux density through the X-axis of the sensor in [mGauss].
y: Magnetic flux density through the Y-axis of the sensor in [mGauss].
z: Magnetic flux density through the Z-axis of the sensor in [mGauss].
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
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
x: acceleration in the X direction in [mg].
y: acceleration in the Y direction in [mg].
z: acceleration in the Z direction in [mg].
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
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
airPressure: air pressure in [hPa].
light: Illuminance in [lux].
humidity: Humidity in [%].
temperature: temperature in [°C].
The records are sorted in ascending order according to timestamp.
"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
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
uuid: The uuid of the iBeacon frame.
major: Major value of the iBeacon frame.
minor: Minor value of the iBeacon frame.
measuredPower: Measured power value of the iBeacon frame.
The records are sorted in ascending order according to timestamp.
"eddystoneUID": [
{
"uidNamespace": "F7826DA6BC5B71E0893E",
"uidInstance": "7A6C4E51414E",
"timestamp": 1657898818334
},
{
"uidNamespace": "F7826DA6BC5B71E0893E",
"uidInstance": "7A6C4E51414E",
"timestamp": 1657898818650
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
uidNamespace: The 10-byte Namespace ID of the beacon.
uidInstance: The 6-byte Instance ID of the beacon.
The records are sorted in ascending order according to timestamp.
"eddystoneTLM": [
{
"batteryMV": 3000,
"temperature": 22.5,
"packets": 38589588,
"activeTime": 40501320,
"timestamp": 1584449212283
},
{
"batteryMV": 3000,
"temperature": 22.5,
"packets": 38589589,
"activeTime": 40501320,
"timestamp": 1584449212392
}
]
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
batteryMV: The current battery voltage in [mV].
temperature: The beacon temperature in [°C].
packets: Count of advertised frames.
activeTime: Time since powered on or reboot in seconds.
The records are sorted in ascending order according to timestamp.
"deviceTracing": {
"id": 13,
"devices": [
{
"id": 11,
"rssi": -45,
"timestamp": 1657898818863
},
{
"id": 10,
"rssi": -45,
"timestamp": 1657898818863
},
{
"id": 3,
"rssi": -59,
"timestamp": 1657898818863
}
]
}
id: Device tracing id of the current blukii (inherited from iBeacon minor value).
devices: List of other devices, that was received by blukii scan.
devices.id: Device tracing id of the received blukii (inherited from iBeacon minor value).
devices.rssi: RSSI measured value in [dBm] of the received blukii (inherited from iBeacon minor value).
devices.timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
The records are sorted in ascending order according to timestamp.