# The Things Network and MQTT In Nodes Problem

**URL:** <https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461>\
**Category:** General\
**Created:** [28 June 2023 09:28 UTC](https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461 "2023-06-28T09:28:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moonlight](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@moonlight](https://discourse.nodered.org/u/moonlight)\
**Post date:** [28 June 2023 09:28 UTC](https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461/1 "2023-06-28T09:28:43Z")

</div>

Hi

I have been using Node-RED to process payloads from four SenseCAP LoRa nodes connected to The Things Network(TTN) without problems for sometime now (12 months +). Today I added a new sensor, acquired a new MQTT API key and tried to add it to my flow with a **MQTT In** node. As soon as I deployed it all my other **MQTT In** nodes disconnected but the new node reported as connected.

I tried some troubleshooting and in the end, I deleted all the existing TTN API's and created new ones, added them to my flows and after some juggling managed to get the four existing MQTT nodes and the new one reporting as connected.

I then added a **function** node to my new sensor flow to extract the desired payload for insertion into mariadb and then tried to connect this function node to an existing **mysql** node. As soon as I did this all my existing **MQTT In** nodes disconnected from the TTN. As soon as I deleted the connection from the new **Function** node to the existing **mysql** node all **MQTT In** nodes reconnected.

Sorry I don't get it. Can someone point me in the right direction please? How does connecting a **function** node to a **mysql** node affect a **MQTT In** node?.

MQTT In -----\> Function-------\>mysql

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 June 2023 09:43 UTC](https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461/2 "2023-06-28T09:43:49Z")

</div>

> [@moonlight](#):
>
> I don't get it. Can someone point me in the right direction please? How does connecting a **function** node to a **mysql** node affect a **MQTT In** node?.

Perhaps you are crashing Node-RED? Have you checked node-red logs?

> [@moonlight](#):
>
> Today I added a new sensor, acquired a new MQTT API key and tried to add it to my flow with a **MQTT In** node. As soon as I deployed it all my other **MQTT In** nodes disconnected but the new node reported as connected

Are you doing full, flow or node deploy?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e71599e5b6d55d6b2cc488feb470a35a1f4e989.png)

* * *

Please tell us how you run node-red (Node-RED version, NodeJS version, etc.)

---

<div class="post-metadata">

**Author:** ![moonlight](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@moonlight](https://discourse.nodered.org/u/moonlight)\
**Post date:** [28 June 2023 12:12 UTC](https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461/3 "2023-06-28T12:12:49Z")

</div>

I reckon you nailed it. I believe I was doing a Full deploy(didn't take much notice to be honest) but now I seeing and using the Restart flows option all MQTT In nodes are connected and receiving payload.

Thanks for pointing this out. Will make a note of it and only update modified flow/nodes in future.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 July 2023 12:12 UTC](https://discourse.nodered.org/t/the-things-network-and-mqtt-in-nodes-problem/79461/4 "2023-07-12T12:12:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
