Home Assistant & Mosquito MQTT - IP-Address change: MQTT-Broker entities are all unavailable

Hi all,

I do have a problem, that I do not understand.
When I change the IP-Address in Home Assistant. MQTT-Entities go unavailable.
I can’t do anything about it. Restarted in multiple ways.
Changing back the IP-Address of HA solves the problem immediately.

Config:
Z2M as LXC in Proxmox
Mosquitto as HA-Addon
MQTT standard integration

Why do I need this?
I clone HA-VM to have 2 HAs running. (only different IP)
It is running fine. But not MQTT.
For a good failover strategy.

Anybody has ideas what the MQTT-Problem could be?? There should be the possibility to control Z2M via 2 HA instances… but how?

Thanks a lot.

Don’t run MQTT as an add-on, because now you point Zigbee2MQTT to one add-on, not the other one. Run MQTT on it’s own.

1 Like

Yes, thank you. I unterstand.
I did it. Mosquitto as separate LXC.
Works, but… with HA and HA-Clone active there is a noticable latency of a couple of seconds for Zigbee device reactions. E.g. motion sensor to light (all Z2M).
With only one HA it is working perfect as before the separation.
→ What could be the reason… the HAs are only clients now.

The Broker is a seperate LXC now.
Zigbee2MQTT in LXC pointing to the Broker-IP in LXC now.
All automations in HA2 are deactivated.

PS: i implemented a heartbeat for the HAs over MQTT by publishing every second the timestamp. That is working perfectly fine… so what‘s that latency?

No idea. I have Zigbee2MQTT and Mosquitto together in one proxmox VM, and several HA instances using it, from another VM on the same proxmox, and from other machines, no latency at all.

Problem solved: when creating the clone Proxmox did not change the MAC-Address of the virtual network adapter. Differing the MAC from the second system solved the latency problem!

1 Like