In this documentation the JSON API structure 1.0 is described.
Last modified for version: 3.0.5.3.
The hub expects the following response data, if the server accepts the JSON data structure.
Response status codes: 200, 202, 204, 302
Response content: JSON string, if no content should be sent to Hub, then “{}” is expected
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, Device Tracing and Special Frame 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
},
{
"rssi": -58,
"timestamp": 1657898818955
}
],
"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
}
]
},
"SpecialFrame": [
{
"type": 2,
"timestamp": 1657898818955,
"data": "0100000000000000010080"
}
]
},
{
"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.
deviceTracing: Returns a list of datasets with the Device Tracing data.
SpecialFrame: Returns a list of datasets with the Special Frame 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.
"SpecialFrame": [
{
"type": 2,
"timestamp": 1714730342847,
"data": "0100000000000000010080"
},
{
"type": 2,
"timestamp": 1714730343460,
"data": "0100000000000000010080"
},
{
"type": 2,
"timestamp": 1714730344066,
"data": "0100000000000000010080"
}
]
type: Special Frame type index.
data: Byte record of frame content.
timestamp: Time of data acquisition in the form of a Unix timestamp in milliseconds.
The records are sorted in ascending order according to timestamp.