The mc-Demo205 is a powerful IoT device, which combines SIGFOX™, GNSS, and the new mcAir protocol into one device. Following this guide you will be able to get start with your mc-Demo205 and Ubidots in just a couple of minutes, so let's get started!
Select the country of your device's location and add the Sigfox ID (device ID)and the Sigfox PAC where is indicated.
To confirm your device is registered - select the "Device Type" section from the Sigfox backend to find your device.
Pro Tip: Instead of activating through the kit page, you can go to "Devices" section, then press "new" to create a new device. From here, assign the parameters required such as Device ID, PAC, and the account information.
FAQs and Troubleshooting: If you receive any issue during the activation process, contact Sigfox Support, and a specialist will assist you through the configuration process.
Setting up the Sigfox callback to the Ubidots Cloud
The management of the data between Sigfox and Ubidots requires a "Callback". The mcDemo device will read the sensors and send the values to Sigfox where the messages will be decoded using the custom payload config and then relayed to Ubidots for visualization, computation, and storage.
Now it's time to set up the callback.
Go to the Device section and click on the registered device:
Next, verify your device information and select "CALLBACKS" from the menu on the left of the page, as you can see below:
Sigfox callbacks allow you to report data to an external system like Ubidots. To setup a callback to Ubidots API, use these parameters:
IMPORTANT NOTE: The field "custom payload config" allows you to specify how you would like Sigfox to decode your device's payload. You might, for example, wish to decode an incoming byte as an unsigned integer. An example of this is the first line of the sample below where "int1" is the name of the value and "uint:8" specifies the datatype and the number of bits, respectively.
int1::uint:8 // Unsigned integer of 8 bits with name int1
str::char:6 // Character String of 6 letters with name str
b1::bool:7 // Boolean based on value of bit in position 7 with name b1
To learn more about how to build the custom payload config, please reference to the Sigfox documentation by pressing the question icon in the upper right of the displayed page.
IMPORTANT DEPLOYMENT NOTE: Ubidots and Sigfox communicate via either URL or Batch URL (used for large deployments). This tutorial explains the standard URL channel. If you have a large scale sensor network, please contact email@example.com to receive additional information for Batch URL integrations.
The Sigfox payload will decode the message and then relay the data to Ubidots via the callback. Note that you must set the same format for your device's code as what is in Sigfox and if not, the data will not be received by Sigfox. To verify if the message is received by Sigfox go to the Device section, then select the device's ID:
To verify the data is being received, click "message" from the left-hand pane to visualize the messages received:
Please note the "customData#..." from the body field will contain the actual location information. In this example we will see "lat" and "lng". If you desire to send more values, you must to assign these data points as part of the custom payload config, then assign it at the body following the same structure.
Within this guide, we configured two variables "lat" and "lng" as float values; You can use any format that you desire but please note that the device has to send the values using the same format assigned by you at the custom payload config. And this payload must also match the code uploaded to the device.