Hi. I want to use bulk data to upload some data in a CSV file to Emoncms, but I am not sure I have understand correctly how it works.
The first value in each line of my CSV file is the timestamp and the following lines are the values for the given time.
I then try to upload the values using the following format:
http://emoncms.org/input/bulk.json?data=[[1,16,2137],[2,16,3137],[3,16,4137],[4,16,5437],[5,16,1337],[6,16,1111],[7,16,2137],[8,16,1137],[9,16,1266],[10,16,1345]]&sentat=11
I have created a PHPTIMESERIES feed for this input. When I do the upload, I expect that I would be able to see all the above values in Emoncms when I go to the feed and press Show CSV Outputs for the period, but this is not the case. Instead it seems that only one value is added to the feed every time I do a new upload.
Is this the correct way to send the bulk data, or have I misunderstood something?
Isn't the 'sentat' format the best approach when I want to upload from a CSV file where each line have a timestamp, which increases for each line? Maybe someone could come with some examples.
Thanks.
Re: Bulk data upload
Emonhub uses the data format of
data=[[unixtimestamp,nodeid,val1,va2,val3][unixtimestamp,nodeid,val1,val2,val3]]&sentat=unixtimestamp
to avoid any confusion with the bulk upload api. I think the offsets and/or use of times relative to the time of posting are asking for trouble. If you deliver your data with a definitive timestamp, there can be no confusion or reason for error, in theory :-)
Paul