Sigfox is a relative new low cost wireless network technology that requires low power to connect, and that is implemented by lost cost hardware modules. Although they are limited in terms of size of messages (12 bytes maximum) and the frequency that the devices can send out data (140 times a day), several new applications can be achieved with Sigfox. More information about how Sigfox works can be found here

Tago is ready to receive data from Sigfox modules. There are three types of interface methods used between Tago and Sigfox services. Uplink is the process to send data from the modules to Tago. Downlink is used to send data back to the module every time it checks in – the data to be sent down should be ready prior the check-in. And the last method, is the Error, that informs when there is a communication loss for any Sigfox module.

Adding your own Sigfox module to Tago is very easy to be accomplished; just follow the steps described below to setup the configurations at the Sigfox Portal (Sigfox Cloud) and the Tago Admin.

Uplink

You need to prepare the uplink in order to send data from you Sigfox module to Tago. The uplink configuration will be separated into two parts: Tago configuration using Tago Admin, and (2) Sigfoxconfiguration using the Sigfox Portal.

Tago setup

In your account, you need to create a Device, and a Device-Token defined to receive data from the Sigfox portal.

Sign in your account at Tago, and follow these steps:

1. Click on Device button.

2. Click on “+” button, to create a new device.

3. Enter a name for your device and after click on Save button.

4. Click on Tokens tab.

5. Create a new Token to your device, with Sigfox credentials.

On tab Tokens follow these steps:A. Leave the default options for Token name, Permission and Experation;B. In the Serial number field enter the ID of your Sigfox device. To get this ID, go to the Sigfox portal > Device-Type > Select your device on list > Associated Devices. A screen will appear as below. Copy the id and paste it into the Serial number field at Tago;

C. On the field Verification-code, enter “sigfox-your_company_name”. You can use whatever text in ‘your_company_name’, as long as you leave the first part as “sigfox-”;D. Click on Generate button.

Sigfox Setup

On the Sigfox Portal side, you need to create a callback type uplink.

Sign in your Sigfox account, and follow these steps

1. Click on Device Type

2. After clicking Device type, the list of your devices will appear, choose one.

3. Click in Callback button.

4. Click New button.

5. Select the option Custom callback.

6. Configure the uplink.


CALLBACK CONFIGURATION

Type - DATA & UPLINKChannel - URLMethod - POSTContent-type - application/jsonURL pattern - https://sigfox.middleware.tago.io/uplink

HEADERS

Select the options according to the image in the configuration of the headers, in the field device is its value is filled with {device}, this is used to get your id and use in sending request. This feature is also used in the body, to more know, click here. In the Verification-code field, use the value you put when you created the token for the Tago device, but here you should remove the “sigfox-” part from the text. Just enter the ‘your_company_name’ part that you typed there.

BODY

In the body, the sent object is already prepared in the format that Tago accepts. To know more about sending data to Tago, click here. Copy and paste the JSON text below to the body. This JSON will take care of the parse to prepare the data coming from your Sigfox module to Tago.

[{
"variable": "device",
"value": "{device}",
"serie": "{time}"
},{
"variable": "duplicate",
"value": "{duplicate}",
"serie": "{time}"
},{
"variable": "snr",
"value": "{snr}",
"serie": "{time}"
},{
"variable": "rssi",
"value": "{rssi}",
"serie": "{time}"
},{
"variable": "avgSnr",
"value": "{avgSnr}",
"serie":"{time}"
},{
"variable": "station",
"value": "{station}",
"serie": "{time}"
},{
"variable": "data",
"value": "{data}",
"serie": "{time}"
},{
"variable": "seqNumber",
"value": "{seqNumber}",
"serie": "{time}"
},{
"variable": "location",
"serie": "{time}"
}]

Downlink

The downlink serves to send responses from Tago to Sigfox, ensuring that the data transition is working correctly. The downlink configuration will be separated into two parts: Tago configuration using Tago Admin, and (2) Sigfox configuration using the Sigfox Portal.

Tago setup

1. In the device we just created for the uplink, go to it and click on the tab Configuration parameters.

2. Create a parameter to your device.A. In Key of the parameter, you should always put “downlinkData”;B. The message in Value must contain up to 8 bytes;C. Click on Save button.


Sigfox setup

Go to the sigfox portal and perform the following steps:

1. Click on Device Type

2. After clicking Device type, the list of your devices will appear in Sigfox, choose one.

3. Click in Callback button.

4. Click New button.

5. Select the option Custom callback.

6. Configure the downlink.


CALLBACK CONFIGURATION

Type - DATA & BIDIRChannel - URLMethod - POSTContent-type - application/jsonURL pattern - https://sigfox.middleware.tago.io/downlink

HEADERS

Select the options according to the image. In the configuration of the headers, in the field device is its value is filled with {device}, this is used to get your id and use in the request. This feature is also used in the body, to more know, click here.

The Verification-code It should be the value you put when creating the token in the Tago device, but here you should not have the “sigfox-”. Just the name that you put.

BODY

In body the sent object is already in the ideal format for Tago. To know more about sending data to Tago, click here.

The JSON that is in the body of our example is this.

[{
"variable": "device",
"value": "{device}",
"serie": "{time}"
},{
"variable": "duplicate",
"value": "{duplicate}",
"serie": "{time}"
},{
"variable": "snr",
"value": "{snr}",
"serie": "{time}"
},{
"variable": "rssi",
"value": "{rssi}",
"serie": "{time}"
},{
"variable": "avgSnr",
"value": "{avgSnr}",
"serie":"{time}"
},{
"variable": "station",
"value": "{station}",
"serie": "{time}"
},{
"variable": "data",
"value": "{data}",
"serie": "{time}"
},{
"variable": "seqNumber",
"value": "{seqNumber}",
"serie": "{time}"
},{
"variable": "location",
"serie": "{time}"
}]

EXTRA

Make sure that the following configurations are done as showed below:

1. In the sigfox portal, select the device that you have configured the downlink > Information > Edit;

2. Check the configuration of your device, see if it is the same as the image below.