ThingsBoard Documentation

Documentation for using ThingsBoard IoT Platform.
Open documentation for releases before 1.3

SigFox IoT data collection and visualization

Overview

Sigfox gateway integration

Sigfox is low-cost, low energy consumption connectivity solution that allows collecting a relatively small amount of data from your IoT devices. Sigfox Backend allows provisioning custom callbacks and pushing data to your server applications. We will use this feature to push data to ThingsBoard IoT Gateway. The Gateway will take care of routing tasks: convert data to unified format, device provisioning, data delivery, etc. Once data is delivered to ThingsBoard we will be able to see it on advanced real-time IoT dashboards and share these IoT dashboards with end-users.

Prerequisites

NOTE: Both ThingsBoard and ThingsBoard IoT Gateway need to be installed in the cloud to be accessible by Sigfox Gateway.

Sigfox configuration steps

Let’s assume we want to publish coordinates, temperature and humidity data from your Sigfox module to ThingsBoard. In order to achieve this, you will need to select device type and configure custom callback from Sigfox Backend to our IoT Gateway.

image

Few things to notice:

Once again, we assume you have deployed the gateway on some cloud server to get the static IP address or hostname.

ThingsBoard IoT Gateway configuration steps

Step 2. Enable Sigfox extension

Navigate to gateway configuration folder and edit tb-gateway.yml file. Configuration folder location:

Windows: YOUR_INSTALL_DIR/conf
Linux: /etc/tb-gateway/conf

Change sigfox.enabled property value to true.

Step 3. Configure Sigfox extension

The sigfox-config.json contains configuration that allows mapping of JSON messages from Sigfox Backend to ThingsBoard telemetry. The default mapping listed below will allow to convert data from Sigfox Backend and publish it to ThingsBoard.

{
  "deviceTypeConfigurations": [
    {
      "deviceTypeId": "YOUR_DEVICE_TYPE_ID",
      "token": "SECURITY_TOKEN",
      "converter": {
        "deviceNameJsonExpression": "${$.device}",
        "attributes": [
          {
            "type": "string",
            "key": "lat",
            "value": "${$.lat}"
          },
          {
            "type": "string",
            "key": "lng",
            "value": "${$.lng}"
          }
        ],
        "timeseries": [
          {
            "type": "double",
            "key": "temperature",
            "value": "${$.data.temperature}",
            "transformer": {
              "type": "intToDouble"
            }
          },
          {
            "type": "double",
            "key": "humidity",
            "value": "${$.data.humidity}",
            "transformer": {
              "type": "intToDouble"
            }
          }
        ]
      }
    }
  ]
}

Few things to notice:

See Sigfox extension configuration for more details.

Step 4. Restart ThingsBoard Gateway

Restart your gateway using following commands

Windows: 
net stop tb-gateway
net start tb-gateway
Linux: 
sudo service tb-gateway restart

ThingsBoard configuration steps

Step 5. Observe Sigfox devices

Once your Sigfox Backend callback is configured, you may observe incoming messages in ThingsBoard IoT Gateway logs. If everything is configured correctly, you will see new devices in your Tenant Administrator device list.

image

You are able to open a particular device and check that telemetry values arrived successfully.

Step 6. Provision Sigfox dashboard

Download the dashboard file using this link. Use import/export instructions to import the dashboard to your ThingsBoard instance.

NOTE: During import you will need to select a device that you want to visualize.

image

Once imported, click on the dashboard card to see your device data:

image