Struggling receiving MQTT messages in Node Red


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?


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.

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.

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

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

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