Hey Guys,
I have two HA installations and need to send a Mqqt message from one machine to another.
I have mosquito installed in both, and I can receive messages from stuff like Blue Iris, where I can set up the Ip and the message. How can I do this with HA mosquito?
I read some documentation, but was confused if some of the examples are already depreciated.
I tought that in one HA installation I could publish a topic and payload and put the other HA to listen to a certain topic, but that is not working.
Does any one knows how to tackle this?
Thanks
Bruce
Actually you only need one mqtt broker (server) installed for this to work. And I actually advise doing that to make it simple for yourself. But the choice is yours of cource.
Then it leaves the question do you want the mqtt messages from broker A to become messages on broker B also? Or do you just need the messages from broker A to become entity states on your second HA?
In case you want the two brokers to get each other’s messages you to bridge them, you can do so by adding the bridging configuration to one of them (not both, then you get a loop).
In case you only need the entity states, you can create a entity in your yaml files with mqtt as platform (see integration documentation and search for all mqtt integrations)
Thanks for the reply.
At this moment, I’m only interested that my HA-B to get the messages from HA-A.
Is this possible to do with the Mosquitto addon? I made some tests but got some errors, and maybe HA is conflicting with one another.
I created a mqqt binary sensor on HA-B (the one that should receive the messages) and try to publish something from HA-A using mqtt.publish and got the bellow error:
Fail calling service mqtt/publish. two or more values in the same group of exclusion ‘payload’ @ data[]
Do I need node red to that I can specify that my publish is for a diferent IP?
You don’t publish a message to HA-B.
What you can do is publish it like normal to HA-A and on HA-B configure the MQTT integration to connect to the MQTT broker on HA-A. Then you can create the binary sensor on HA-B and subscribe to the topic it is on HA-A. (This is the scenario without MQTT broker on HA-B, which is the best route I think)