Emoncms and historical data

Hello everybody
I’m a quite new user and I found emoncms as a perfect tool!

I’m using emoncms on a webserver to store (and dashbord) data from electrical metering
I’m pushing data via api input/bulk each day with the data of the day

My question :
My inputs are “plugged” to feed, via phptimeseries

Some time (for many reason), I have historical datas. These data are before the first input of my inputs
Is there a way to push them to emon ?
When I Push them to emon (with input/bulk), I have this messge in emon.log
PHPTimeSeries.php|post_bulk_prepare() data in past, nothing saved

… the only solution I have is to deleted feed, creat a new one, push first my “historical” data, and after push days data

is it possible to do better ?

Hello @manu_gre unfortunately you do need to add datapoints in historical order, it is not possible to add or update a datapoint that is earlier than the first datapoint in the feed.

Hi,
Thanks,

… is it a good idea to put a 0 value at timestamp 0 when I creat a feed ? … like this, I 'm sure to have allways a data “before” !

Unfortunately that would not really be a good idea. If you started at 0 with a PHPFina feed at 10s interval, it would essentially pre allocate every single 10s period from 1970 to today and would end up using 606mb of disk space. For PHPTimeSeries you can only add datapoints that are newer than the most recent datapoint but you can update the old datapoints.

The MySqlTimeSeries feed engine is a bit more flexible on this I think, so you could try that, it is not as well supported as PHPFina and PHPTimeSeries but may do what you want.