I run Openhab on a raspberry Pi (Openhabian) with a Mosquitto MQTT broker.
All my sensors publish via MQTT. All my actualtors subscribe to MQTT. Openhab is the ‘glue’ between sensors and actuators. Openhab controls the heating, lighting and a few other bits.
I added a new mini-pc to my setup, running Ubuntu Server. I gave it a fixed IP address. I installed Zoneminder; connected all the cameras; tuned the configuration. All working well!
Then I added Zoneminder Event Server to send MQTT messages. All still working nicely.
Next day the heating stopped working!
The relay module that controls the heating was nolonger sending or receiving MQTT messages. Reset the relay module and the problem persists. Reboot the Openhab raspberry Pi and the problem is fixed for a few hours. Next step is to open up the Relay module and connect a serial monitor. The error messages show the relay module was loosing connection to the MQTT broker. But why?
To cut a long story short, I had accidentally given the mini-pc, the same IP address as the IP address assigned by DHCP to the relay module.
Heating worked fine until the camera at my front door detected motion and Zoneminder sent an MQTT message. Then the MQTT broker would disconnect the relay module with the same ip address and the heating stopped working.
The fix was easy - reboot the wifi router that assigns IP addresses via DHCP. The relay module got a different IP address.
The morale of the tale, IP address conflicts produce really weird problems that are difficult to diagnose. If you assign a fixed IP, reboot the DHCP server to ensure there are no conflicts.