# MQTT Configuration in Node-Red

**URL:** <https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551>\
**Category:** Application Development\
**Created:** [August 31, 2020, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551 "2020-08-31T11:08:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sacchidanand\_utech](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sacchidanand_utech/32/25844_2.png) [@sacchidanand\_utech](https://www.thethingsnetwork.org/forum/u/sacchidanand_utech)\
**Post date:** [August 31, 2020, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/1 "2020-08-31T11:08:23Z")

</div>

I have to configure, MQTT to receive data in Node-Red  
I did all the steps to receive uplink messages as mentioned in the documentation(Without TLS)  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/a/5/a56b1d806441695e33a69e42bc3437d45276613f.png)  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/8/8/88d0b5a576eaea206d8699dc688577bd05667b57.png)

I have just started and i cant find where i went wrong.  
It says connection failed  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/4/f/4fb93419d94bb8518ba71edd219ee1e872d7e794.png)

---

<div class="post-metadata">

**Author:** ![sacchidanand\_utech](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sacchidanand_utech/32/25844_2.png) [@sacchidanand\_utech](https://www.thethingsnetwork.org/forum/u/sacchidanand_utech)\
**Post date:** [August 31, 2020, 11:31am UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/2 "2020-08-31T11:31:17Z")

</div>

This helps me to overcome the error  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/c/6cac5ba428f403575fc567d6bc332cb754124543.png)

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [August 31, 2020, 11:59am UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/3 "2020-08-31T11:59:19Z")

</div>

Thanks for posting back that you solved it.

Looking at your images it seems you solved this by changing `asia.thethings.network` to `asia-se.things.network`. Good, but please don’t let people guess from some image you post. So, next time please describe the problem in the title, and please don’t post images for text, such as for log files (which also includes a lot of unrelated clutter in that screenshot). See [How do I format my forum post? [HowTo]](https://www.thethingsnetwork.org/forum/t/how-do-i-format-my-forum-post-howto/8735)

Thanks.

Aside: a panic button doesn’t feel like a good use case for LoRaWAN as due to using unlicensed radio, there is no real guarantee that the radio signal is received.

And for the MQTT output you may want to select “Output: a parsed JSON object”.

---

<div class="post-metadata">

**Author:** ![sacchidanand\_utech](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sacchidanand_utech/32/25844_2.png) [@sacchidanand\_utech](https://www.thethingsnetwork.org/forum/u/sacchidanand_utech)\
**Post date:** [August 31, 2020, 12:14pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/4 "2020-08-31T12:14:09Z")

</div>

> [@arjanvanb](#):
>
> So, next time please describe the problem in the title, and please don’t post images for text, such as for log files

Sure, thank you for the suggestion

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [August 31, 2020, 12:14pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/5 "2020-08-31T12:14:38Z")

</div>

Also, I’m surprised this works:

![MQTT topic](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/a/4/a4c779799149f6a8753e9ac5d759226c27bfe0b8.png)

If you’re not getting messages then you may want to remove the `<` and `>` characters. (Also, you could use wildcards, like `+/devices/+/up`.)

---

<div class="post-metadata">

**Author:** ![sacchidanand\_utech](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sacchidanand_utech/32/25844_2.png) [@sacchidanand\_utech](https://www.thethingsnetwork.org/forum/u/sacchidanand_utech)\
**Post date:** [August 31, 2020, 12:16pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/6 "2020-08-31T12:16:07Z")

</div>

Yes, sorry. I had to remove the \< and \> at both application ID and device ID places

> [@arjanvanb](#):
>
> `+/devices/+/up` .

Thanks for this, i will try this for sure.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [August 31, 2020, 12:28pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-configuration-in-node-red/39551/7 "2020-08-31T12:28:39Z")

</div>

Okay, final tips: also subscribe to the error events. Even just subscribing to all your application’s events using `+/+/+/events/#` and then passing all messages to a log file can be of great help while debugging at some later time. (Though you won’t get an error if the configuration of your topics is wrong; you’d just not receive anything then.) Also, don’t forget a `catch` node for errors that occur in Node-RED itself.

See an example in [Why is Node-RED integration no longer supported?](https://www.thethingsnetwork.org/forum/t/why-is-node-red-integration-no-longer-supported/39390/5)
