Skip to content

Node : List Downlinks

Quentin DESBOIS edited this page Mar 29, 2018 · 11 revisions

atim-list-downlinks AGATE only

This node provides list of pendings downlinks in FIFO stack of AGATE LoRaWAN Network Server and send msg.payload.downlinks as JSON Array[] through output :

  • downlinks : JSON Array [] :
    • JSON Object {} :
      • datetime : String : Date time of downlink (UTC+0)
      • devaddr : String : Address (DevAddr) of LoRaWAN device
      • frid : String : Unique ID of downlink
      • txdata : JSON Object {} :
        • data : String : Hex value of pending downlink
        • port (Optional) : Number

The node uses AGATE RestAPI to find Downlinks list in LoRaWAN Network Server.

Configuration

  • atim-agate-user : Create or select an user access authorization for RestAPI Request

Examples

Output example : msg.payload

{
   "downlinks":[
      {"datetime":"2018-03-07T15:15:08Z",
       "devaddr":"00A435B5",
       "frid":"1519AC38889A7370",
       "txdata":{
           "data":"ABCD",
           "port":12
        }
      }
   ]
}

Flow example

Get list of pendings downlinks with refresh each 5 seconds

  • First, create inject node and set up :
    • JSON Payload with following content : {}
    • Check Inject once after 0.1 seconds, then
    • Repeat Interval
    • every 5 seconds
  • Create atim-list-downlinks node, wired with previous node and set up
    • Auth : Add new atim-agate-user and press pencil icon
    • Please fill forms with the same credentials than AGATE LoRaWAN Network server
      • Default : Username is admin / Password is admin
  • Add the last node : debug and wired with previous node
[{"id":"5ccfd824.f2cb68","type":"tab","label":"atim-list-downlinks","disabled":false,"info":""},{"id":"8d257e36.82502","type":"debug","z":"5ccfd824.f2cb68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":730,"y":200,"wires":[]},{"id":"5630e050.0f59e","type":"atim-list-downlinks","z":"5ccfd824.f2cb68","user":"4827ca9d.d55f84","x":510,"y":200,"wires":[["8d257e36.82502"]]},{"id":"f5bceec1.2a199","type":"inject","z":"5ccfd824.f2cb68","name":"","topic":"","payload":"{}","payloadType":"json","repeat":"5","crontab":"","once":true,"onceDelay":0.1,"x":310,"y":200,"wires":[["5630e050.0f59e"]]},{"id":"4827ca9d.d55f84","type":"atim-agate-user","z":"","name":"ogate","password":"ogate"}]