Node Red - TTN does not send downlink msg to node


(Hartmut Seitter) #1

I am using Node-Red and the ttn downlink node-red node. I am sending the following message to the ttn-downlink node in Node-Red
dev_id: “hs-esp32-lora-rfm95-1”
port: 1
payload: 88

However this is never sent / scheduled to be sent from the ttn network to the lora node.
I defined an encoder in ttn network and when I test the encoder the message is scheduled and sent to the LoraNode. But it is not sent when I try it with Node-Red.

Any recommendation what to check?


(Ud Lo Ra) #2

Which gateway you are using?


(Hartmut Seitter) #3

RasPi based RAK831 – as an additional comment, in the ttn console I don’t see the payload message to be scheduled to send it to the LoraNode via the Gateway.


(Hartmut Seitter) #4

I pass the following info to the Node-Red Downlink Node
return {
dev_id: msg.dev_id,
port: 1,
payload: 88,
}


(Paul Stewart) #5

I use an Inject node at a certain time with a JSON payload and a MQTT node rather than the TTN node to schedule confirmed downlinks - works well

JSON string is this for a payload of 00 (base64 encoding)

{“port”:1,“confirmed”: true,“payload_raw”:“AA==”}

edit: Using an online decoder, your 88 payload would be “iA==” in base64


(Hartmut Seitter) #6

The problem was the payload json format. The TTN Downlink Node-Red Node has to send the data in the format of … … payload: {led: 33,}, … --led is just key value-- the encoder has to be setup accordingly. Using this format, it works and I receive in this case one byte (hex 21) on the LoraNode.
Thx