Skip to content

SmartPi does not reconnect to MQTT if the broker restarts #127

@miguelcostaUI

Description

@miguelcostaUI

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions