# MQTT

**URL:** https://www.thethingsnetwork.org/forum/c/application-development/appdev-mqtt/135.md

[Latest](https://www.thethingsnetwork.org/forum/latest.md) · [Categories](https://www.thethingsnetwork.org/forum/categories.md) · [Tags](https://www.thethingsnetwork.org/forum/tags.md)

---

## [About the MQTT category](https://www.thethingsnetwork.org/forum/t/about-the-mqtt-category/56197)

<div class="topic-metadata">

**Author:** [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Replies:** 0\
**Last updated:** [March 31, 2022, 1:08pm UTC](https://www.thethingsnetwork.org/forum/t/about-the-mqtt-category/56197 "2022-03-31T13:08:06Z")

</div>

MQTT protocol and MQTT integration. Category for application development related to the MQTT protocol and TTS MQTT integration.

---

## [Unable to connect to MQTT server from Node-Red](https://www.thethingsnetwork.org/forum/t/unable-to-connect-to-mqtt-server-from-node-red/69301)

<div class="topic-metadata">

**Author:** [@1tim](https://www.thethingsnetwork.org/forum/u/1tim)\
**Replies:** 17\
**Last updated:** [October 22, 2026, 2:18pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-to-mqtt-server-from-node-red/69301 "2026-10-22T14:18:20Z")

</div>

Hi, I am now stumped with what I thought would be a simple cog to implement in a bigger solution. I am unable to connect to my TTN application using MQTT. I first ran Node-Red within a docker container on a Pi5, which…

---

## [TTN support for MQTT SparkPlug?](https://www.thethingsnetwork.org/forum/t/ttn-support-for-mqtt-sparkplug/73269)

<div class="topic-metadata">

**Author:** [@kayakpete](https://www.thethingsnetwork.org/forum/u/kayakpete)\
**Replies:** 3\
**Last updated:** [February 26, 2026, 6:52pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-support-for-mqtt-sparkplug/73269 "2026-02-26T18:52:03Z")

</div>

Good morning, TTN friends - I have some temperature sensors out in the field that utilize our Holland Michigan LORA city-wide network. The nodes report up through gateways to TTN, and I pull data down via MQTT. All is…

---

## [Node-red MQTT](https://www.thethingsnetwork.org/forum/t/node-red-mqtt/72799)

<div class="topic-metadata">

**Author:** [@lora\_Obs-Banyuls](https://www.thethingsnetwork.org/forum/u/lora_Obs-Banyuls)\
**Replies:** 2\
**Last updated:** [December 10, 2025, 11:22am UTC](https://www.thethingsnetwork.org/forum/t/node-red-mqtt/72799 "2025-12-10T11:22:05Z")

</div>

Hello, I’m using the TTN MQTT application. I’ve already connected to two applications, but I’m currently unable to connect a third using the Node-RED MQTT-in node. The console displays “failed to connect.” I’m using port…

---

## [How to login to TTN MQTT server](https://www.thethingsnetwork.org/forum/t/how-to-login-to-ttn-mqtt-server/72373)

<div class="topic-metadata">

**Author:** [@jpt](https://www.thethingsnetwork.org/forum/u/jpt)\
**Replies:** 7\
**Last updated:** [October 15, 2025, 1:28pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-login-to-ttn-mqtt-server/72373 "2025-10-15T13:28:51Z")

</div>

Hi, I am new to LoRa and TTN. I would like to attach https://lorabridge2.github.io/ to TTN instead of owning a dedicated gateway. I advised the AI to implement the connector and it looks fine now. But: Login to the M…

---

## [MQTT broker behavior on TTN / The Things Stack](https://www.thethingsnetwork.org/forum/t/mqtt-broker-behavior-on-ttn-the-things-stack/72277)

<div class="topic-metadata">

**Author:** [@iyan-zapatero](https://www.thethingsnetwork.org/forum/u/iyan-zapatero)\
**Replies:** 3\
**Last updated:** [September 30, 2025, 11:09am UTC](https://www.thethingsnetwork.org/forum/t/mqtt-broker-behavior-on-ttn-the-things-stack/72277 "2025-09-30T11:09:37Z")

</div>

I am working with ThingsBoard (version 4.0.1) and integrating it with TTN (The Things Stack) via MQTT. However, we are facing a recurring issue where duplicate messages arrive in our ThingsBoard integrators. Because the …

---

## [Cannot connect to MQTT](https://www.thethingsnetwork.org/forum/t/cannot-connect-to-mqtt/72124)

<div class="topic-metadata">

**Author:** [@gpezzella](https://www.thethingsnetwork.org/forum/u/gpezzella)\
**Replies:** 2\
**Last updated:** [August 29, 2025, 6:49pm UTC](https://www.thethingsnetwork.org/forum/t/cannot-connect-to-mqtt/72124 "2025-08-29T18:49:22Z")

</div>

Hi I have already been connected yesterday with MQTT using MQTT Explorer but now don’t work anymore: Why? I’m in Italy and use the european Server Thanks

---

## [How to control the JSON formatter with the API and send it to the application server in hexadecimal using MQTT communication](https://www.thethingsnetwork.org/forum/t/how-to-control-the-json-formatter-with-the-api-and-send-it-to-the-application-server-in-hexadecimal-using-mqtt-communication/72100)

<div class="topic-metadata">

**Author:** [@naraoka](https://www.thethingsnetwork.org/forum/u/naraoka)\
**Replies:** 3\
**Last updated:** [August 28, 2025, 9:23am UTC](https://www.thethingsnetwork.org/forum/t/how-to-control-the-json-formatter-with-the-api-and-send-it-to-the-application-server-in-hexadecimal-using-mqtt-communication/72100 "2025-08-28T09:23:33Z")

</div>

I’m currently investigating whether this is possible using TTN. I’m looking into the following two points: Is it possible to send data to an application server in hexadecimal format using MQTT communication from TTN …

---

## [Working MQTT Bridge configuration for Homeassistant](https://www.thethingsnetwork.org/forum/t/working-mqtt-bridge-configuration-for-homeassistant/65754)

<div class="topic-metadata">

**Author:** [@mikamuh](https://www.thethingsnetwork.org/forum/u/mikamuh)\
**Replies:** 4\
**Last updated:** [July 17, 2025, 9:55am UTC](https://www.thethingsnetwork.org/forum/t/working-mqtt-bridge-configuration-for-homeassistant/65754 "2025-07-17T09:55:36Z")

</div>

Hi Everyone, I am desperately trying to get my Homeassistant MQTT Broker to establish a bridge to my application using an encrypted communication. My configuration page in the MQTT Add on is set as follows: Certificat…

---

## [Multiple clients connection to mqtt server](https://www.thethingsnetwork.org/forum/t/multiple-clients-connection-to-mqtt-server/71164)

<div class="topic-metadata">

**Author:** [@hansju22](https://www.thethingsnetwork.org/forum/u/hansju22)\
**Replies:** 1\
**Last updated:** [April 16, 2025, 12:37pm UTC](https://www.thethingsnetwork.org/forum/t/multiple-clients-connection-to-mqtt-server/71164 "2025-04-16T12:37:57Z")

</div>

I have one application in ttn and 3 mqtt clients at the same time, which will connect to this server. All use the same credentional. ( I set it up under mqtt integration). The first client works well. If the second and …

---

## [Different structure for rx\_metadata for gateways from the packet broker](https://www.thethingsnetwork.org/forum/t/different-structure-for-rx-metadata-for-gateways-from-the-packet-broker/69365)

<div class="topic-metadata">

**Author:** [@Archer](https://www.thethingsnetwork.org/forum/u/Archer)\
**Replies:** 11\
**Last updated:** [October 11, 2024, 12:24pm UTC](https://www.thethingsnetwork.org/forum/t/different-structure-for-rx-metadata-for-gateways-from-the-packet-broker/69365 "2024-10-11T12:24:05Z")

</div>

Hello, I would like to set up a monitoring view for the gateways. The data from rx\_metadata is part of my considerations. It is clear and understandable that there are differences between the data of gateways from the …

---

## [Copy of payload to external MQTT](https://www.thethingsnetwork.org/forum/t/copy-of-payload-to-external-mqtt/68251)

<div class="topic-metadata">

**Author:** [@lorawandererrr](https://www.thethingsnetwork.org/forum/u/lorawandererrr)\
**Replies:** 4\
**Last updated:** [June 14, 2024, 2:41pm UTC](https://www.thethingsnetwork.org/forum/t/copy-of-payload-to-external-mqtt/68251 "2024-06-14T14:41:56Z")

</div>

So, my question is whether, even if I have my devices inside the TTN console, I’ll be able to send copies of their payloads to an external MQTT. To explain: I have a lab and I’m testing interactions and homologations al…

---

## [Issue with LoRaWAN Message Transmission via MQTT](https://www.thethingsnetwork.org/forum/t/issue-with-lorawan-message-transmission-via-mqtt/68206)

<div class="topic-metadata">

**Author:** [@marianamador](https://www.thethingsnetwork.org/forum/u/marianamador)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 4:12pm UTC](https://www.thethingsnetwork.org/forum/t/issue-with-lorawan-message-transmission-via-mqtt/68206 "2024-06-10T16:12:24Z")

</div>

Hello everyone, I hope you’re doing well. I’m currently facing an issue with transmitting LoRaWAN messages via MQTT to The Things Network (TTN), and I’m seeking some assistance to troubleshoot the problem. Here’s a bri…

---

## [Mqtt connexion limit?](https://www.thethingsnetwork.org/forum/t/mqtt-connexion-limit/67934)

<div class="topic-metadata">

**Author:** [@simmoinard](https://www.thethingsnetwork.org/forum/u/simmoinard)\
**Replies:** 6\
**Last updated:** [May 23, 2024, 3:57pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-connexion-limit/67934 "2024-05-23T15:57:56Z")

</div>

Hi everyone, I am teacher in agriculture and I want to form students to the use of TTN to connect sensors in the fields. For that, I have a Raspberry pi and I installed on it influxdb, grafana and NodeRED. I want the s…

---

## [MQTT : subscribe to a gateway](https://www.thethingsnetwork.org/forum/t/mqtt-subscribe-to-a-gateway/67025)

<div class="topic-metadata">

**Author:** [@simmoinard](https://www.thethingsnetwork.org/forum/u/simmoinard)\
**Replies:** 4\
**Last updated:** [March 1, 2024, 1:48pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-subscribe-to-a-gateway/67025 "2024-03-01T13:48:46Z")

</div>

Hi everyone, as far as I read, we can subscribe to an app topic in MQTT. But can we subscribe to a gateway ? Using NodeRed I’d like to get gateway informations, and have an alert if the gateway is off. Apparently, this …

---

## [No response of MQTT pub command](https://www.thethingsnetwork.org/forum/t/no-response-of-mqtt-pub-command/65317)

<div class="topic-metadata">

**Author:** [@thera923](https://www.thethingsnetwork.org/forum/u/thera923)\
**Replies:** 3\
**Last updated:** [October 30, 2023, 11:51am UTC](https://www.thethingsnetwork.org/forum/t/no-response-of-mqtt-pub-command/65317 "2023-10-30T11:51:19Z")

</div>

Hi, I am currently using Dragino’s LPS8N gateway and the LA66 LoRaWAN Shield and trying to use MQTT server to send downlink messages. MQTT broker address is au1.cloud.thethines.network provided by TheThingsStack. I hav…

---

## [No message posted in TTN MQTT broker through AWS lambda](https://www.thethingsnetwork.org/forum/t/no-message-posted-in-ttn-mqtt-broker-through-aws-lambda/64126)

<div class="topic-metadata">

**Author:** [@javiergraciasanti](https://www.thethingsnetwork.org/forum/u/javiergraciasanti)\
**Replies:** 12\
**Last updated:** [July 31, 2023, 2:05pm UTC](https://www.thethingsnetwork.org/forum/t/no-message-posted-in-ttn-mqtt-broker-through-aws-lambda/64126 "2023-07-31T14:05:33Z")

</div>

I am experiencing problems displaying the downlink message generated by the AWS lambda. However, I can see that TTN has subscribed to the post made through lambda. Below I show the code from the lambda using the node.js …

---

## [MQTT . the data received in my python program is not th same as in TTN](https://www.thethingsnetwork.org/forum/t/mqtt-the-data-received-in-my-python-program-is-not-th-same-as-in-ttn/63751)

<div class="topic-metadata">

**Author:** [@firaschaabane](https://www.thethingsnetwork.org/forum/u/firaschaabane)\
**Replies:** 1\
**Last updated:** [July 1, 2023, 5:02pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-the-data-received-in-my-python-program-is-not-th-same-as-in-ttn/63751 "2023-07-01T17:02:43Z")

</div>

Hi, this is my file.py . it prints all the messages received in the application. # MQTT Topics uplink\_topic = "{}/devices/{}/up".format(app\_id, device\_id) # Callback function when connection is established def on\_c…

---

## [Rename devices in MQTT messages?](https://www.thethingsnetwork.org/forum/t/rename-devices-in-mqtt-messages/63400)

<div class="topic-metadata">

**Author:** [@OberLab](https://www.thethingsnetwork.org/forum/u/OberLab)\
**Replies:** 0\
**Last updated:** [June 8, 2023, 11:26am UTC](https://www.thethingsnetwork.org/forum/t/rename-devices-in-mqtt-messages/63400 "2023-06-08T11:26:47Z")

</div>

Hi there, we are deploying devices at different locations (not known upfront when we register the devices, sometimes moved from time to time etc). Therefore our devices are registered as device01, device02 etc Would be…

---

## [Mqtt broker with ttn](https://www.thethingsnetwork.org/forum/t/mqtt-broker-with-ttn/61681)

<div class="topic-metadata">

**Author:** [@jasper0304](https://www.thethingsnetwork.org/forum/u/jasper0304)\
**Replies:** 2\
**Last updated:** [June 1, 2023, 2:10pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-broker-with-ttn/61681 "2023-06-01T14:10:33Z")

</div>

Hello, I have a server with a integration for a mqtt broker. I want to use a added button in ttn to communicate to that mqtt broker. I saw in ttn the integration mqtt but I cannot change anything there. Please let me kn…

---

## [No more MQTT Messages from Subscription .../down/sent](https://www.thethingsnetwork.org/forum/t/no-more-mqtt-messages-from-subscription-down-sent/62513)

<div class="topic-metadata">

**Author:** [@MarcBerg](https://www.thethingsnetwork.org/forum/u/MarcBerg)\
**Replies:** 2\
**Last updated:** [April 13, 2023, 6:12am UTC](https://www.thethingsnetwork.org/forum/t/no-more-mqtt-messages-from-subscription-down-sent/62513 "2023-04-13T06:12:20Z")

</div>

Hello, for about two years I have successfully subscribed to MQTT on a Topic "v3/\<APP-ID\>@ttn/devices/\<DEVID\>/down/sent. The device is a Dragino LDDS75. Since yesterday I do not receive any messages for this subscriptio…

---

## [Can't Publish Downlinks via MQTT Since 3.25.0 Update](https://www.thethingsnetwork.org/forum/t/cant-publish-downlinks-via-mqtt-since-3-25-0-update/62394)

<div class="topic-metadata">

**Author:** [@mpvima](https://www.thethingsnetwork.org/forum/u/mpvima)\
**Replies:** 2\
**Last updated:** [April 4, 2023, 5:30pm UTC](https://www.thethingsnetwork.org/forum/t/cant-publish-downlinks-via-mqtt-since-3-25-0-update/62394 "2023-04-04T17:30:55Z")

</div>

Hello, Since the last upgrade of The Things Stack Cloud to v 3.25.0 on April 3rd, I’ve been experiencing an issue with posting downlinks via MQTT. I am using the following topic for publishing downlinks: v3/{applicatio…

---

## [Android MQTT Client not working "stream terminated by RST\_STREAM with error code: PROTOCOL\_ERROR](https://www.thethingsnetwork.org/forum/t/android-mqtt-client-not-working-stream-terminated-by-rst-stream-with-error-code-protocol-error/61644)

<div class="topic-metadata">

**Author:** [@se-bk](https://www.thethingsnetwork.org/forum/u/se-bk)\
**Replies:** 1\
**Last updated:** [February 25, 2023, 10:19am UTC](https://www.thethingsnetwork.org/forum/t/android-mqtt-client-not-working-stream-terminated-by-rst-stream-with-error-code-protocol-error/61644 "2023-02-25T10:19:44Z")

</div>

Hello, i just want to set uop an Android MQTT Client. I tested several clients in the google plaground store, but i cant get any connections. With the PC-Program MQTT-Explorer i can get a connection. I followed the i…

---

## [MQTT : Failing to receive "service/data"](https://www.thethingsnetwork.org/forum/t/mqtt-failing-to-receive-service-data/61210)

<div class="topic-metadata">

**Author:** [@oliviergrenoble](https://www.thethingsnetwork.org/forum/u/oliviergrenoble)\
**Replies:** 2\
**Last updated:** [January 30, 2023, 3:45pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-failing-to-receive-service-data/61210 "2023-01-30T15:45:08Z")

</div>

I have installed an application called “MyMQTT” on my Android Smartphone and I have subscribed to receive MQTT notifications coming from TTN. When my device is connected or send a message, I do receive notifications for …

---

## [MQTT from TTN to traccar server - ECONNRESET error](https://www.thethingsnetwork.org/forum/t/mqtt-from-ttn-to-traccar-server-econnreset-error/58076)

<div class="topic-metadata">

**Author:** [@Duffy6](https://www.thethingsnetwork.org/forum/u/Duffy6)\
**Replies:** 13\
**Last updated:** [July 22, 2022, 1:14pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-from-ttn-to-traccar-server-econnreset-error/58076 "2022-07-22T13:14:19Z")

</div>

Hi, I have two mqtt-in nodes pulling data from thethingsnetwork and sending it to a Traccar server: These two nodes pulling from two different applications with different API-keys. One of these nodes always gives me …

---

## [Failed to connect to MQTT, API Key not found: API key not found](https://www.thethingsnetwork.org/forum/t/failed-to-connect-to-mqtt-api-key-not-found-api-key-not-found/58057)

<div class="topic-metadata">

**Author:** [@a18041967](https://www.thethingsnetwork.org/forum/u/a18041967)\
**Replies:** 1\
**Last updated:** [July 19, 2022, 7:58pm UTC](https://www.thethingsnetwork.org/forum/t/failed-to-connect-to-mqtt-api-key-not-found-api-key-not-found/58057 "2022-07-19T19:58:32Z")

</div>

The error indicates that I’m missing an MQTT API key, I’ve check that there’s an key and on multiple occasions retreated a key but continually I’m getting the following error when monitoring the Applications Live Data { …

---

## [PHP MQTT: The broker responded with unauthorized](https://www.thethingsnetwork.org/forum/t/php-mqtt-the-broker-responded-with-unauthorized/56196)

<div class="topic-metadata">

**Author:** [@natoons](https://www.thethingsnetwork.org/forum/u/natoons)\
**Replies:** 20\
**Last updated:** [April 14, 2022, 4:32pm UTC](https://www.thethingsnetwork.org/forum/t/php-mqtt-the-broker-responded-with-unauthorized/56196 "2022-04-14T16:32:33Z")

</div>

Hello everyone, I used the code to subscribe on the mqtt of ttn with this code : I have configured everything but I have a problem. MQTT \[eu1.cloud.thethings.network:1883\] \[test-subscriber\] The broker responded with…

---

## [MQTT, Home Assistant, Mosquitto: Connection Refused](https://www.thethingsnetwork.org/forum/t/mqtt-home-assistant-mosquitto-connection-refused/55813)

<div class="topic-metadata">

**Author:** [@Adandl](https://www.thethingsnetwork.org/forum/u/Adandl)\
**Replies:** 7\
**Last updated:** [April 8, 2022, 2:19pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-home-assistant-mosquitto-connection-refused/55813 "2022-04-08T14:19:39Z")

</div>

Dear All! I promise, I did my Google research before posting this: I use home assistant with the MQTT add on. I try to configure my MQTT Broker to bridge to the TTN MQTT broker. Here is an error-message I receive: C…

---

## [MQTT Downlink over Bridge Home Assistant](https://www.thethingsnetwork.org/forum/t/mqtt-downlink-over-bridge-home-assistant/51039)

<div class="topic-metadata">

**Author:** [@Profiler64](https://www.thethingsnetwork.org/forum/u/Profiler64)\
**Replies:** 5\
**Last updated:** [February 24, 2022, 6:47pm UTC](https://www.thethingsnetwork.org/forum/t/mqtt-downlink-over-bridge-home-assistant/51039 "2022-02-24T18:47:20Z")

</div>

Hello, i have a Mosquitto MQTT Server running on my NAS. I use the MQTT Server for my Home Assistant. I want to receive the Data from TTN in my Home Assistant. So i bridged the two MQTT Server I added following lines…

---

## [How to use MQTT with TLS for Home Assistant?](https://www.thethingsnetwork.org/forum/t/how-to-use-mqtt-with-tls-for-home-assistant/53046)

<div class="topic-metadata">

**Author:** [@stigvi](https://www.thethingsnetwork.org/forum/u/stigvi)\
**Replies:** 6\
**Last updated:** [November 10, 2021, 8:39pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-use-mqtt-with-tls-for-home-assistant/53046 "2021-11-10T20:39:07Z")

</div>

Hi. I have recently upgraded to V3, but I am struggling with the mqtt connection. I am using Mosquitto as an addon to Home Assistant and if I remember it correctly, I had to download and reference the mqtt-ca.pem found h…

[Next page](https://www.thethingsnetwork.org/forum/c/application-development/appdev-mqtt/135.md?page=1)
