0

I have set up a second instance of Home Assistant (named sandbox) where I can play with new releases and features without risking my main Home Assistant. I have always used an MQTT broker external to Home Assistant, but it occurred to me that if both of my Home Assistant instances are looking at the same broker, I will run into the case where the faster instance of HA will get the MQTT data from my devices and never get to the sandbox instance.

Am I overthinking the issue?

  • 2
    There isn't really a question we can answer here. It's not clear what you expect to happen and only you can decide if you are "overthinking" – hardillb Mar 13 '24 at 22:08

1 Answers1

2

MQTT isn't a queue where the first client to grab a message stops all others seeing that message. Messages are delivered to all subscribers to a given topic.

If both HA instances are subscribed to the same topics they will both get all the messages on those topics.

Now if both instances choose to publish other messages as a result of receiving a message, then you may get strange behaviour because there are now 2 responses, e.g. if the response was to make an incremental change to some value rather than set an absolute value then you may get unexpected consequences (e.g. a message to increase brightness by 10% could result in brightness actually increasing by 20%).

hardillb
  • 12,553
  • 1
  • 20
  • 34