Hi enerserve,
I've noticed that the SmartPi reconnects successfully to MQTT if the connection is lost and then restored but if the broker is restarted it will not reconnect until a reboot is done. Running sudo systemctl restart smartpi.service also restores the connection.
I'm using a mosquitto broker and sometimes I have to restart it, to update the broker or update the server where it is running, which makes this a big problem because I have several SmartPis on remote locations and to restore the MQTT connection I have to manually restart each one.
Is there a way to fix this and make SmartPi automatically reconnect to the broker?
Hi enerserve,
I've noticed that the SmartPi reconnects successfully to MQTT if the connection is lost and then restored but if the broker is restarted it will not reconnect until a reboot is done. Running
sudo systemctl restart smartpi.servicealso restores the connection.I'm using a mosquitto broker and sometimes I have to restart it, to update the broker or update the server where it is running, which makes this a big problem because I have several SmartPis on remote locations and to restore the MQTT connection I have to manually restart each one.
Is there a way to fix this and make SmartPi automatically reconnect to the broker?