Skip to content
Matej Sychra edited this page Apr 23, 2018 · 15 revisions

# THiNX SigFox Integration

Shared Callback Setting

For both downlink and uplink callbacks, there's shared part of configuration:

  1. On the https://backend.sigfox.com open Device Type, select your device name and then Callbacks in right column.

  2. Create new callback (the button is hidden in top right corner) with following options:

  • Type: DATA and UPLINK for basic Registration, BIDIR for Downlink request
  • Channel: URL
  • Url pattern: https://thinx.cloud:7443/device/register
  • HTTP Method: POST

Headers:

  • Authentication: <enter API Key generated in thinx.cloud settings>

Content-type:

  • application/json

Set this callback on developer.sigfox.com.

Uplink

  • Change owner to your Owner ID, you'll find this in User Profile page.
{
	"registration": {
		"mac": "SIGFOX{device}",
		"status": "{data}",
		"firmware": "Sigfox",
		"version": "1.0.0",
		"alias": "{device}",
		"owner": "<enter-your-owner-id>",
		"platform": "sigfox",
		"snr": "{snr}",
		"rssi": "{rssi}",
		"station": "{station}",
		"lat": "{lat}",
		"lon": "{lng}"
	}
}

Downlink

  • Change owner to your Owner ID, you'll find this in User Profile page.

Downlink callback is identified by the ack: true key. Responses are currently based on the status variable, because it can be easily set and edited using Status Transformer. In case you have better idea like holding separate binary status or downlink specific variable, please file a ticket.

Point the downlink HTTP POST callback from backend.sigox.com with following payload:

{
  "registration": {
    "mac": "SIGFOX{device}",
    "firmware": "Sigfox",
    "version": "1.0.0",
    "alias": "{device}",
    "owner": "<enter-your-owner-id>",
    "platform": "sigfox",
    "snr": "{snr}",
    "rssi": "{rssi}",
    "station": "{station}",
    "lat": "{lat}",
    "lon": "{lng}",
    "ack": "{ack}"
  }
}

To send some data to your SigFox when requested, store it in your device.status variable using Status Transformer, e.g.

//
// Sample SigFox Downlink Transformer
//

var transformer = function(status, device) {
    return "87654321";
};

This will generate following response to the SigFox backend:

{"deviceId":"36B854","downlinkData":"87654321"}
Clone this wiki locally