Building a new SDcard

It can become necessary to build a new SDcard. This post describes how to do that. IoTaWatt uses a microSD card, formatted to FAT32. New units use a 8GB level 10 card. Any card 4GB-32GB level 4 or 10 will work fine.

  • Obtain a new microSD card or reformat an old card to FAT32.
  • Download the SD files from github SD directory
  • If using windows, this link will downlod the files into a .zip file.
  • Copy the files to the root of the SDcard.
  • If you were able to salvage the config.txt file from the old file, you can substitute that in place of the github version.

That’s it, good to go. Replace in the IoTaWatt and restart. If you were unable to salvage your old config.txt, there may still be hope. IoTaWatt keeps a copy of the last verified config in the SPIFFS file system on the ESP8266. You can try to recover it as follows:

  • Run the file manager.
  • In the directory list there should be a directory called esp_spiffs.
  • image
  • Expand that directory and look for the file config.txt as above.
  • Click on that file and it’s contents should appear in the editor window.
  • Create a file on your computer called config+1.txt.
  • Copy and paste the contents of the editor window into that config+1.txt file and save it.
  • Click the browse button at the top left, then using whatever method your browser offers navigate to the new config+1.txt file and select it.
  • Click the upload button in the file manager.

The new config file should load and replace the config.txt file in your SDcard root directory.

2 Likes

Thanks overeasy,

I just powered up my device, so hopefully it will pick up and upgrade. In the meantime I had also ordered a few 8gb SDHC cards, should arrive tomorrow I’ll swap with a fresh card as well.

My SD card was damaged, so I replaced the 8GByte with 32GByte, formated as FAT32 and put all readable data back on the new SD. After 30 hours of flashing red-green-red, I stopped it and took a new image + old config, now it is ok.
Can recovery last so long?

Firmware: 02_08_00

Horst

RGR is not recovery. It is trying to produce a diagnostic file before wiping the datalog. Sounds like you should not have copied anything from the /IoTaWatt directory and rebuilt with only the root files from the git with possibly your old config if it was readable. You may not be out of the woods yet if you kept anything from the old /IoTaWatt directory.

Ok, so did I in the second try.
But this means, it will not stop flashing r-g-r?
Rebooting after 30 hours restarted flashing r-g-r.

Are you saying that you are experiencing this now, after rebuilding the card without a /IoTaWatt directory?

I tried earlier with /iotawatt present. And that time, it did not wipe the datalog itself.

I’m taking that as a no.

These instructions were great! After a power fail, my Iotawatt didn’t come back up. Tried cycling power a copule times but it mostly blinked Red-Green-Green-Red.

Took an old 32GB SD card, formatted it, dropped in the files you mentioned from Github, copied over my config.txt and /iotawatt directory, and I’m back in business. No lost data (other than the samples missed while it was offline).

The cranky SD card is a blue 8GB Stromboli, FWIW.

Thanks Bob. I managed to read the old card, so copied it onto a new 16G card (formatted to FAT32).

All up & running again nicely. btw, does the battery ever need replacing? I was loath to remove it & risk losing data.

Thanks for the great support. Recommended product. I also see there is now an Australian Seller (on ebay)

Great. You will get a message if the battery is low. It’s basically shelf life so at least several years.