Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Automatic reconnect to MQTT #85

Closed
sorcererlc opened this issue Aug 9, 2022 · 4 comments · Fixed by #82 or sblantipodi/glow_worm_luciferin#36
Closed

[Feature request]: Automatic reconnect to MQTT #85

sorcererlc opened this issue Aug 9, 2022 · 4 comments · Fixed by #82 or sblantipodi/glow_worm_luciferin#36
Assignees
Labels
feature request good first issue Good for newcomers keep don't stale this issue

Comments

@sorcererlc
Copy link

Is your feature request related to a problem? Please describe

If there is a delay in network connection at system startup Firefly reports that it is unable to connect to MQTT, which is fair enough. There is, however, no apparent retry mechanism in place and no manual reconnect option so the only solution is to close Firefly and start it again after the network interface is connected.

Describe the solution you'd like

Display connection warning as a system notification instead of dialog to make it less intrusive and add MQTT reconnect mechanism, preferably with exponential backoff.
Maybe add a "Reconnect" button to the UI and/or system tray menu.

Describe alternatives you've considered

Add a "Reconnect" button to the existing warning dialog and/or system tray menu to allow manual reconnect instead of restarting the entire application.

@sblantipodi sblantipodi added bug Something isn't working good first issue Good for newcomers keep don't stale this issue labels Aug 9, 2022
@sblantipodi
Copy link
Owner

sblantipodi commented Aug 9, 2022

Hi @sorcererlc,
thanks for your interest in the Luciferin project.

I agree that this is a needed feature. I never thought on it before because most of us have an MQTT server running H24 on a Raspberry or similar but I understand the need.

Don't know when, but it will be fixed "soon enough".

@sorcererlc
Copy link
Author

Hi @sblantipodi
Thanks! No rush, I know a quite bit about priorities in a software project :)

I also have an MQTT server running non-stop. My issue is with the computer running Firefly. Sometimes it takes up to a minute for the network interface to connect after the Windows taskbar and system tray are initialized... it just shows as "No internet connection". Very odd considering it's a wired interface. Could be an issue with the driver or Windows itself but that's off topic.

Thanks again for considering my request :)

@sblantipodi sblantipodi added feature request and removed bug Something isn't working labels Aug 9, 2022
sblantipodi added a commit that referenced this issue Aug 10, 2022
@sblantipodi sblantipodi linked a pull request Aug 10, 2022 that will close this issue
@sblantipodi
Copy link
Owner

image

Hi @sorcererlc, your suggestion was easy and fast enough.
Next release of Luciferin will have a smarter way to manage the lack of network connection.

MQTT connection will be automatically retried every 10 seconds.
Informative messages or errors that doesn't need user interaction has been moved to the OS notification system instead of having a window dialog, less user interaction, less intrusive :)

@sorcererlc
Copy link
Author

Hi @sblantipodi ,

Awesome! Thanks :)

sblantipodi added a commit that referenced this issue Sep 17, 2022
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.8.4).  
- Added **automatic brightness control** using a Light Dependent Resistor (LDR). (Closes [#29](sblantipodi/glow_worm_luciferin#29)).
- [Luciferin Official PCB](https://github.com/sblantipodi/firefly_luciferin/wiki/Ready-to-print-PCB) has been upgraded to v1.1 to support the new LDR feature.
- Added a **brightness limiter feature**. (Closes #81).
- SPIFFS has been deprecated on ESP32 in favour of LittleFS. **This upgrade will format your ESP32**, please reconfigure WiFi or MQTT if you are using an ESP32 along with the full firmware. [How to here](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access).
- Menu is not visible when taskbar is on top. Fixed. (Closes #86).
- Improved MQTT reconnection. (Closes #85). 
- [Arduino Bootstrapper](https://github.com/sblantipodi/arduino_bootstrapper/releases) update (v.1.13.0).
- [PlatformIO Version Increment](https://github.com/sblantipodi/platformio_version_increment/releases) update (v0.1.7).
sblantipodi added a commit to sblantipodi/glow_worm_luciferin that referenced this issue Sep 17, 2022
- ***Breaking changes***: requires `Firefly Luciferin` firmware (v2.9.2).  
- Added **automatic brightness control** using a Light Dependent Resistor (LDR). (Closes #29).  
- [Luciferin Official PCB](https://github.com/sblantipodi/firefly_luciferin/wiki/Ready-to-print-PCB) has been upgraded to v1.1 to support the new LDR feature.
- Added a **brightness limiter feature**. (Closes [#81](sblantipodi/firefly_luciferin#81)).
- SPIFFS has been deprecated on ESP32 in favour of LittleFS. **This upgrade will format your ESP32**, please reconfigure WiFi or MQTT if you are using an ESP32 along with the full firmware. [How to here](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access).
- Menu is not visible when taskbar is on top. Fixed. (Closes [#86](sblantipodi/firefly_luciferin#86)).
- Improved MQTT reconnection. (Closes [#85](sblantipodi/firefly_luciferin#85)).
- [Arduino Bootstrapper](https://github.com/sblantipodi/arduino_bootstrapper/releases) update (v.1.13.0).
- [PlatformIO Version Increment](https://github.com/sblantipodi/platformio_version_increment/releases) update (v0.1.7).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request good first issue Good for newcomers keep don't stale this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants