This is Part II of a two parts tutorial covering the integration of Beebotte with Sigfox IoT network.
In Part I, we presented how to connect Beebotte to Sigfox platform
to collect sensor data and present it in a visual a dashboard. In this tutorial, we will show how to use Atlas
, Sigfox's Geolocation service, to track the location of a device with Beebotte.
Atlas
is a simple, cost effective GPS free geolocation service offered by Sigfox. It estimates the location of a device using the signal quality of received messages. This location estimation can be made available through callbacks configured on Sigfox backend.
In this tutorial, we will update the channel created in Part I by adding location
resource to hold the GPS estimated coordinates of the device. We will then configure a service callback
on Sigfox backend to forward geolocation data to Beebotte. Last but not least, we will add a google maps widget to the dashboard to location the device location on a map.
This tutorial assumes that you have successfully registered
to Beebotte and obtained your API and Secret keys
.
In Part I, we have created a channel with two resources for sensor data. We will use the same channel to add a new resource: position
with type set to GPS
. GPS type resource in Beebotte includes the location longitude
and latitude
coordinates and optional location precision
(also called location uncertainty) in meters. In Sigfox terminology, the geolocation precision is called radius
.
In your account home page, navigate to the corresponding channel, click on channel settings crog then click on Edit Channel
to add the resource.
Now your channel is ready to receive geolocation data.
Now let's move to Sigfox backend.
New
then select Custom Callback
If your Sigfox contract includes GeoLocation, you'll see computedLocation
in additional body variables of the callback. In this case, configure the callback as follows:
Service
- Data Advanced
URL
https://api.beebotte.com/v1/integration/sigfox/data
POST
X-Auth-Token
header and set its value to an IAM Token
with data write access. If you have only one device under the device type, you can use the Channel Token
.application/json
resources
must match those of the corresponding Beebotte channel. In this case, we will post data to newly added position
resource.{ "device": "{device}", "time": {time}, "resources": { "position": {computedLocation} } }
When Sigfox calls the callback, Beebotte will automatically convert the computedLocation
object to Beebotte GPS data type.
Congratulations!!! Your Sigfox account is now configured to transfer geolocation data to Beebotte whenever your device transmits a message.
Lets update the dashboard now to show the device location on a Google Maps chart.
In your account page, goto My Dashboards
, locate the dashboard you created in Part I and click Edit Dashboard
. From Add Widget
list, select Google Maps
and indicate the channel and resource where data will be read from. Voilà.
In this tutorial we learned how to use Sigfox Geolocaion service to track device location with Beebotte.