Thingsboard IoT Gateway

Integrate legacy and third-party systems with Thingsboard platform using IoT Gateway.
Open documentation for releases before 1.3

Sigfox IoT Extension Configuration

This guide will help you to get familiar with Sigfox extension configuration for Thingsboard IoT Gateway. Use general configuration to enable this extension. We will describe extension configuration file below.

Extension configuration: sigfox-config.json

Extension configuration is a JSON file that contain information about how to map incoming HTTP request based on Sigfox Device Type Id. The root JSON element should contain “deviceTypeConfigurations” array. Each configuration consists of device type id, security token and converter:

Basic connection properties

Property Description Default Value
deviceTypeId Your Sigfox device type id none
token Your security token that need to be present in “Authorization” header none
converter Describes how to convert incoming JSON to attribute and telemetry updates none

For Example:

{
  "deviceTypeConfigurations": [
    {
      "deviceTypeId": "YOUR_DEVICE_TYPE_ID",
      "token": "SECURITY_TOKEN",
      "converter": {
        ...
      }
    }
  ]
}

Sigfox converter

This section will describe various configuration options that allow to specify mapping between Thingsboard features and Sigfox device data.

Attributes & Timeseries data upload

The “converter” configuration setup rules of MQTT topics monitoring and data conversion to Thingsboard Key-Value format. For example:

{
...
      "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"
            }
          }
        ]
      }
...      
}

Each message that is published to this topic by other devices or applications is analyzed to extract device name and device data (attributes or timeseries values). The Json converter is based on JsonPath library to provide ability of flexible mapping and filtering of JSON structures. You can define filterExpression based on the path examples.

The deviceNameJsonExpression mapping parameter is used to extract device name from the incoming JSON message.

For example, if you have following message:

{"serialNumber":"SN-001", "model":"T1000", "temperature":36.6}

The ”${$.serialNumber}” expression will return “SN-001” device name. Similar, “Device ${$.serialNumber} (${$.model})” will return “Device SN-001 (T1000)” device name.

Similar JsonPath mapping rules are applied for attributes and timeseries values:

As a gateway developer, you are able to fork and add custom transformers using following interface. Feel free to submit PRs with your custom transformer implementations if you believe that they may be useful for Thingsboard community.

Next steps

Explore examples:

Explore guides related to main Thingsboard features: