OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266 Reply To: Opensprinkler on ESP8266

#41750

Ray
Keymaster

@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:
http://rayshobby.net/introducing-opengarage/
if you go to the Github repository:
https://github.com/opengarage
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.