Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Sync historic data from online CMS to local CMS

Tags: #<Tag:0x00007f88c9ad1840>

Hi,
My local emonpi stopped working out of the blue the other day and I failed to get it going again (it would just hang on "booting, please wait… ").
So I flashed a new SD and then imported a backup from the old, not working, one. Everything looks fine now except there are large chunks of historical data missing, I assume the database had somehow got corrupted.
All the historic data is online at emoncms.org though. Is there a way to sync the two so the missing data is replaced on my local CMS?

Cheers

Hello @Bigalboyo yes you can download the data from emoncms.org using the emoncms sync module. Click on Setup > Sync and then enter your emoncms.org details on the Sync feeds page. You should then be able to download the feed data from emoncms.org

Hello, newbie here. I’ve got the opposite problem. I started using local monitoring with my emonpi and now have got it logging on Emoncms.org. Is it possible to pull the history from my local emonpi into Emoncms.org?

Welcome, Scott, to the OEM forum.

Have you looked at the Input API Help on emoncms.org? I’ve never had a need to use it, and I’m not an emonCMS expert, so I can’t give you any more help than this.

Thanks, all have a look. I was hoping there was a button I could press!

Hello @Scottb15 do you want to use emoncms.org so that you can access your data remotely? if that is the reason, have you considered using a remote access solution such as dataplicity to access the data on your emonpi? https://guide.openenergymonitor.org/setup/remote-access

Yes, that was the plan but as I was fiddling about I managed to stop capturing the inputs locally and only captured on emoncms.org. I’m not sure how I did it but I’d now like to get the history I’ve previously captured locally merged with the data now being captured on Emoncms.org.

Hello @Scottb15 there is a bit of a longwinded way to merge the emoncms.org data into the data that you have already recorded locally with the merged feeds being on your local pi. It’s not possible to upload the historic data easily to emoncms.org but it is possible to download the data to your pi…

The process is to use the emoncms sync module to download the emoncms.org data and then use the post process module to merge the downloaded feed with the local feed…