Node-RED TTN for grabbing event data not showing information

Also, I don’t see how one could even specify this, given the screenshots in the instructions @kersing linked to? However:

Very true when using a regular MQTT client in Node-RED (and, to be honest, that might actually be much easier to understand and use…)

But it seems the TTN library uses that discovery.thethingsnetwork.org:1900 to tell which MQTT server to use, given other parameters such as the application id and region:

That said, I don’t think one can change that discovery address?

2 Likes

According to the documentation in the quick start guide, it points out to either use your private installation address or the public discovery address. I don’t have any MQTT client installed locally so I just left it default since it’s pre-populated with the discovery.thethingsnetwork.org:1900 address.

This is what it shows for me.

image

I suppose I can just setup an MQTT client if that might be easier to get working. One things I can’t figure out is if there is even a topic I can use to pull the payload when received. With the Node-RED native tool there is the ttn event node, but with MQTT, I only see the topics found here. None of which give the payload when TTN receives it.

Okay so I guess I misinterpreted what I could use the Node-RED and MQTT extension for. I successfully receive a message upon updating information on a device registered to the application so it must be working.

Is there no way for me to send a payload that is sent from a device over LoRa registered to my application to my Node-RED? I’m just looking for a method to get the payloads that my application receives from my nodes and POST them to my webserver. I haven’t found anything in the API that allows me to do this…

Okay, too many page are called Quick Start Guide here :wink:

Apparently the screenshots in the documentation on the website are outdated?

Every Node-RED installation I saw has a client in “Input”, just like it has HTTP and all. But of course, the TTN thing should work. Unfortunately, I have only used some old release a long time ago and stopped using that version did not allow for wildcards:

But it seems the library has evolved, like now using the discovery which I assume makes configuration easier, and maybe wildcards work now as well?

It does: see "payload_raw" and "payload_fields" in the section “Uplink Messages”.

Also, make sure you’ve got the last version installed:

That’s the HTTP Integration: https://www.thethingsnetwork.org/docs/applications/http/

Yeah I got the integration working now. Is there any way for me to send the data to localhost or 127.0.0.1? Or is that not going to be possible? This would help immensely in working on developing my project.

I can, of course, properly send data to requestbin or the like, but I have no way to send any data to a locally hosted server since it’s not exposed to the web yet.

Not knowing your project, my suggestion for getting data locally would be to run a mqtt client locally within your project if it is a standard server side web stack this should be no more complicated than setting up Node Red ;). I only say this because you mentioned forwarding data on to localhost.

If you just want to forward packets to you local web address you can save a bunch of time and use the HTTP integration in the web console and send POSTs to a tunneled endpoint using ngrok or similar.

Yeah the HTTP integration is much easier to do. I’ll check out ngrok.

I’ve got everything setup on ngrok and have it properly pointing to the Flask webserver I have setup. I’m trying to get data sent to a specific endpoint on my webserver so I’ve added the /api/get_stuff endpoint after the public ngrok server address in my http integrations. My issue is that when I send a POST using the payload test on the device page to that endpoint nothing is coming up at all.

EDIT: Okay it seems it works now! Thanks for the help everyone

Did anyone actually manage to solve this original problem (ttn event and uplink nodes not able to be set up to work in Node-Red)???

I have struggled to get this feature working within Node Red. I can see data on my TTN console. I can even send the data to Cayenne. But, I just can not get the data from TTN to Node Red.
I have been able to get my Node Red Flow to accept data from a Sigfox feed quite happily.

I have tried setting up a generic MQTT connection to Node Red also, but it just does not work.

Node Red indicates that my connection to TTN has been established but not data comes through.

I need some help to work out what is going on.

I really do not want to set up a HTTP connection as appears to have been successful in the case above.

Thanks

Peter.

After a little more experimenting, I have been able to get the standard mqtt nodes working for Node Red but I still can not get the ttn specific nodes working. I wondering whether the discovery feature is working correctly for these???

Peter.

Hi @tuftec
What is the problem you have, to configure the TTN node in Node-red?

@Batigolle I am struggling to set up all the parameters correctly I suspect.
I believe I have entered all the correct details (the ttn uplink node shows connected) and yet I can not get any data through. I am not sure what to put in the field box. I left it blank hoping that it would pass all application data, but still nothing comes through.

In frustration I used the standard mqqt nodes and I have been able to get these to work.

I thought the idea of the ttn specific nodes was to make things easier. Not so! The documentation is also miles out of date which does not help.

Cheers

Peter.

1 Like

Hi @tuftec
it is probable that in some field a wrong value is inserted
try to see if my answers in these posts

they can help you

I have version 2.04
in my previous answer, I only reversed Second TAB with First TAB ,
reverse Second TAB with First TAB and vice versa

I left the field “Field” empty

Thanks @Batigolle looking at the details you have referenced, I believe that I have everything set correctly. I have left the field box empty, but I still get nothing coming through. I believe there could be an issue with TTN. One thought I had is that the discovery process is not working correctly. i am using the service through the meshed routers in Australia but have the application being supported through eu.thethings.network. could this have something to do with my issue. As I mentioned previously, I can get it all to work by using the standard mqtt nodes for Node Red.
It looks like a bug to me!!!

Looks like I’m having the same problems with the latest node.

Error: 14 UNAVAILABLE: Connect Failed"

Any idea how to fix this?

  • App ID, Access Key, Discovery Address are correct.
1 Like

I’m having the same issue here. I have a Things Node and Things Gateway. I can see the data on the gateway & device but cannot connect on NodeRed.

I have tried NodeRed on Win10, Raspberry Pi & Ubuntu.

I have seen data on HomeAssistant but that is not reliable either.

Any suggestions gratefully accepted.

I’m having the same issue here to!
I have tried NodeRed on Ubuntu and macOs.

TTN event node is working for me (nodered v0.18.7; TTN nodes v2.04)

But I’m missing something: the MQTT topic is not given as msg.topic like it is in the plain MQTT node. This makes it sort of useless to me (as I want to grab all events and then deal with them according to device and topic…) => feature requests go where?

no update on this topic?
I have node red working fine and today stopped and ttn uplink do not show connection, but on the log there are no errors on ttn connection, so I dont know how to find the solution.
Please any help is welcome.

Hello

Hmmm… realy? We have some “LoRaCheapNodes” (328p 3,3V/8MHz) with BME280 running. At our Dashboard are no mistakes.
I know the buddy get the data with Node Red from TTN and on OpenSenseMap they are online.
Same in our Grafana.

Greets

1 Like

I am having same issue , did anybody find solution for this image