# Struggling receiving MQTT messages in Node Red

**URL:** <https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878>\
**Category:** General\
**Tags:** mqtt\
**Created:** [15 March 2022 12:00 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878 "2022-03-15T12:00:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabutterworth](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pabutterworth/32/58515_2.png) [@pabutterworth](https://discourse.nodered.org/u/pabutterworth)\
**Post date:** [15 March 2022 12:00 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/1 "2022-03-15T12:00:25Z")

</div>

Hi,

I'm developing a garage door controller in Node-red running on a piZero under Dietpi that I want to connect to my Home Assistant instance using MQTT. I have the Mosquitto broker installed on the Home Assistance instance. As far as I understand, i should only have one broker, I dont also need one on the PiZero, right?

I'm new to MQTT and am still learning, I'm using Node-Red on both ends. The door is subscribed to topic 'door' and the HA server to topic 'doorserver'. Both Node-Red instances are showing as connected in the Node-Red UI.

On the HA instance, I can subscribe to the topic 'doorserver' and can receive messages sent from the piZero door controller using the mqtt out node sending to topic 'doorserver'

If I try to send messages from the HA instance to topic 'door', I never seem to receive them on the PiZero, despite it being subscribed to the topic 'door'. If I use an app on my phone, subscribed to topic 'door' I see the messages. What could be stopping my PiZero from receiving the messages, despite the fact that the NodeRed MQTT in node showing as connected?

Thank

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 March 2022 12:22 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/2 "2022-03-15T12:22:04Z")

</div>

try subscribing to `door/#` and put a `debug` node (set to display the complete msg object) on the output of the `mqtt-in` node. See what it shows.

---

<div class="post-metadata">

**Author:** ![pabutterworth](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pabutterworth/32/58515_2.png) [@pabutterworth](https://discourse.nodered.org/u/pabutterworth)\
**Post date:** [15 March 2022 13:18 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/3 "2022-03-15T13:18:00Z")

</div>

I'm getting nothing out, that's what's confusing me. It's showing as connected on the mqtt-in node, but it never gets triggered.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 March 2022 13:39 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/4 "2022-03-15T13:39:51Z")

</div>

Can you show us how you have configured the MQTT In node?

---

<div class="post-metadata">

**Author:** ![pabutterworth](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pabutterworth/32/58515_2.png) [@pabutterworth](https://discourse.nodered.org/u/pabutterworth)\
**Post date:** [15 March 2022 14:01 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/5 "2022-03-15T14:01:02Z")

</div>

Not sure what I changed but its working now, sorry!

---

<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:** [29 March 2022 14:01 UTC](https://discourse.nodered.org/t/struggling-receiving-mqtt-messages-in-node-red/59878/6 "2022-03-29T14:01:10Z")

</div>

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