-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safer settings reload and MQTT change detection (#1701)
* MQTT: config change detection * Reload settings when config json is uploaded * Apply only new settings * Finish config early when not enabled * Reuse existing buffers from getSetting String using std::move
- Loading branch information
Showing
3 changed files
with
135 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcspr - with this commit I have problem with topics,
all ends with double "//" like:
dhouse/salon/light1//status
Something is wrong with removal "/" at the end, maybe in _mqttConfigure ??
look at line:
https://github.com/xoseperez/espurna/blob/dev/code/espurna/mqtt.ino#L257
it should not be there:
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just so that you know, if you created a PR for this I wouldn't need to remember this comment ;)
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcspr - I'm not sure if this causes a mistake.
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried it? It looks like it. We are modifying local
topic
var based on data from_mqtt_topic
, which will later be_mqtt_topic = topic
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet, give me a few minutes to check it out
334b499
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is it...
PR done: #1755