SonOff Basic R2 connection problem


I have had the problem for some time now that my two SonOff Basic R2 (flashed with Tasmota) don’t seem to like being connected to my MQTT broker.

After setting up everything worked without problems, but for a few weeks my wife has been complaining that the lighting in the bedroom does not work reliably, especially during the day, and after looking at the Tasmota console of the relays I immediately noticed that the two are not connected to the MQTT broker anymore. Or that the connection seems not to be stable. Because sometimes it works for a few hours and than loses the connection and wont connect for hours or even days.
I have nearly twenty devices connected to my Broker and never recognized such a behavior before.

This manifests itself with the error message:

MQT: connection failed due to IP:port, rc -2. Retry in

My first approach was to update Tasmota to V12.1.1. Did not change anything.

Update Eclipse Mosquitto MQTT Broker to V2.0.15. Didn’t change anything either.

After a bit of search engine research I read a tip somewhere to downgrade Tasmota to V8.5.1. Did not change anything.

Adjusting the MQTT settings didn’t help either.

I’m quite new to this topic, so I don’t know any other way to track down the error here.

If you have any suggestions, please describe them in such a way that even a beginner can do them.

Thank you so much for your help!!!