@pbecchi: regarding storing wtopt.txt SPIFFS, it might have to do with the parameters you used when calling the SPIFFS.open function. There are a number of different options, like ‘w’, ‘r+’, ‘a’, ‘a+’. If you are reading from an existing file and modifying it, use ‘r+’; the ‘w’ parameter will cause the file to be overwritten.
I just finished and posted my OpenGarage project:
if you go to the Github repository:
you can find the code relevant to the configuration files (config.txt). The code is able to create a new file if it doesn’t exist, modify it or delete it upon factory reset.