easy way to download feeds

how can I download feeds from emoncms? I have no experience with mysql databases and

can't find the file where the feeds are stored.

I want to copy a specific feed to another computer for analysis. 

Thanks for your help

Dominic

 

 

john.b's picture

Re: easy way to download feeds

Assuming you are using your own server and you want an output in csv format; then you can use the attached php script.

First unzip and place place the script in your /var/www/emoncms directory

Then edit the script password line to your actual mysql password

Then from a browser on another pc enter http://host/emoncms/feedtocsv.php?id=8&start=1360627200&end=1363219200

Where host is your server hostname or IP address.
id is the feed number your want.
start is an optional 10 digit unix start time.
end is an optional unix end time.

Be aware that this is not secure if your server is exposed to the internet

dafroberts's picture

Re: easy way to download feeds

Hi,

I'm just trying to get this to work but get the following error:-

Can not connect.Access denied for user 'root'@'localhost' (using password: YES)

Do I need to modify the 'localhost' and 'root' in the php script?

If Yes what should these be modified to?

Thanks in advance....

john.b's picture

Re: easy way to download feeds

Are you sure you have the right password entered in the script?

Can you manually enter mysql with 'mysql -u root -p' ?  You should then see a prompt for the password, enter the correct password and then you should see the mysql> prompt.  Exit with '\q'.  If that doesn't work then you are probably using an incorrect password.

 

 

modenet's picture

Re: easy way to download feeds

and to upload localdata to emoncms.org?

TrystanLea's picture

Re: easy way to download feeds

To download feeds from emoncms.org the easiest way is to use the feed export API.

http://emoncms.org/feed/export.json?id=FEEDID&start=UNIXTIME

this will create a file that will download.

jostor's picture

Re: easy way to download feeds

When you download a timestore feed using the export API you get a .dat binary file. Do you have an easy way to read and get some useful information out of this file?

I also have a feature request: I think it would be very useful with a download data button next to a graph. If you press the download data button, you will download the data displayed in the graph. The data should be downloaded in csv, xml or similar format (easy to import in a spreadsheet).

Thanks for your help and for your great work! 

modenet's picture

Re: easy way to download feeds

are there any ideas to import data from my local emoncms to emoncms.org?

thanks in advance

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.