Uploading history to new Emoncms instance


#1

Today, I had my new RaspPI B- up and running with a working emoncms server. It started collecting data at 9.44pm on Jan 26 2019. I have set the IotaWatt to upload from Jan 15 2019, just to test the upload historic data functionality. But it does not upload any data before 9.44pm. At least, nothing is shown after about an hour. I tried different ‘upload from’ dates (the iotawatt log file goes back to Jan 5), but nothing happens. I purchased the iotawatt late December 2018.

Any ideas to help me out here?


Local emoncms - fails sometimes - RESOLVED
#2

Not clear the order of things her. If you configured the IoTaWatt without setting the Jan 15 date first, and it started posting from the current time, then you cannot upload history. That is a limitation of EmonCMS. You would need to stop the Iotawatt posting (with the stop button in the status tab, then delete all of the inputs and associated feeds in EmonCMS, then start the IoTaWatt EmonCMS service again.


#3

I think you nailed it. When switching API key and server from emoncms.org to my local setup yesterday, I never stopped the iotawatt from posting. I’ll try that, delete the feeds&inputs and restart posting. Mainly to learn how/if it works.

A second question though: yesterday the RPI had two hickups, one from just freezing (had to pull the power) and at least one reboot. The emoncms data have holes during two periods from the same time, although I cannot verify exact timing. What is the expected behaviour of the iotawatt + emoncms where the iotawatt logs but the emoncms have is out of service for a shorter or longer period?


#4

The IoTaWatt will retry the failed write until it receives an OK from Emoncms. Is it possible that a EmonCMS on the RPi is acknowledging the write before it is actually committed to the database? I know that Emoncms accepts new writes and then puts the data in a queue to be processed to memory. If you want to try something, unplug theRpi for Say five minutes, and see how big the gap is after yourestart it and IoTaWatt shows iris caught up.


#5

I did this:

  • Stoppet iotawatt from posting,
  • Deleted all feeds and inputs on the emoncms server.
  • Started the posting again, setting the first posting date to Jan 5 2019 (my first data point)
  • Inputs reappeared, showing physical live values in the value column.
  • Reconfigured all inputs and feeds.

While doing this, the emoncms inputs all are listed as “inactive” in the “updated” column. While writing this post, the iotawatt has posted about two days worth of data, and needs to catch up with another 20 days before it is ajour.

At what time will the inputs be “active” again? Or am I doing something wrong here?

EDIT: Just checked, and there are new data filling up into the emoncms database, so it seems to be working. Just curious about the “inactive” status.


#6

That’s all Emoncms functionality. Not sure the exact cutoff they use to call something inactive, but I think it’s around two-three days. So when you get close, it should start the countdown. As long as the input values appear to be changing, it’s uploading.

It takes awhile. That’s a lot of data and the IoTaWatt is still spending the majority of it’s time sampling your current usage. You can time a day’s worth of upload and extrapolate the time to completion.


#7

Had the exact same problem, but i have two iotawatts number one appears to have loaded historical data but number two did not. Followed the instructions and all is well

Thank you