I am using OpenHAB on Docker on a RPi4, I switched over time more or less everything to MQTT (CCU-Jack, Zigbee2MQTT, Ahoi-DTU, SDR-RTL433, …). All the mentioned packages also run via Docker on the same RPi. Memory and CPU are very ok. Of course now I receive a lot of Generic MQTT traffic on OpenHAB (15min average ~500 messages received and sent / minute on the Mosquitto). Peak values could be much higher, 2000 messages per minute received.
From time to time (after a few hours) the broker gets disconnected and re-connects. As I have some alarms defined once water- or smoke-senors are offline I receive all the time alerts…
Debugging the MQTT AddOn did not reveal anything special to me. What are your experiences with the MQTT limitations on OpenHAB side? What would be maximum values that can be digested by OpenHAB?
Thanks a lot!
I’m using mosquitto within a LXC container, my average of sent messages is ~ 1200 messages per minute, while received messages is never lower than 560 Messages per minute (smart meter measuring once per second…) and load of the container is about 0.1 % of one CPU core, memory is something about 30 MByte for the complete container.
My guess: mosquitto is not the bottleneck
Thanks, interesting… I agree, mosquitto is very capable. Maybe too much traffic for OpenHAB? But memory, CPU on the RPi4 are really low
In the meantime it was getting worse, I was losing over time also sporadically the connection to FritzBox, also in the past I lost connection randomly to RaspberryMatic (therfore CCU-Jack). So overall I was wondering what could have been the reason - and I tried a few things. Now I think I have found what was the problem…
I was using all my docker containers in bridge mode - I thought this provided more control and security. But once I changed all to the host-mode suddently all connection problems stoped. Now running 24h without any problem (~50 MQTT disconnects per day otherwise…). Also the used threads decreased from ~1300 to ~900.
I have not really found more about the docker-bridge while Googeling, but at least this has solved all my trouble - thanks @Udo_Hartmann - yes, mosquitto (or OpenHAB) was not the bottleneck