diyBMSv4Code icon indicating copy to clipboard operation
diyBMSv4Code copied to clipboard

Feature discussion: save/restore all settings via browser

Open datenheim opened this issue 3 years ago • 7 comments

While playing around with the system (Release-2022-05-24-08-14) and starting to modify some code lines (related to MQTT) I noted that all settings (module settings, rules, integrations etc.) are gone if a new firmware is uploaded to the controller (D1 mini in my case).

While this might be unavoidable due to ESP8266 and likely ESP32 it came to my mind that it would be great to just "download" the settings to some kind of file (maybe JSON). Than after flashing the new binary one could restore all settings by "uploading" the formerly mentioned file.

Is there another way or workaround to achieve this? How could that be implemented?

datenheim avatar Jun 01 '22 20:06 datenheim

The esp32 controller has support for storage of configuration data on an SD card which is checked upon startup to load configuration data from.

atanisoft avatar Jun 01 '22 22:06 atanisoft

Thanks for that hint. I'll take a look, maybe it could be implemented here too. Couldn't SPIFFS (or whatever it's called today) used for that?

sglux avatar Jun 02 '22 10:06 sglux

SPIFFS is stored in flash, when flashing via the single binary method it will wipe flash prior to writing the new image so the SPIFFS data would be lost.

atanisoft avatar Jun 02 '22 12:06 atanisoft

Ok, then a SD-shield is mandatory. Maybe some code from the ESP32 implementation could be pulled over here... :)

sglux avatar Jun 02 '22 12:06 sglux

You could simply download the file via a web browser and then upload after the upgrade. No SD card required then.

stuartpittaway avatar Jun 08 '22 07:06 stuartpittaway

You could simply download the file via a web browser and then upload after the upgrade. No SD card required then.

Hi Stuart, I did not find any option in the GUI of the ESP8266 controller (Release-2022-05-24-08-14). Do I miss something?

datenheim avatar Jun 09 '22 21:06 datenheim

No you didn't miss anything, I was just mentioning that an SD card wasn't mandatory, other methods could be written.

stuartpittaway avatar Jun 09 '22 21:06 stuartpittaway