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

Update main.ino - Remove restartesp from discovery_prefix stanza #2033

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

puterboy
Copy link
Contributor

Description:

Revert from original patch as not necessary and also prevents saving of new MQTT variable values
See #1996 (comment)

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

@1technophile
Copy link
Owner

Should it be added to the documentation that the gateway needs to be restarted after to republish to the new topic ?

@puterboy
Copy link
Contributor Author

No - as I detailed at length (maybe too much :)) in several new comments in #1996, a restart is triggered anyway since discovery_prefix is on the same WebUI page as the various MQTT login variables that in turn show (always) show as changed and trigger a configuration backup when setupMQTT() is called which in turn triggers a restart from within setupMQTT() (assuming changes were successful)

Indeed one way or other, most variables end up triggering a restart that way (whether intended or not).. Indeed, as I detail in my comments a restart really shouldn't be necessary for most if not all variables.

Also, saveConfig() is often called twice.

In all the code could deserve some straightening out as its effects are non-obvious and may not be as intended but I understand this may not be a priority.

@1technophile
Copy link
Owner

1technophile commented Aug 29, 2024

We would need some testing to see if the restart from setupMQTT could be avoided, we will keep it for now as I have other PR in stock.
Thanks

@1technophile 1technophile merged commit 5564ed5 into 1technophile:development Aug 29, 2024
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants