Empty Config.txt file - Resolved

Hello Bob,
I would appreciate you help and guidance again, please. After adding a CT to the last vacant position (14) I selected the EmonCMS server, inserted then saved the CT details. A short while later this window appeared:
IoTaWatt Lock Up
After switching off the power and restarting the IoTaWatt the led displayed a ‘green-red-red-green’ sequence. In accordance with the advice on https://docs.iotawatt.com/en/master/troubleshooting.html I mounted the SDcard in another computer and found the config.txt file empty!

So my question is – where can I obtain a suitable replacement config.txt file to suit IoTaWatt 4.x, Firmware version 02-05-02?

This is a problem that comes around every few months. The background is that the ESP8266/arduino file system does not support renaming an SD file, so whenever the config is changed, it has to be a delete the recreate. If something goes wrong in that window, you lose the config file. Would be better if I could create the new file, then delete the old and rename the new.

So living within the limitations, IoTaWatt saves the last valid config file in the SPIFFS file system, which is part of the ESP8266, and not on the SD. If you restart the IoTaWatt, with the SD card in place and the G-R-R-G led sequence, you should be able to run the file manager.


Note the esp-spiffs directory. Expand it:

That config file is the last valid config the IoTaWatt used. There is no copy in the file manager, so you need to right click on the valid config.txt and download it to your computer. Then click browse at the top, locate the file in your computer’s download directory, and then upload it to the SDcard root directory.

Restart and you should be on your way.

Thanks for the background explanation and the way forward. Having achieved access to the File Manager as advised

I downloaded the config.txt file (I did notice that after clicking the download option the circular reload symbol briefly changed to a X) but cannot find a copy in the downloads directory using the browse tab
I’ve also carried out a general search of all storage areas for the file without success (unless it is identified as other than config.txt).
In desperation I’ve tried to copy the contents of the file from the RH pane (in the first screenshot) but found I could not paste a copy.
It would appear I’m missing something important.

Where it downloads to is environment specific. I us3 windows/Firefox and it shows up in downloads as config.txt (unless there is already a file by that name, if so it gets a (1) etc.).

The other option is to simply copy and paste it from the editor into a text editor and upload as config.txt.

As I’d already searched for the config.txt file several times I chose your copy and paste suggestion. I now realize that the need to use a text editor to carry out the task was the bit I had not latched on to earlier. So now all is good - thanks.