Connect a Sigfox IoT device to the Microsoft Azure IoT Hub

Connect a Sigfox IoT device to  the Microsoft Azure IoT Hub

Since this week I have a Arduino Sigfox Snootlab IoT device connected to the ‘real’ Sigfox Backend system.(before I used an other backend system of Snootlab). With a device like this you can monitor anywhere in the Netherlands (IoT network) for example if a trashcan is full or not.

One of the reasons for doing this move to the Sigfox Backend system, is that I want to have an integration between the Sigfox IoT network and the Microsoft Azure IoT Hub. The Azure IoT Hub that we are using a lot in our IoT projects at Winvision. Since a couple of weeks Sigfox has a ‘connector’ to connect your IoT device to the Microsoft Azure IoT hub, and it’s really simple. In this small tutorial I will explain how it works.

First of all, if you are using the Akene board(like below) with Arduino, here you can find the library for the board.

Sigfox Akene Arduino board
Sigfox Akene Arduino board

First of all go to the Sigfox backend:

Here you see all your Sigfox connected devices. Click on the name to get the details of the device.

SigFoxDeviceListScreen1
Devicelist in Sigfox Backend

On the right top you can find a New button, where you can create a new callback to another system.

BackEndSigfoxDeviceDetailsScreen1

Select the Microsoft Azure IoT Hub

BackEndSigfoxDeviceDetailsIoTHub
Select Azure IoT Hub

After selecting the Microsoft Azure IoT hub you get in the screen where you only need to fill two configurations items(and that’s it!)

BackEndSigfoxDeviceDetailsIoTHubDetails
Configuration screen of the Microsoft Azure IoT Hub

You need to fill in the Connection string of your IoT Hub (you can find this in de Microsoft Azure Portal) I choose the iothubowner connection string.

After that you need a JSON body for receiving the right data (and you can use off course use your custom data)

{
“device” : “{device}”,
“data” : “{data}”,
“time” : {time},
“duplicate” : {duplicate},
“snr” : {snr},
“station” : “{station}”,
“avgSignal” : {avgSnr},
“lat” : {lat},
“lng” : {lng},
“rssi” : {rssi},
“seqNumber” : {seqNumber}
}

Click save and that’s it 🙂 !

Turn your Arduino device on and it will send the data to Sigfox and Sigfxo will send it to the Microsoft Azure IoT Hub.

To test if your data is received by the Azure IoT Hubyou can off course use Azure Stream Analytics with Microsoft Power BI. But for this post I just use the Iot-hub Explorer

With this tool you can see the messages that the Microsoft Azure IoT Hub is receiving in realtime.

Below you see the data of my device 77D3C on the Microsoft Azure IoT Hub. I have made the keys red. And it’s working!

iothubexplorer4
IoT Hub Explorer screen

Afer all Sigfox made it really SIMPLE to connect you Sigfox IoT device to the Microsoft Azure IoT Hub!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s