Integrating TTN MQTT messages with local MQTT broker

Hi,

I have an EMQ MQTT broker running and would like to forward the TTN incoming messages to this broker. The EMQ broker has a REST API to publish messages. Using Postman I succeed publishing messages using the REST API to the broker.
However, trying the TTN HTTP Integration fails publishing messages.
So (before spending another couple of hours :slight_smile: ), my first question is: can I use the TTN HTTP integration for this? For messages to send using the REST API I need to provide a body (what is logical) as part of the request, but I don’t see how to add this body info in the HTTP integration provided by TTN?

Another option would be, if i’m right, set-up a bridge between the TTN MQTT broker and my EMQ broker. However, here I have to find out if (and if possible how) the bridge can be initiated from the EMQ broker.

Thanks.
Guy

Hi,

There is some information about the HTTP integration in the following link ;
https://www.thethingsnetwork.org/docs/applications/http/

And there is also a video made by Johan available…

Good luck… Tom

Hi,

Thanks, but I already consulted this info (without success).

I finally have taken another way by installing/configuring a “relay” MQTT broker between TTN and the EMQ broker.

Guy

Nice … there are a some nice samples out there .

I did some research on this problem and came up with the following Node red solution for thingspeak ;

An object named { hg } is prepared for a HTTP request ;

nr-func1

With thanks to Jeroen Beemster for initial script, Frank Beks … and Peter M. @TFA

1 Like

@tvloon could you share us your steps to goal this ? Currently, I read about that to choose the right solution to send my data from TTN to my Rest API server. TTN HTTP Integration don’t give the possibilities to customize how the data will be send. So, next way look to use MQTT broker ?

Thanks to share

My process started with an instruction by Frank Beks for the local TTN / IoT community…
From there I looked at some code that I used some long time ago…

Maybey you can ask gdillen1 for some more detailed information

One could search for a solution in the Lab area …

But a nice story is also available from Fokke ; Change it …

@gdillen1 Could you please explain how did you performed that?

Thanks!