You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially I manually add an empty settings section in the JSON config that I upload via SPIFFS.
Then I use MQTT message to populate the values.
So far so good.
In the case the configuration goes in an unwanted state (wrong manipulation), I implemented a way to reset the module to default settings, by issuing a Homie.reset();
It restarts, goes into configuration mode and spawns the AP.
I enter all the needed informations, it reboots...
And unfortunately, the settings section is lost and doesn't exist anymore in $implementation/config
And I cannot add it again because of the error : ✖ Config does not contain a settings object
I would expect the both things to be possible :
I can add a custom settings to the JSON settings by passing it on the $implementation/config/set topic
ui bundle add the section automatically when detecting some custom settings
Or maybe the simplest solution would be to always add an empty settings section at boot if it does not exist, or remove the "config does not contain a settings object" error and actually add it instead.
Not that if I remove setDefaultValue, the UI bundle forces to enter a value and correctly creates the settings section.
Thanks !
The text was updated successfully, but these errors were encountered:
mosseb
changed the title
settings section not created by ui_bundle
settings section for defaulted custom settings not created by ui_bundle
Jun 3, 2020
Hi.
I have 2 custom settings like that :
Initially I manually add an empty
settings
section in the JSON config that I upload via SPIFFS.Then I use MQTT message to populate the values.
So far so good.
In the case the configuration goes in an unwanted state (wrong manipulation), I implemented a way to reset the module to default settings, by issuing a Homie.reset();
It restarts, goes into configuration mode and spawns the AP.
I enter all the needed informations, it reboots...
And unfortunately, the settings
section
is lost and doesn't exist anymore in$implementation/config
And I cannot add it again because of the error :
✖ Config does not contain a settings object
I would expect the both things to be possible :
$implementation/config/set
topicsettings
section at boot if it does not exist, or remove the "config does not contain a settings object" error and actually add it instead.Not that if I remove
setDefaultValue
, the UI bundle forces to enter a value and correctly creates thesettings
section.Thanks !
The text was updated successfully, but these errors were encountered: