RaspberryPi -> Private instance of EmonCMS

We have an emonTX successfully sending data to our emonBase Raspberry Pi.

I have added the api key and url to our private server "sub.domain.com/emoncms" to the RPi and am seeing "Authentification Successful".

However, when selecting "inputs" on the  private server there is nothing listed.

What should I investigate in order to resolve the issue?

 

Jérôme's picture

Re: RaspberryPi -> Private instance of EmonCMS

"Authentification Successful" means the parameters are correct.

When in the Raspberry Pi tab of local emonCMS, there should be a message up left saying "RFM12 to PI interface script is up and running". I suppose it says so, otherwise you wouldn't get any data into your local emonCMS.

Perhaps can you try to remove the crontab line, kill raspberry_run.php, run it manually

    php /var/www/emoncms/Modules/raspberrypi/raspberry_run.php (out of memory, please check the path is correct)

and see what happens, eventually adding print statements to get a glimpse of what is going on.

rollinson's picture

Re: RaspberryPi -> Private instance of EmonCMS

Thanks for the response Jerome, I have been out of the country and just come back to this issue today.

Prior to this step I set up an account on emoncms.org and pointed the rPi to that in order to confirm that the issue was local rather than an issue with our private emonCMS instance. Once again, no data appeared in the feed section of our emoncms.org account.

After running tcpdump I can see that the rPi talks to the remote server after going to Menu > Raspberry Pi > (update remote emoncms settings) > Save

Which is why I see a messgae "Authentication Successful".

However, there is no visible traffic being sent to the remote server after this. tcpdump has been running for nearly 30 mins now and only the initial communication for authentication is visible.

This leads me to believe that the script is not even attempting to send feed data to the remote emonCMS.

You will have to excuse my lack of PHP knowledge, I am a network guy primarily, hence resorting to tcpdump to view what's going on.

Any help with this would be appreciated as I'd like to get the remote data posted asap.

TrystanLea's picture

Re: RaspberryPi -> Private instance of EmonCMS

First just to confirm, are the inputs appearing correctly on the raspberrypi itself? and updating correctly?

Next I'd just try rebooting the pi with sudo reboot as this is easier than restarting the raspberrypi_run.php script manually if your not familiar with it - the next release of raspberrypi_run.php will fix the bug which means that the settings dont get updated when no data is recieved.

Beyond that I would try what Jerome suggested,  kill the current instance of the raspberrypi_run.php script via $ sudo top, you can find it with sudo top | grep php it will give you a processid such as 2654 which you can the kill by going into sudo top and typing k and then the processid. You will also need to stop the crontab entry before it fires up another entry. You can then run the script manually and see its output in your terminal window.

 

 

rollinson's picture

Re: RaspberryPi -> Private instance of EmonCMS

Thanks Trystan,

I updated the emoncms scripts on the rPi with the newest versions from github that included Jerome's changes. That fixed everything and added the remote path field.

I had used the ready built rPi emoncms image linked from the wiki which must have the older code.

Perhaps an entry in the wiki to prompt users to update to the latest code from github would be in order?

Thanks again!

 

alexfowler's picture

Re: RaspberryPi -> Private instance of EmonCMS

Hi rollison,

I was wondering if you could elaborate on how exactly you updated the emoncms script on the rPi. I have the exact same problem you had and have been racking my brains for the past couple of days trying to solve it.

TrystanLea's picture

Re: RaspberryPi -> Private instance of EmonCMS

Hello Alex, did you use the ready-to-go image for the pi? If so login to your pi via ssh with linux terminal or putty on windows then update emoncms core by first going to the emoncms directory:

$ cd /var/www/emoncms

then following the steps as they appear here for upgrading from v4 to v5 emoncms.org/site/docs/upgrading

Now to update the raspberrypi emoncms module, first go to the module directory:

$ cd /var/www/emoncms/Modules/raspberrypi

then download the latest changes with:

$ git pull origin master

And finally run the database updater again as you did for emoncms core

http://PI-IP-ADDRESS/emoncms/admin/view

That should do it

 

Comment viewing options

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