Skip to content

Location Engine Setup

Location Engine is a tool for monitoring for presence of items represented by Bluetooth beacons. It allows to take advantage of beacons without relying on mobile apps installed on devices you don't control.

Prerequisites

Location Engine depends on several components:

  • Kontakt.io Gateway GW16-2 - it's a scanner that detects presence of BLE devices, like Kontakt.io beacons, through monitoring their Bluetooth Advertising Packets.
  • Beacons - they usually represent different types of items that are relevant to your use case, e.g. you can use Tough Beacons attached to tools and machinery in factories, to monitor their location, or distribute Card Beacons among office employees to use as employee badges and track their work time.
  • Kontakt.io Panel account - it's a place from where you can manage your Kontakt.io devices and set up an infrastructure for your beacon deployment.

Gateways GW16-2 are available for order in Kontakt.io Web Store. Additionally, we're working in cooperation with major WiFi access point vendors like Ruckus and Cassia to integrate their devices with Location Engine. Please stay tune for future announcements regarding these integrations.

You need Kontakt.io Panel account to get the API Key and set up your Location Engine infrastructure. Instructions for setting up a new Web Panel account and finding your API Key are available in our Support Center.

Subscription

In order to take advantage of Kontakt.io Location Engine, beacons assigned to your account have to have Location Engine subscription. Without it Location Engine Data Streams won't contain any data.

Setup

As of Spring 2018 Location Engine does not require any specific operations to make it work. As long as you have a Gateway GW16-2 assigned to your account together with Kontakt.io beacons with Location Engine subscription, you are ready to start monitoring the data collected by Gateways.

The only exception is bundling Presence data from multiple Gateways GW16-2 into a single stream - in this case you need to assign them to a single Venue (Location). This process is described below.

Creating a Venue (Location)

Venues (called Locations in Kontakt.io Panel) represent groups of devices that are related to each other. Location Engine uses this structure group Presence streams from multiple Gateways.

In order to create a Venue (Location) use the POST /venue/create endpoint:

curl -X "POST" "https://api.kontakt.io/venue/create" \
     -H "Api-Key: YourSuperSecretAPIKey" \
     -H "Accept: application/vnd.com.kontakt+json;version=10" \
     -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" \
     --data-urlencode "name=Test venue" \
     --data-urlencode "description=Test venue for Location Engine"

Once you have a Venue (Location), assign at least one Gateway using the POST /device/assign endpoint:

curl -X "POST" "https://api.kontakt.io/device/assign" \
     -H "Api-Key: YourSuperSecretAPIKey" \
     -H "Accept: application/vnd.com.kontakt+json;version=10" \
     -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" \
     --data-urlencode "venueId=ba6b38c9-330b-4ab2-90e4-9baa7bb5e5c8" \
     --data-urlencode "uniqueId=abcde,asdfg,zxcvb,xyz45"

This way allows for using the /stream/:venueId/presence topic in WebSocket Data Streams, giving you data from all Gateway assigned to that Venue (Location). Please keep in mind that you can always use Presence streams from a single Gateway even if it's assigned to a Venue (Location).