MQTT Item looses connection

On 2.4 stable I am using 8 sonoff tasmotas. Changed to 2.4 some weeks ago and now when I restart the WLAN Router I get connection problems from the MQTT items. Suddenly one of the items isn’t connecting to the PI. I can access in WLAN but cannot connect via MQTT and Openhab app.
Restarting Openhab or the item doesn’t help, strange thing is over night it connected automatically itself???
Next Router restart and suddenly another item is showing the same MQTT connection problem…
Any idea what this could be, because this isn’t useful.
The sonoff tasmotas are on 6.6 and some on 6.71 because I thought it might be a problem with the sonoffs.

With MQTT there is broker service involved in between. You might usefully find out which side of the broker your problem lies, but most likely broker <-> device.

You’re breaking the WLAN deliberately, so of course there will be connection loss. It’s the recovery (or failure to recover) that is your problem? When will a Tasmota be prompted to resubscribe to the broker? (this is not something openHAB can influence)

Is DHCP involved here?

No DHCP, fixed IP for all.
But why is one device losing the connection and is occasionally solving itself over night.
Next time it is another device with the same problems.
When I restart router an also pi it usually should also fix the MQTT connection, right? But it doesn’t.

I have the impression that this is since I changed to 2.4 stable, can that be?

I don’t know. Why does Tasmota reconnect at all after a broken WLAN? What can influence that?

Who knows. What did you change from? Did you change your broker? that’s more likely to have an effect.

The only thing I was forced to change was the setup of all MQTT items - this was mandatory when changing to 2.4.
I am not so deep in the details I only noticed these problems now.
One thing to mention when such an error occurs, I also tried after restarting router and pi, to fix the connection error by disabling and enabling the MQTT connection in the sonoff GUI.
Also no luck. Next morning I was surprised that it was connected somehow by itself.
And in the console from the sonoff I can read something like the MQTT server doesn’t allow the connection.
Restarting the pi doesn’t help that is so crazy and add I said sometimes next day it is fixed… So I cannot trust these devices or the MQTT setup with Openhab

Okay, a step forward.
You have an MQTT broker, we do not know what you have, it is a secret.

Messages are passed from openHAB to devices by the broker.
Messages are passed from devices to openHAB by the broker.
To pass messages, both sides have to subscribe to the broker.

openHAB cannot make remote devices connect to the broker.
openHAB cannot stop devices from connecting to the broker.

Such could be caused by MQTT clients with an identical ID. I know, such faulty setup should have blown before as well, but who knows.

1 Like