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 on the backend.sigfox.com side:

  1. In Device Type select your device name and then Callbacks in right column. Create new (top right):

Headers:

  • Authentication:

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 responses are currently based on the status variable, because it can be easily set and edited using Status Transformer. 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