ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
475 stars 64 forks source link

Resubscribe to command topics when MQTT server restarts while service is active #99

Closed karl500 closed 1 year ago

karl500 commented 1 year ago

Checklist:

Release with the issue: 1.8.4

Last working release (if known):

Hardware, Operating System, Python version: Rpi 3b r1.2, buster 5.4.51-v7+, python 3.7.3

Description of problem: When MQTT server restarts while the service is active. MQTT is reconnected but command topics are not subscribed to again. Subscribing to topics probably should be moved to the callback on_connect.

As this is a bug in code don't realy see the need for other info.

Run our report script 'genBugInfo' on your failing device and include the output here:

Python errors shown in the logs (if applicable):

Additional information:

ironsheep commented 1 year ago

@karl500 thank you for reporting this. I'm working on the fix now...

ironsheep commented 1 year ago

Changes committed and will appear in v1.8.5 and later.