-
Notifications
You must be signed in to change notification settings - Fork 10
Sigfox
Matej Sychra edited this page Apr 23, 2018
·
15 revisions
# THiNX SigFox Integration
For both downlink and uplink callbacks, there's shared part of configuration on the backend.sigfox.com side:
- In Device Type select your device name and then Callbacks in right column. Create new (top right):
- Type: Data (UPLINK for Registration, BIDIR for Downlink)
- Channel: URL
- Url pattern: https://thinx.cloud:7443/device/register
- HTTP Method: POST
Headers:
- Authentication:
Content-type:
- application/json
Set this callback on developer.sigfox.com.
- 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}"
}
}
- 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"}