How to Convert a Single Sigfox Event into Multiple Events

Hi All, If you're familiar with Sigfox, you'll know that one of the ways it stays at such a low data and power usage is by keeping the message payloads really small (12 bytes to be exact). Because of this, lots of different information is stored within one message e.g. Payload of '112233' (3 bytes in hex format) where '11' is temperature, '22' is humidity and '33' is air pressure.

To make this useful in an application environment, we need a way to easily split the data and use it in a nice, clean, easy to read format.

This tutorial will show you how to take a Sigfox message and split it up into multiple events. If you haven't already, we recommend trying this tutorial first How to setup Sigfox callbacks in the Wia dashboard.

Create a Flow

Go to Flows and click on the '+' symbol above the search bar. The panel below will appear. Type in the name of your Flow and select 'Event' as the type.

Screen Shot 2017-03-13 at 16.30.55

Setup Flow Conditions

The only condition we want to set is the name of the Event. Put this in as sigfoxDataUplink (or whichever name you have chosen in your callback).

Screen Shot 2017-03-13 at 16.30.59

Choose Flow Action Service and Function

Choose Wia as the action service for the Flow and Create New Event as the function

Screen Shot 2017-03-13 at 16.30.46

Screen Shot 2017-03-13 at 16.31.05

Set Action Parameters

Here we choose the name of the new event that will be created when a Sigfox message is sent through. For our example, we have set this to temperature. At this point, you can also inject your own Javascript. We're just going to take the first two bytes and have them represent our temperature. You can also convert hex into an integer or another format. All standard Javascript functions and data types can be used.

Screen Shot 2017-03-13 at 16.31.30

Add Flow to Product

You will now see your newly created Flow. Whilst in the panel, click on the Products tab. Screen Shot 2017-03-13 at 17.00.01

Then Add Product to Flow to show the panel below. Add the Products you want this Flow to apply to.

Screen Shot 2017-03-13 at 16.31.50

Send Data from Sigfox Device

Now send data from a Sigfox enabled device and you should see the additional Event being created as per the screenshot below. Repeat these steps for as many different Events as you wish.

Screen Shot 2017-03-13 at 16.32.17

That's all folks!


Ready to get started?
Talk to our sales team or setup an account.