Skip to content

Location Engine Data Streams

Location Engine data is collected by Kontakt.io Gateways, and then forwarded to Location Engine. Location Engine provides access to this data in form of live WebSocket and MQTT streams. The data on these streams is identical, it's just a matter of preference what technology is used on the client side.

The Presence stream returns data about beacons detected by a single or a group of Gateways.

Each Telemetry stream is identified by it's topic, which is constructed using this schema: /stream/:uniqueId/:streamType. :uniqueId should be replaced with an actual Unique ID of a beacon with Kontakt.io Telemetry Frame enabled and the :streamType takes one of four values: health, accelerometer, sensor or button.

Presence

  • /presence/stream/:receiverId – for data from a single Gateway
  • /stream/:venueId/presence – for data from all Gateways assigned to a single Location (Venue)
[
    {
        "timestamp": 1518074427,
        "sourceId": "zYwiz",
        "trackingId": "JPjL",
        "rssi": -101,
        "proximity": "FAR",
        "scanType": "BLE",
        "deviceAddress": "f2:54:3e:76:5a:6e"
    },
    {
        "timestamp": 1518074426,
        "sourceId": "zYwiz",
        "trackingId": "03:97:15:87:ac:d7",
        "rssi": -79,
        "proximity": "NEAR",
        "scanType": "BLE",
        "deviceAddress": "03:97:15:87:ac:d7"
    }
]
Key Value
timestamp Unix epoch timestamp of the scan
sourceId ID of the Gateway that has made the scan
trackingId ID of the detected device - Unique ID, if it's a Kontakt.io beacon or MAC address, for all other type of devices
rssi RSSI in dBm
proximity Estimated proximity zone. Possible values are IMMEDIATE, NEAR and FAR.
scanType Type of radio used for the scan. Possible values are BLE and WIFI.
deviceAddress MAC address of the detected device

Telemetry

/stream/:uniqueId/health

Data about beacon's battery life and RTC.

{
    "deviceUtcTime": 1503297853,
    "batteryLevel": 56,
    "externalPower": false,
    "sourceId": "GTw1a"
}
Key Value
deviceUtcTime Unix Epoch timestamp generated by beacon's RTC.
batteryLevel Estimated percentage of remaining battery power. null if externalPower is true.
externalPower Boolean indicating whether a beacon is powered via external source (true) or internal batteries (false).
sourceId Unique ID of a Gateway that has detected the Telemetry data.

/stream/:uniqueId/accelerometer

Information about raw accelerometer readings and accelerometer-based events.

{
    "sensitivity": 16,
    "x": 0,
    "y": -30,
    "z": 5,
    "lastDoubleTap": 120,
    "lastThreshold": 15,
    "sourceId": "GTw1a"
}
Key Value
sensitivity Accelerometer's sensitivity setting (in mg).
x Acceleration value on X axis (in units defined by sensitivity, more information here).
y Acceleration value on Y axis (in units defined by sensitivity, more information here).
z Acceleration value on Z axis (in units defined by sensitivity, more information here).
lastDoubleTap Number of seconds since the last Double Tap Event. Possible values are in range from 0 to 65535. Value 65535 means that Double Tap detection is either disabled or this type of event hasn't occurred yet.
lastThreshold Number of seconds since the last Movement (either Basic or Free Fall) Event. Possible values are in range from 0 to 65535. Value 65535 means that Movement detection is either disabled or this type of event hasn't occurred yet.
sourceId Unique ID of a Gateway that has detected the accelerometer data.

/stream/:uniqueId/sensor

Readings from sensors other than the accelerometer.

{
    "lightLevel": 56,
    "temperature": 26,
    "sourceId": "GTw1a"
}
Key Value
lightLevel Brightness level. Possible values are in range from 0 to 100. Value 255 means a beacon is not equipped with a light level sensor.
temperature Temperature in °C.
sourceId Unique ID of a Gateway that has detected the sensor data.

/stream/:uniqueId/button

Information about button press events from button-equipped beacons.

{
    "sourceId": "GTw1a",
    "lastSingleClick": 26
}
Key Value
sourceId Unique ID of a Gateway that has detected the button press event.
lastSingleClick Number of seconds since the the button press event.