import all from emoncms to local server

 Hi all,

First, forgive my bad English.
I hope to ask the question so comprensiblile as possible.

im starting sending data to emoncms from 2 dec.2012 and it works fine !!

Now i have a wamp server running on my old Laptop, have setted up the emoncms on my own server.

Before switching my nanodeRf to my own server, I would like to be able to import all the data stored until now.

Have tried to do this reading the blog post from trystan --> http://openenergymonitor.blogspot.ch/2012/09/data-portability-version-1-complete.html

without any success :-(   (how i must run the import.php script ? )

There is another possibility?  don't like to restart all my measure from 0 :-(

 

Thanks all

Saluti

Remo

 

 

edllew's picture

Re: import all from emoncms to local server

After you have setup the download queue as shown in the image on the blog post, on the target system (your laptop) go to:

/var/www/emoncms/Modules/sync

and run

php import.php

This worked for me recently on my RasPi.

-Ed

remino's picture

Re: import all from emoncms to local server

Hi Ed,

the problem consist in the fact that i don't know how to setup the download queue...i not see the the Sync button :-(

when i click on the Link to download to the latest version of Emoncms...here appear the old emoncms3 !

I think i have the newer emoncms  version now, and the import.php script i have manually downloaded.

but no idea how to initialize the sync process.

thank you

Ciao

Remo

edllew's picture

Re: import all from emoncms to local server

Do you have the sync module from

https://github.com/emoncms/sync  ?

If installed correctly, it will present a "sync" option on the top bar of emoncms.

 

remino's picture

Re: import all from emoncms to local server

Hi Ed,

thank you for the information, i was able to set up the sync module.

now , i click on the Sync button

paste in my Apikey

following errors appears

-----------------------------------------

Notice: Undefined index: id in C:\wamp\www\Modules\sync\sync_controller.php on line 48

------------------------------------------------------

but all feeds appear on the list as follows

--------------------------------------------------------------

 

Feed name Remote ahead by: Queue Position Sync
power1 43 years Queue position: 0 >

-------------------------------------------------

so, if i click on import.php trought firefox , the entire php code is displayed on the screen !!

nothing happens

what is wrong ? :-(

 

Any idea ?

 

Bye and thank you again

Saluti

Remo

TrystanLea's picture

Re: import all from emoncms to local server

Hello Remo, sorry for the trouble with the sync module, I should have documented how to use it! I have now added a readme to the module see here: https://github.com/emoncms/sync

The steps for installation and use are:

1) Install this module in your emoncms/Modules folder:

$ git clone https://github.com/emoncms/sync.git

2) Log in to your local emoncms account and goto Admin. Run the 'Update & check' database tool.

3) Click on the Sync menu item in the top bar to bring up the sync page.

4) Enter you remote emoncms account WRITE apikey. A list of the feeds in your remote account should now appear

5) Select the feeds you wish to download

6) In terminal navigate to the sync module in your emoncms installation:

$ cd /var/www/emoncms/Modules/sync

7) Run the import.php script to start downloading the feed data

$ php import.php

Thats it! your data should now be downloading

------

When you say the entire php code is displayed on the screen that seems a bit strange and not great? 

remino's picture

Re: import all from emoncms to local server

Ciao Trystan thank you so much :-)

The readme file was very helpful !

i will try again, thanks again...

Ciao

Remo

remino's picture

Re: import all from emoncms to local server

Hi again,

i receive this result on the terminal (screenshot).

It's perhaps 16 feeds at one time to much ?

Greetings

Remo

remino's picture

Re: import all from emoncms to local server

After Sync and Import , all the feeds Value remain at Value "0".

 

Any Idea ?

 

Saluti

Remo

 

TrystanLea's picture

Re: import all from emoncms to local server

Hello Remo, did the all the feed data import, can you check via a visualizations or by checking the database directly via phpmyadmin?

remino's picture

Re: import all from emoncms to local server

Hi Trystan,

thank you for the fast answer.

I will check it this evening, but i remember, yesterday a take a look in the phpmyadmin and i see that here are actual data from the imported itself.

 

Bye

Remo

 

TrystanLea's picture

Re: import all from emoncms to local server

Ok great, To increase the time limit you can edit line 20 of import.php to be whatever setting you need, at the moment it is: set_time_limit (120);

remino's picture

Re: import all from emoncms to local server

Thank you,

i will set the timeout to for ex. 30 Min --> 1800 sec.

I will try it this evening.

 

Thank you again and have a nice day.

Ciao

Remo

 

remino's picture

Re: import all from emoncms to local server

hello Trystan,

have setted the timeout time to 1800 sec. the import.php script was running correct.

in the phpmyadmin base all the feed was stored (including values for each feed).

But on the emoncms feed page all feeds shows "0" value :-(

any more ideas ?

Thank you

Remo

EnergyRnR's picture

Re: import all from emoncms to local server

folks,

can you run import.php in a browser? I've tried and get 'already running'. This is on a hosted server without shell access. I don't see the lock file so I'm interested to hear if others have seen this?

thanks,

Eamonn

Tomis's picture

Re: import all from emoncms to local server

Hi

I have moved the root system to usb hdd and tried to download the feeds from emoncms.

All went OK but still feed are zero. Is there any way to have the input process list downloaded from emoncms to rasp?

Thanks!

Comment viewing options

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