Using HTTP
This section explains how you can use the internal HTTP server to send uplink and downlink packets.
Uplink
You may use HTTP protocol to send uplink reports to external applications.
These reports include both the uplink frame reports containing the applicative data
sent by LoRaWAN devices, as well as the delivery status reports of downlink packets requested
by applications to your LoRaWAN devices. To learn more about the different downlink delivery failure causes,
click here
and search for DeliveryFailedCause in the DevEUI_downlink_Sent report.
Follow these steps to create a new HTTP flow on Node-RED. In the following example, we shall push data to a webhook.
-
In Node-RED, click Add flow at the top-right of the page.

-> An empty flow is created. The Node-RED blocks will be added in the following step.
-
Drag an MQTT in and an HTTP request node from the left panel of your Node-RED editor to your new flow. Then, link them as illustrated below:

-
Double-click the MQTT node to configure it, by setting the topic to “/uplink-topic”.

-
Double-click the HTTP node to change the method to POST and set the webhook URL

-
Click Deploy to make the flow active. Once an uplink packet is sent by your LoRaWAN device, you will see the uplink report appearing on your webhook list.

Downlink
Default URL is: http://<box ip>:1323/node-red/downlink
DL raw encoded packets
You may send downlink raw encoded packets using the "HTTP INPUT POST" node (using payload_hex):
curl -X POST -d '{"DevEUI_downlink":{"DevEUI":"20635F0106000324","FPort":"2","payload_hex": "0102"}}' -H 'Content-Type: application/json' http://<box ip>:1323/node-red/downlink
{"response":"queued","payload":{"DevEUI_downlink":{"DevEUI":"20635F0106000324","FPort":"2","payload_hex":"0102"}}}
DL decoded packets
Instead of sending raw encoded payloads, you may send decoded downlink packets (using payload) and rely on the ThingPark Enterprise All-in-one encoding functions. This option is only available for branded devices having built-in payload drivers.
curl -X POST -d '{"DevEUI_downlink":{"DevEUI":"20635F0106000324","FPort":"2","payload":{"downMessageType":"REQUEST_CONFIG","ackToken":1},"Confirmed":"1","FlushDownlinkQueue":"1","DriverCfg":{"app":{"pId":"abeeway","mId":"asset-tracker","ver":"2"}}}}' -H 'Content-Type: application/json' http://<box ip>:1323/node-red/downlink
{"response":"queued","payload":{"DevEUI_downlink":{"DevEUI":"20635F0106000324","FPort":"2","payload":{"downMessageType":"REQUEST_CONFIG","ackToken":1},"Confirmed":"1","FlushDownlinkQueue":"1","DriverCfg":{"app":{"pId":"abeeway","mId":"asset-tracker","ver":"2"}}}}}