upgrade from 8.5 low-write

Hi

I'm running the lowwrite 8.5.0 on my Pi and want to upgrade to the latest version.

So just to be sure. I should follow this guide: https://github.com/emoncms/emoncms/blob/master/docs/Upgrading.md

and after that enable the low write mode as described here:

https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/Low-writ...

Is this the way to do it?

Thanks.

 

Paul Reed's picture

Re: upgrade from 8.5 low-write

That upgrading guide is pretty much out of date, my suggestion would be (presuming that your using Raspbian Wheezy);

Compatibility
v9 is compatible with MySQL, phpfiwa, phpfina & phptimeseries data. If you have any other formats, they will need converting first

Backup
Ensure that you have securely backed up your data - this post is probably the best to follow.

Update to v9 (in full-write mode)

Put your pi in rw mode;

rpi-rw

Stop emonhub

sudo service emonhub stop

Backup existing emoncms version

cd /var/www && mv emoncms emoncms85

​Install emoncms v9

git clone -b stable https://github.com/emoncms/emoncms.git

Create a new settings file:

cd emoncms && cp default.settings.php settings.php

Enter your mysql database settings in settings:

nano settings.php

and also change the datadir folder locations to /home/pi/data/ instead of /var/lib

In your browser login to emoncms:

  • Check the Administration page - 'Setup > Administration' noting and acting upon any messages reported.
  • Update your database - 'Setup > Administration > Update database'.
  • Ensure that the correct timezone is selected & saved in 'Setup > My Account'

Flush Redis & start emonhub

redis-cli flushall
sudo service emonhub start

Your inputs & feeds should now start updating, and you should again check the Administration page and deal with any messages reported in there.

Switching to Low-Write mode

Enable feedwriter

cd /etc/init.d && sudo ln -s /var/www/emoncms/scripts/feedwriter
sudo chown root:root /var/www/emoncms/scripts/feedwriter
sudo chmod 755 /var/www/emoncms/scripts/feedwriter
sudo update-rc.d feedwriter defaults

And then activate Low-write;

nano /var/www/emoncms/settings.php

In the section:

  • Redis, change $redis_enabled from false to true
  • Redis Low-write mode change enabled from false to true, and optionally change sleep to a number (in seconds) which emoncms must cache before writing to disk.
  • Engine settings, change //,Engine::PHPFIWA // 6 to Engine::PHPFIWA // 6 to disable PHPFIWA being an option for future feed selection.

Save & exit, put your pi back into ro mode, then power off your Raspberry Pi, followed by powering it back up:

sudo poweroff

Can you let us know how it goes, as it may help others, and help re-write the upgrade guide.

Paul

haden's picture

Re: upgrade from 8.5 low-write

After upgrade the dashboards are missing.

Follow the guide on https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/general.... to get the dashboards back.

 

Comment viewing options

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