Giter VIP home page Giter VIP logo

sigfox-downlink's Introduction

Sigfox Downlink Callback

About Sigfox

Sigfox operates a global network, dedicated to the IoT.
Very low energy consumption, allowing devices to last years on battery.

The network is all about small messages (12 bytes of useful payload) every now and then (up to 140 times per day).

As the network is bi-directionnal, you can send data from your server to your devices whenever they ask for an update

Check out our developers portal to get more informations about Sigfox.

Downlink details

A downlink message is a message sent to your device.
Using the Sigfox network, this message can be sent either by the network itself (direct, with a few built-in vars), or by the user's application server (callback)

Each downlink message is an 8-bytes frame.

Every time one of your devices will request a downlink message, the callback URL you defined will be called. You need to send back an HTTP 200 OK response, and the 8 bytes response. In some cases, you may have no data to send, then simply reply with a HTTP 204 No Content. This way, no message will be sent to your device.

When sending back some data, you must comply with the following:

Header : Content-Type: application/json

Response body:

{
  '{{deviceId}}': {
	'downlinkData':{{data}}
 }
}

Set up your downlink callback

  1. Log in your Sigfox Cloud account.

  2. Navigate to the appropriate device type menu

  3. Edit the device type, to set the Downlink mode to callback Device Type Edition

  4. In the Callbacks menu, create a custom callback

Callbacks list Custom Callbacks

  1. Set the following settings
  • Type: DATA / BIDIR
  • Channel: URL
  • Url pattern : Your domain + endpoint
  • Check the POST checkbox
  • Content type : application/json
  • Body : the data that will be sent to your service. Customize to your needs

In this example, the body was set as:

{
	"deviceId":"{device}",
	"data": "{data}"
}

Callback creation

  1. Activate your downlink callback

By default the BIDIRcallback will be inactive after creation

Downlink Inactive

Click the Downlink picto to activate it.
Bear in mind that only one downlink callback can be active at a time.

Downlink Active

Examples

This repository contains boilerplate examples in different languages. The goal is to help you getting started with your favorite language.
Fixes, pull requests, ... are all welcome :)

Available Code Samples

NodeJS

Php

sigfox-downlink's People

Contributors

nicolsc avatar raymsdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sigfox-downlink's Issues

Small Inconcistency in main vs nodejs documentation/examples.

Hi!

The issue is about the downlink payload format. Main doc uses:

{
  '{{deviceId}}': {
	'downlinkData':{{data}}
 }
}

But nodejs uses:
{"deviceId":"FAF7E","downlinkData":"70117f61a5ceec67"}
I assume it should be:
{"FAF7E": {"downlinkData":"70117f61a5ceec67"}}

Is this correct assumption or both formats are valid? Please clarify.

downlink payload

How is that you turn things so hard to get on json response body, using sets as dict keys???????????

instead of just using string keys, as you do in the official website examples.

Downlink Example ACK

Would you be able to add to the downlink example an example (preferably the NodeJS example) of the expected Downlink ACK response.

I have an Oyster device which takes several configuration messages.
I am expecting an ACK to come back with ack:true after sending a downlink message, before i send the next configuration downlink message.

Then finally when all configurations are sent i would respond to the last ACK with a 204 (No Content) do indicate that there are no more configuration messages ?

I could have completely misunderstood the documentation but an example would be really help full!!

Much Appreciated

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.