Help with forwarding to remote server

Hi. I've installed Emoncms on my remote server at: emoncms.myserver . This seems to be working ok.

On my raspi I've set set

Domain name: emoncms.myserver
Path: /var/www/emoncms

I copied the read and write api key from http://emoncms.mydomain/input/api, and pasted it into the Write apikey field on the raspi.

When I click on Input on the remote server, there is nothing there.

Is there something I am missing / doing wrong? Rob

roblog's picture

Re: Help with forwarding to remote server

If I change the domain name to 'myserver', I get the following error:

Warning: file_get_contents(http://myserver/var/www/emoncms/time/local.json?apikey=******************): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /var/www/emoncms/Modules/raspberrypi/raspberrypi_controller.php on line 52

I do not have a emoncms/time directory, although there is an emoncms/Modules/time directory. I tried copying this into emoncms/ to see what would happen, and got the same error.

Any suggestions please?

 

Jérôme's picture

Re: Help with forwarding to remote server

Hi.

When I installed emoncms on my own server, I first use a subdomain as you did and it did not work at all.

I think it is designed to work this way : http(s)://domain.tld/whateverpath_emoncms/ otherwise the apache rules fail.

I didn't look any further into this and I changed from subdomain to domain.tld/path.

Perhaps someone else can confirm but AFAIK, subdomain is not the way to go with current design. Perhaps can you file a bug in the tracker if you think it would be useful.

 

Now, regarding the settings, here is how it works. (Eg. : http(s)://domain.tld/whateverpath_emoncms/)

Remote protocol (on recent versions) is http:// or https://

Server is domain.tld

Path is "URL path", not local path : /whateverpath_emoncms

On my setup, remote path is simply "/emoncms" (the leading slash should be added automatically if forgotten).

roblog's picture

Re: Help with forwarding to remote server

Hi Jerome. Thanks for that. I seem to have made some progress following your guidelines. I now have "Authentication successful" in the raspi settings, and no error message. But still no feeds on the remote server ..

Jérôme's picture

Re: Help with forwarding to remote server

You mean no input ?

Feeds needs to be created independently on remote server as well.

roblog's picture

Re: Help with forwarding to remote server

Yes sorry no input.

roblog's picture

Re: Help with forwarding to remote server

Hmm, I've just registered an account with emoncms.org, and am having the same problem there. According to the emoncms on my raspberry pi, I have an "authentication successful" connection to emoncms.org, but when I log in, and click on 'inputs', there are non there.

Either I'm missing a (probably obvious) step here, or there's something wrong with my setup.

From the terminal, on my own server, I can see that there is no data entering the database. Is there some way that I can test to see what data the raspi is sending of, and where it is sending it to?

Jérôme's picture

Re: Help with forwarding to remote server

Do you see inputs on the local server ?

Does it say "RFM12 to PI interface script is up and running" in the RaspberryPi module of local emonCMS ?

No -> You need to enable the gateway script. See doc about rasberry_run.php and crontab.

Yes -> Stop raspberry_run.php, remove (comment) crontab line and launch manually (php raspbery_run.php) to see what happens. If needed, add print statements in the php code.
 

roblog's picture

Re: Help with forwarding to remote server

Hi. Have just got it working on emoncms following complete reinstall.

Am taking heed of comments by Peter N at the end of this thread: http://openenergymonitor.org/emon/node/1299

Will try a fresh reinstall in the morning, pointing at myserver, and see how it goes.

Cheers ..

Jérôme's picture

Re: Help with forwarding to remote server

Or stop raspberry_run.php, remove (comment) crontab line and launch manually (php raspbery_run.php) to see what happens. If needed, add print statements in the php code to see the URLs that are generated.

roblog's picture

Re: Help with forwarding to remote server

I woke up this morning and its working on my own server (hurrah!). It seems that it takes a while to change over (as indicated by Peter N at the end of this thread http://openenergymonitor.org/emon/node/1299). Maybe that's what was wrong with it all along, and I just wasn't patient enough .. or maybe it did need a fresh install?? Anyway its working now. Thanks for your help.

All I've got to do now is work out how to configure Apache so it runs as http://myserver.tld/emoncms where myserver.tld points to a drupal installation. I think I'll leave that one till another day tho ..

canary50's picture

Re: Help with forwarding to remote server

folks

can I piggy back on this one, probably a numpty question I'm afraid ..

I've got emontx & emonglcd working fine, I have emoncms setup at http://localhost the database name is emoncms-master

I have uploaded the multinode firmware to nanodeRF and it appears to be recieving data from emonTx & glcd OK but the red led is on. I'm guessing I'm doing something wrong with IP addresses or emoncms subdirectoty locations ?

Serial monitor output is

[webClient]
DHCP status: 1
IP:  192.168.0.11
GW:  192.168.0.1
DNS: 8.8.8.8
DNS status: 1
SRV: 213.138.101.177
Data sent: /emoncms-master/api/post.json?apikey=5aef2d5b1aed19f16a43d76fa0c83e07&json={rf_fail:1}
Time request sent
Data sent: /emoncms-master/api/post.json?apikey=###&node=20&csv=1650
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=170,31,2,23994
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=171,30,1,24006
Data sent: /emoncms-master/api/post.json?apikey=###&node=20&csv=1650
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=170,24,0,24014
Data sent: /emoncms-master/api/post.json?apikey=###&node=20&csv=1650
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=170,30,2,24045
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=168,33,2,24015
Data sent: /emoncms-master/api/post.json?apikey=###&node=20&csv=1650
Data sent: /emoncms-master/api/post.json?apikey=###&node=10&csv=170,35,1,23975

something is wrong, any thoughts ?

thanks

Comment viewing options

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