Automatic restart of the connection to an external MQTT?

For a little over a month, I moved my MQTT to an external docker.

I’m currently on 2.0.20 (pinned) instead of Gladys’ which is on 2.0.15, and I should note that everything works perfectly :wink:

In the last few days there were two docker image changes for mosquitto to 2.0.20 (automatic update with watchtower), I don’t know why (didn’t look at the changelogs) but my Gladys stopped communicating with it.
Looking at the MQTT integration configuration in Gladys, there was no communication.
A simple Sauvegarder restored everything but it took several hours for me to notice (thanks to the tuto Tempo which shows the current cost of my electricity on my dashboard).
I should point out that Z2M had no reconnection issues with the MQTT server after the update.
@pierre-gilles do you think it’s possible to set up a heartbeat to the MQTT server (only for external or internal as well) and trigger the configuration save to automatically reestablish the connection?

Extrapolating a bit on the monitoring system, we could monitor z2m, node-red, netatmo, etc., and trigger an automatic reconnection with a timeout and a message if there’s no reconnection after the timeout?

It seems that your message describes the same problem as here :

Thanks @GBoulvin, that looks very much like it!
Apart from re-saving the config, I don’t see an automatic solution for reconnection and above all there isn’t an alerting system yet :frowning:
The only thing I do is monitor watchtower update reports via Telegram, and I make sure updates happen during the day to receive notifications in real time.

We can close this post to focus on the other one.

2 Likes