Getting uplink metadata using Node-RED "ttn device" or "ttn message" nodes

@BoRRoZ Thanks… I have followed the guide, i deleted the previous node-re nodes and added the new event and uplink ones and I do have added discovery info… but nevertheless no luck and no error message in the console.
Its only the OTAA part which does not work…
Because it was running with 2.0.2 I did only install the new ttn nodes and did not reinstall node-red or node.js. Maybe i would have to reinstall everything?

problem solved after reinstall…

Just to say I checked my node-red TTN nodes and they are both connecting and working OK with an LMIC OTAA node (Heltec).
Did you leave the region field empty? - just check that you really did type “eu” in there (and it is not “greyed”)

Try this code in your function ?

var msg2= msg
msg2.payload.time = msg.metadata.time;
return msg2;

@CurlyWurly Did you leave the region field empty?
hmm… there is no region field. Probably in the old version but in the 2.0.4 version there is this discovery thing…with the old version everything was working ok.
grafik
grafik

and i will try your code as soon as I get connected again of course. Thanks…

I tried the code in one of the connecting nodes and it is not giving the time but the payload
grafik

I can still not connect from node red to my app. Today finally an error message popped up saying…

reinstall solved the problem

Just FYI - I updated my lab a few days ago to use the new ttn event node and it works fine for my OTAA node - https://www.thethingsnetwork.org/labs/story/using-node-red-with-st-nucleo-l073rz-sx1272

reinstall solved the problem…

The code actually works since i upgraded node-re… thanks

Glad this thread highlighted the new nodes - thanks!
I replaced the old TTN nodes with the new ones (V2.0.4) and I can now see the following differences:

  • The new nodes are named differently
    ttn_event has replaced ttn_device
    ttn_uplink has replaced ttn_message
    ttn_downlink has replaced ttn_send (I think that was what it was called)

  • The field for “eu” has been removed

  • There is a new field called “discovery address” which contains “discovery.thethingsnetwork.org:1900

I’ve checked and all works OK for me now (data flows etc).
In my case, I deleted the older TTN libraries before re-installing the new ones with npm install node-red-contrib-ttn (This was to remove the old nodes from the node-red pallete)

1 Like

Old topic ressurection. How to get the metadata from this new nodes ? I don’t see the data in the complete message debug node.

Solved: Just keep “Field” empty and all metadata shows up.