Community
OpenEnergyMonitor

Community

Upgrading emonSD-07Nov16 to latest via emonPi/emonbase update

Following discussion in this post, emonSD-07Nov16 has now been added to the emonPi/emonbase update safe list for automatic update via the in built emonPi/emonbase update mechanism.

Before starting the update process make sure to backup your data first.

Troubleshooting

Halfway through the update the log screen shows a bit of a glitch, this is because emoncms is being updated behind the scenes and requires logging in again. Wait a couple of minutes before refreshing the page and you will be directed back to either ethernet/wifi selection screen or the emoncms login screen, depending on your configuration.

Once the update is complete, you may see a javascript table draw error on the feed page, refresh/clear your browser cache and the error will disappear.

Manual update

If something else goes wrong and the update does not complete (e.g if you have a custom change in the emonpi repo). Its possible to run the update manually via command line. To do this, SSH into your emonpi/emonbase and run the following commands:

Manual update of the emonpi repository (remove any custom changes if applicable before doing this)

cd /home/pi/emonpi
git pull

Run the automatic update process (emonpi hardware):

/home/pi/emonpi/service-runner-update.sh all emonpi

emonbase (rfm69pi) hardware:

/home/pi/emonpi/service-runner-update.sh all rfm69pi

I also tried updating emonSD_May16 later yesterday and had inconsistent results, after the update the services would sometimes start and sometimes not on reboot (the apache log folder did not always exist). I also had an issue with triggering a further update as the update process was being ran as root but I couldnt get to the bottom of why that was, it may be related to a conflict between the new and old service runner running at the same time, although I did try stopping the older service runner and removing its cron entries. This needs more investigating.

I also tested emonSD_7Jun15 which is definitely not compatible with the latest update. Primarily PHP version related syntax incompatibilities and missing systemd in that version of the OS.

If you wish to update an older version than emonSD-07Nov16 it’s advisable to download the latest image, export your data from the original image and import the data into a SD card running the new image.
If everything is working fine, you may want to wait for the next image based on the automatic build script that will include a number of useful improvements in particular to the way logging is handled.

Latest image: https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log#emonsd-30oct18-stable

Export/import process: https://guide.openenergymonitor.org/setup/import/

@TrystanLea, I think making the transfer of data simpler need to be a priority. Rather than directing someone to install another module, I think we should point them to a script they can just get with curl/wget and run (like the install script) in these instances.

It is highly likely these early images will still use the original data locations so that should not really be an issue.