Setting up Sigfox Callbacks

If your device is trasmitting data over the Sigfox network, you will need to set up the Sigfox callbacks to receive data from the devices. UnaConnect has multiple callbacks to allow Sigfox services to forward the data.
The first thing to know is that all callbacks are protected by a unique group token, which can be found in the Settings tab of a device group on the UnaConnect Console.

  1. On the left navigation bar in the UnaConnect Console, click on the Settings tab, and the Settings page is displayed.
  2. In the Group Information section, click on the Copy Token button to copy the token into your clipboard.
  3. Login to the Sigfox Backend with your Sigfox Backend credentials.
  4. Click on the Device Type tab on the top of the page, and enter the name of the device type then click on the Filter button.
  5. Click on the name description and click on Edit in the dropdown menu.
  6. On the left navigation bar, click on the Callbacks tab.
  7. Click on the New button on the top right corner and provide the following information according to your needs.
⚠️ For all types of callback, the HTTP method is POST. One header has to be provided: header Authorization and value Bearer TOKEN_OF_GROUP_COPIED. The content-type must be application/json ⚠️ Some variables might not be available depending on the Sigfox token, the variables that are not listed as Available variables should be removed from the body.

  • To get data into UnaConnect.
The downlink button should be selected on Sigfox backend.
Type DATA
Channel URL
Subtype BIDIR
URL Pattern https://network.unaconnect.io/sigfox/data with the following Body:
{
  "device": "{device}",
  "data": "{data}",
  "time": "{time}",
  "seqNumber": "{seqNumber}",
  "ack": "{ack}"
}

  • To know if the downlink succeed.
On Sigfox backend, only one callback can be set up as BIDIR to activate downlink callback.
Type SERVICE
Channel URL
Subtype ACKNOWLEDGE
URL Pattern https://network.unaconnect.io/sigfox/acknowledge with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "infoCode": "{infoCode}",
  "infoMessage": "{infoMessage}",
  "downlinkAck": "{downlinkAck}",
  "downlinkOverusage": "{downlinkOverusage}",
  "station": "{station}",
  "rssi": "{rssi}"
}

  • For Sigfox Atlas, this command must be set.
Type SERVICE
Channel URL
Subtype DATA_ADVANCED
URL Pattern https://network.unaconnect.io/sigfox/data-advanced with the following Body:
{
    "device": "{device}",
    "time" : "{time}",
    "seqNumber": "{seqNumber}",
    "linkQuality": "{linkQuality}",
    "fixedLat": "{fixedLat}",
    "fixedLng": "{fixedLng}",
    "operatorName": "{operatorName}",
    "countryCode": "{countryCode}",
    ⚠️ "computedLocation": {computedLocation}, ⚠️
    ⚠️ "duplicates": {duplicates} ⚠️
}
⚠️ To see telemetry data on UnaConnect, please add computedLocation and duplicates, which are only accessible if allowed by your Sigfox contract.

  • To monitor the device.
Type SERVICE
Channel URL
Subtype STATUS
URL Pattern https://network.unaconnect.io/sigfox/status with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "batt": "{batt}",
  "duplicate": "{duplicate}",
  "seqNumber": "{seqNumber}"
}

  • To monitor the device.
Type ERROR
Channel URL
URL Pattern https://network.unaconnect.io/sigfox/error with the following Body:
{
  "device": "{device}",
  "time": "{time}",
  "info": "{info}",
  "severity": "{severity}"
}

Event Type Any
Channel URL
URL Pattern https://network.unaconnect.io/sigfox/event
{
"time":"{time}",
"severity":"{severity}",
"sourceId":"{sourceId}",
"sourceType":"{sourceType}",
"eventType":"{eventType}",
"deviceMessageTime":"{deviceMessageTime}",
"contractId":"{contractId}",
"businessOperatorId":"{businessOperatorId}",
"deviceTypeId":"{deviceTypeId}",
"groupId":"{groupId}",
"subscriptionState":"{subscriptionState}"
}