sigfox-iot-ubidots is a
adapter for integrating Sigfox devices with Ubidots.
sigfox-gcloud-ubidots you may process and render sensor
data from your Sigfox devices in real time, through the
Ubidots and AWS IoT platforms. You may also configure
Ubidots alerts to notify you via email and SMS based on
the sensor data received.
sigfox-aws is an open-source software framework for building a
Sigfox server with AWS IoT. Check out
Installation for AWS
See instructions at:
To send messages from a Sigfox device into Ubidots, you may use this Arduino sketch:
The sketch sends 3 field names and field values, packed into a Structured Message:
ctr - message counter lig - light level, based on the Grove analog light sensor tmp - module temperature, based on the Sigfox module's embedded temperature sensor
In Ubidots, create the Devices / Datasources for each Sigfox device to be integrated with Ubidots. Name the device / datasource using this format: (change
2C30EBto your Sigfox device ID)
Sigfox Device 2C30EB
For each Ubidots device / datasource, create the Variables that will be used to transmit sensor values from the Sigfox device to Ubidots. For the above example, you may create 3 variables
ctr, lig, tmpfor the Ubidots device
Sigfox Device 2C30EB.
Run the above Arduino-Sigfox sketch and the sensor values will be automatically recorded by Ubidots under
Sigfox Device 2C30EB.
Alternatively, you may test by sending a Sigfox message from your Sigfox device with the
datafield set to:
We may also use a URL testing tool like Postman to send a POST request to the
application/json. If you're using Postman, click
JSON (application/json)Set the body to:
deviceis your Sigfox device ID.
Here's the request in Postman:
The response from the callback function should look like this:
The test message sent above will be decoded and sent to Ubidots as
ctr (counter): 13 lig (light level): 760 tmp (temperature): 29
For instructions on creating the Ubidots devices and variables, check the UnaShield Tutorial for Ubidots:
Sending latitude-longitude values to Ubidots
Some Sigfox devices transmit location data in the form of latitude-longitude values, such as GPS trackers. Ubidots is capable of rendering such data points into a map, but under these conditions:
- The field names must be
- The fields must appear in the Context Field of the variable to be rendered.
Suppose your GPS tracker transmits latitude, longitude as well as temperature.
Then Ubidots expects the
lng fields to be present in the context
whenever the temperature value is transmitted to Ubidots.
sendToUbidots Lambda Function can be configured to send any latitude-longitude fields
lng. Set the environment variables for the
sendToUbidots Lambda Function as follows:
sendToUbidots to look for any data fields named
deviceLng, and if found, duplicate the fields as
Create variables named
lng for your Sigfox Device in Ubidots.
If your GPS tracker sends the fields
they will be rendered correctly in a Ubidots map, like below.
Multiple latitude-longitude field names may be specified like this:
In the example above,
sendToUbidots searches for the fields
If the fields are not found, then it searches for
Sending Sigfox Geolocation data to Ubidots
Sigfox Geolocation is an optional service provided by your Sigfox Operator that locates your Sigfox device by using the Sigfox network signal data. The latitude-longitude data provided through this service may be rendered in Ubidots by setting the GEOLOC Callback as follows:
Log on to the Sigfox Backend
Click "Device Type" at the top menu.
Click on your device type.
Click "Callbacks" in the left menu.
Click "New" at top right.
Enter the callback details as follows:
sigfoxCallbackURL from your
Use HTTP Method:
Set the Body as:
Note that the Sigfox Geolocation latitude and longitude fields will be transmitted as
geolocLngwith the above settings
Note that this is a different callback from the Data Callback that we use for normal Sigfox messages.
After saving the callback you should see the Sigfox Geolocation callback
appear under the
SERVICE Callbacks section, not
Follow the instructions in the previous section to set the
sendToUbidots Lambda Function environment variables:
NODE_ENV=production AUTOINSTALL_DEPENDENCY=sigfox-iot-ubidots UBIDOTS_API_KEY=Your Ubidots API key LAT_FIELDS=deviceLat,geolocLat LNG_FIELDS=deviceLng,geolocLng
Create variables named
geolocLng for your Sigfox Device in Ubidots.
To verify that the Sigfox Geolocation data is transmitted correctly,
click on the variable
geolocLat for your Sigfox Device.
You'll see that the
lat field in the
Context column shows the same value
geolocLat field in the left column. Which means that
has correctly copied the
geolocLat field into
Check the same for
Now that the
lng fields are properly populated, we will see the
Sigfox Geolocation points on the Ubidots map.