Closed aamoroso closed 7 years ago
You can call Interface::get().getConfig().erase(); in order to erase the json file.
Thanks, brodtm. I should have thought of doing it programatically :)
EDIT: And in case anyone else is interested the other way of editing (or even setting initially) the configuration file is via the Ardiono IDE.
Put the config file into ~/Arduino/
Glad you solved your issue, feel free to reopen if needed!
Hi,
I am using version 1.5.0 with Arduino IDE 1.6.12. I have a small sketch using Homie. It is pretty much identical to the light switch example. My code works fine, but I have a pre-existing JSON configuration file which I want to change. I cannot get the configuration file to go away. Reflashing the sketch doesn't affect it (which I have read is as per normal). But I assumed putting the ESP into boot loader mode would override it and put Homie back into configuration mode... but I don't seem able to do that. Is it possible to edit the file some way? ESPexplorer doesn't seem to be able to do anything and I can't get the ESP8266FS tool in the IDE to even come up.
Many thanks, Adrian
UPDATE: I got rid of the config.json file by holding the FLASH button for 5 seconds while it was booting. It would be nice to know if there was a way to edit it, however :)