Sending messages to external Node-red

Hello,
I am configuring a RAK7258 gateway. I want to use the network server of the gateway to process the messages and then send them to an external MQTT broker that resides in a raspberry pi.
I have setup everything and get the uplink “live device data” correctly.

I cannot see that information in my Node-red node.
I can if i change in the Lora Gateway-> LoRa packet Forwarder and change to Lora Gateway MQTT bridge. Changing my node in Node-red to the IP of the RAK. I get non processed garbage payloads.

Ideally i would like them as they show in the “Live device data”.

Where do you think might be my mistake?

This is my topic config

My gateway in the Lora network server

This IP is the one on my raspberry that is running the broker.

Why not run the MQTT broker on the RAK7258, thereby taking the burden off the Pi and just subscribe to the topics from Node-Red using the IP address of the RAK7258?

Well, my first try was to do just that with success…but the payload i got was unreadable to me.
Anything i might be doing wrong?
Therefore i am was moving to this approach.

The payload data is Base64 encoded. You can change this from the Application -> Integration. You can choose between Base64 and HEX.

Define “unreadable” - what do you expect and what do you get.

Can you use a MQTT client on a desktop machine to see what you get when you subscribe to a topic.

Is it the same as the payload that arrives in Node-Red.

Once I’ve seen an example I may / should be able to point you in the right direction.

I did change and the payload almost the same.

That is true, once i get home i will send the data i get.
But shouldn´t it be possible to send the data from the Network Server directly to the MQTT broker in the raspberry?

Probably, but I’d never try that so I don’t know the details. The Pi’s are great for many things, but not so great at keeping SD Cards happy and anything streaming in usually writes to the card unless you go out of your way to redirect it. In the same way I’d not run mySQL.

Whereas the Pi sitting there on it’s network stack and being sent specific stuff requested as it arrives, that’s much more do-able.

I get this:

That is true…i had my issues.
Ideally i would have a big server running the operation :grinning:
One can dream for now hahaha

An five year old PC with spinning disk has plenty of power to do these sorts of things, just not as sexy as a Pi.

Your screen shot appears to be a connection to the gateway. So the payload will need decrypting at network server level (NwkSKey) to confirm the integrity of the message and then decrypted again at the application server level (AppSKey). You can do it with this tool:

https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/

You can read more about this at:

Is there any compelling reason why you aren’t just using the built in Network & Application Server then subscribing to the MQTT feed that gets you the fully decrypted payload.

Many thanks for the explanation for the security, although the final sugestion indicates that my explanation of the problem was not clear.
Although i have cracked my problem due to this conversation and many other bits! I have now the payload as i wanted in node-red.
rx
A new question arrives and is that why does the rak7258 doesnt decode the payload of the rak 7204 on it´s full.
And how can i achieve that

PS:

This gave an idea heheh

Does this mean subscribing to the application feed is the solution - or was it something else?

Bit hard to say without knowing what the device is …

I edited my post with the Hardware config sorry.

Exactly!
I changed my configs and voilá it went through.

It does. It’s done it really well. Perfectly. Because …

… there is no battery level definition in the Cayenne LLP format.

1 Like

OHH

makes sense…but still why doesnt RAK integrate a decoder of their own products?
I know about the TTN decoding option ( it was the first thing i tried to send information), but for my application, TTN is not an option.
Taking that out the only way possibel would be to use chirpstack as my APP server and deploy the decoder there? since caynne is unable to deliver it all.

A decoder for which of the many many platforms. And in some respects, they have for this payload by using LPP - it’s just the bright sparks at Cayenne never thought about battery level as a thing.

It does, it just doesn’t badge what you want as Battery Level.

I suspect you’ve not looked at either link I spent time finding and putting in to my reply, certainly not the first one for the documentation which shows you the format, but more importantly, shows you how to implement the decoder for ChirpStack.

Certainly, I was not asking to show me how many tutorials are available online.
Just if there was any other option within the gateway itself to export that parameter in the payload to my MQTT broker.
But i can tell the asnwer is “No”

The only variable i see in Caynne is “analog input”

You asked this question:

And I gave you a link to the documentation to answer it.

It is not a tutorial. Neither is the Cayenne documentation that explains the payload format.

1 Like