I saw there is an API but I get empty answer when calling API with what I think should be the right one
For example http://emoncms.org/feed/data.json?id=28419&start=1389038400&end=1389042000&dp=1000
Archived Forum |
|
Are there any tools to export data from time store feed?Submitted by rsegoly on Tue, 07/01/2014 - 18:40I saw there is an API but I get empty answer when calling API with what I think should be the right one
For example http://emoncms.org/feed/data.json?id=28419&start=1389038400&end=1389042000&dp=1000
» |
Re: Are there any tools to export data from time store feed?
Have you tried including your Apikey ?
If you look on http://emoncms.org/input/api you can see the format
Re: Are there any tools to export data from time store feed?
Yes http://emoncms.org/feed/data.json?id=28419&start=1389038400&end=1389042000&dp=1000&apikey=........
Re: Are there any tools to export data from time store feed?
OK so your feed is public as anyone can view/download it.
If you look at this page http://emoncms.org/feed/value.json?id=28419, it will return the last value which works...
"6214"
So the problem is with the start/end part.
I think you've got the values in seconds rather than in miliseconds?
So if you try http://emoncms.org/feed/data.json?id=28419&start=1389038400000&end=13890...
It appears to get some data back.
Re: Are there any tools to export data from time store feed?
Hi,
Did someone try the module developed by xarorsa to download timestore data from Emoncms to a csv file.
It should allow you to meet your needs in a very simple way. Have a look here.
I am interested in it, so let me know if it works fine
Eric
Re: Are there any tools to export data from time store feed?
indeed using UNIXTIME with miliseconds did the trick, thanks
I did not use the download tool, the script was too complicated and I will not be able to maintain and support it. I will try to convert the structure myself
Re: Are there any tools to export data from time store feed?
Take a look at this thread http://openenergymonitor.org/emon/node/3397 - dkeach has created a really good python script to download data into a csv file/series of csv files.
I still cannot get it to work properly in Python 3, but it works just great in Python 2 !
Pat
Re: Are there any tools to export data from time store feed?
Pat,
The link you posted above returns a page not found error....
(http://openenergymonitor.org/emon/node/3397--)
Regards,
Bill
Re: Are there any tools to export data from time store feed?
... for very obvious reasons. I've edited it for him. (A parser quirk caused the damage, you MUST have a space each side of a potential link.)
Re: Are there any tools to export data from time store feed?
Got it.
Thanks for the link info, Robert.
Re: Are there any tools to export data from time store feed?
Odd. Sorry. Try this one ?
link http://openenergymonitor.org/emon/node/3397
Pat
Re: Are there any tools to export data from time store feed?
I've got a local copy of emoncms I've just set up running on a debian server. When I try to use the CSV export function on feeds I'm getting a fail though.
A page is generated like this:
http://192.168.0.3/emoncms/feed/csvexport.json?id=8&start=NaN&end=NaN&in...
(I know you won't be able to see this as it's on my LAN but you can see the format of the URL)
But this just gives "false" as the response. There's no data.
To my beginner's eye it seems to be missing the unix time stamp...? I had selected dates and times from the popup form.
Any ideas appreciated.
My databases are PHPFINA and PHPFIWA if that makes any difference. I think I've seen that my previous emoncms.org data would export for timestore data but not for mysql.
So do I need to get the data out another way for the mysql databases?
Thanks for any pointers
Michael
Re: Are there any tools to export data from time store feed?
As your feeds are not stored in Timestore, the thread you reopened probably isn't the best place for your question.
Could you post a new forum post with a topic that helps explain what your problem is?
Such as " csvexport from phpfina / phpfiwa"
It would also be good to explain a bit more how you get to the pop up form you talk about as its not something I recognise.
Re: Are there any tools to export data from time store feed?
Have you tried adding the API key to the end of the URL?
I was getting FALSE returned when trying to get data, adding an API key fixed it. See the API help on the emoncms serevr pages.
Re: Are there any tools to export data from time store feed?
Thanks both for your comments and apols if I reopened a dormant post but this seemed very similar to my problem.
As is often the case your comments made me poke around in some new areas and I've fixed it. I'll highlight it here so it's recorded for others at least.
When I went to my Feeds page and clicked CSV Export button to the right hand side I was presented with the CSV export form: start, end etc
However the timezone was pre-populated with NaN, which I'd assumed was a code for this timezone (instead I believe it's Not a Number). This was giving me "false" when I ran the form to export.
When I set the timezone to zero i.e. 0 then my data is exporting fine.
Sorted.
Ta all :)
Re: Are there any tools to export data from time store feed?
If you want it into excel try http://openenergymonitor.org/emon/node/4032
It seems timestore will only return a max of 1000 points. Have not played with the macro I wrote any further and info on th API is very thin on the ground.