-
-
Notifications
You must be signed in to change notification settings - Fork 97
(v2) automatic settings migration from 1.9.x to 2.0 #431
Comments
This turns out to be harder than expected. EMS-ESP 1.9 uses the SPIFFS filesystem. There is no easy way to detect which type of filesystem is present on an ESP. My original idea was to mount SPIFFFs, detect the old config files, load them and then write them back to LittleFS which is the new filesystem ib v2. Problem here is that as soon as you mount a FS and it fails, it will format the complete filesystem. So basically each time you start EMS-ESP v2 all the settings will be erased. Sucks. Then I thought about building a web UI to import the backup file from 1.9. In this scenario, the user would have gone into the AP and already at the settings screen so might as well just complete the rest of the key settings like wifi SSID, password and MQTT IP with a few clicks. Conclusion, for the few users on 1.9 its not worth it. I'll just document the steps in the wiki. |
Ok, I found a way to make this work. Will push in a change |
@bbqkees can you help test? When uploading the firmware over an older v.1.9 firmware it should automatically port over the settings. |
I ran a number of tests yesterday. If you select the V2 8266 bin file from the releases page and upload it via the 1.9.5 web interface the update to V2 works fine. But indeed with an update via the web, settings are not migrated from 1.9.5 to V2. I don't think this is a major problem, its just basically setting WiFi and MQTT and of you go. |
made some changes, tested it too and it seems to work (at least for me). Also via the 1.9 web 'upload' page. 2.0.1b4 |
There have been reports of the settings not being persisted after a reboot. |
ran a few tests again, erased flash, uploaded 1.9.5, set settings, tested it, upgraded to 2.0.1. Not issues. |
Detect the 1.9.x json setting files in SPIFFS, convert over to 2.0 in LittleFS.
The text was updated successfully, but these errors were encountered: