Lost history after power cut

I had a power cut for 5 min on Saturday and it seems to have lost all my history and it doesn’t seem to have put any history in for yesterday either.

Capture

Do I have to delete all data before 15/2/20 9:10:00 am to get back on track or can I get back all my history
Also can you use a USB UPS with the emonPI and if so can you recommend one.
Thanks

Hello @jonharnew , sorry to hear that. I wonder if the SD card got corrupted…

At this point your best bet is likely to try and restore the SD card using the process documented here:
Import / Backup - Guide | OpenEnergyMonitor

you will need another SD card with the latest emonSD image that can be downloaded from here: emonSD pre built SD card Download & Change Log · openenergymonitor/emonpi Wiki · GitHub

It’s then possible to try and fix any disk errors on the SD card before running the import tool detailed in the first link above.

When you get the new image up and running its possible to run via SSH:

sudo fsck.ext4 /dev/sda2 (root OS partition)
sudo fsck.ext2 /dev/sda3 (data partition)

Let me know if you need more help with these steps in more detail.

Hi Trystan

Thanks for your reply

  1. I am not too confident on doing this but I have ordered a 16gb card and reader & downloaded BalenEtcher so I will start off by getting a new card set up I am running emonSD-300ct18 at the moment should I download that or emonSD-17Oct19 (Stable).

  2. I dont have any backup from before the power failure so if the disk errors can not be fixed will I have to start from scratch and set up the local system again
    It is all working correctly at the moment only the history is not there. I even set up all new feeds, instead of _kwh I added _kwh2 & redirected the apps to that feed but still no history although all the graphs show the data correctly. The only change I can detect is that the _kwh feeds start from zero again after the power cut

  3. I still have all my data running correctly on emoncms so it is not really a big deal, but if I have to reinstall everything again as long as I alter the api key to ********6f42e in the config file would it still post data to emoncms with no problems.

I have ordered a UPS to hopefully stop this happening in the future, as I had another power cut this morning at 4am all the feeds seemed ok this time but the consumption had gone right up until I rebooted and then it went back to normal.

Edit - deleted duplicate post. BT, Moderator

1 Like