Hi,
Just tried to upgrade my emoncms to latest version following procedure here: http://emoncms.org/site/docs/upgrading
Followed instructions all the way to step 7. My data is not being updated. Trying the test: http://localhost/emoncms/input/post.json?csv=100,200,300 returns OK in the browser so that seems to work OK.
If I try posting data as follows: http://192.168.1.68/emoncms/node/set.json?nodeid=10&data=20,20,20,20&api...
I get the following error: Fatal error: Call to a member function fetch_array() on a non-object in /var/www/emoncms/Modules/node/node_model.php on line 194
I have tried rebooting the Pi but it no longer works.
Any ideas?
Re: Upgrade Emoncms Fails
Have you tried "Update and Check"? From the main view select Admin --->Click on the Update and Check button.
I was getting similar error messages after a new install, I selected the Update and Check and several things were "fixed" with that process. Give it a go and let us know what you found out.
Re: Upgrade Emoncms Fails
Hi,
There is no Admin in my emoncms main view. However, I can get to it by typing http://x.x.x.x/emoncms/admin/view
I then click on update and check and get the message database is up to date - nothing to do and it still does not work.
Re: Upgrade Emoncms Fails
OK I got rid of the fatal error - not sure how but it is gone now.
However, am I missing something? I was expecting once updated the existing inputs would just update when data was received from the EmoncmsTx V2 nodes - this is not happening. I noticed the nodes page in emoncms and tried creating a node but again nothing gets updated.
If I update from my web browser with: http://192.168.1.68/emoncms/node/set.json?nodeid=10&data=20,20,20,20&api... my inputs do not update although I get an updated a few seconds ago on my nodes page but no values get updated.
Any ideas?
Re: Upgrade Emoncms Fails
The node module is an alternative posting method to the input module, if you post to either you will not see any change in the other. Do you see any data in the input page if you use http://localhost/emoncms/input/post.json?csv=100,200,300 as in your 1st post ?
If yes then you are the on the right track, using the upgrade path you have (re)moves the whole emoncms directory and only reinstalls emoncms itself without any modules, if you are using rfm2pi you will need to either reinstall https://github.com/emoncms/raspberrypi or install the newly developed emonHub (or oem gateway),
Paul
Re: Upgrade Emoncms Fails
Hi,
Thanks for the info. I see data in the input page using: http://localhost/emoncms/input/post.json?csv=100,200,300
So I have moved the whole emoncms directory as you say and when I compared the Modules directories between emoncms_old and emoncms_new there are a lot of differences. So I now realise that I need to install the following modules into the new emoncms:
git clone https://github.com/emoncms/raspberrypi.git
git clone https://github.com/emoncms/event.git
git clone https://github.com/emoncms/openbem.git
git clone https://github.com/emoncms/energy.git
git clone https://github.com/emoncms/notify.git
git clone https://github.com/emoncms/report.git
git clone https://github.com/emoncms/packetgen.git
git clone https://github.com/elyobelyob/mqtt.git
I had just assumed that following the upgrade instructions would do all I need but I see still have a bit to learn!
Anyhow thanks for your help Paul - you got me going in the right direction to get it upgraded and working.