Community
OpenEnergyMonitor

OpenEnergyMonitor Community

LCD Screen says "Updating - Do Not Unplug" (updating system from V8.5)

A long time ago my emonPi took an update and on reboot it showed “Updating - Do Not Unplug” on the screen. It stayed displaying this indefinitely, and eventually after a reboot it came back to the same screen. The emonPi appears to be working ok, I can SSH to it and connect to it via the Web UI, and the sensors continue to update. However I’m not able to update to a later version, add any sensors, etc.

I’ve tried restarting the emonPiLCD service which claims to work, but doesn’t do anything. Any suggestions what options there are to get it back up and running?

Just to add some info, it’s a very old image (emonSD-17Jun2015). When trying to force an update, I get the following from the log:

Stopping system emonPiLCD daemon:start-stop-daemon: warning: failed to kill 2306: No such process
No process in pidfile ‘/var/run/emonPiLCD.pid’ found running; none killed.
failed!
I2C LCD DETECTED Ox27

Starting emonPi Update >
via update
Wed Oct 16 22:16:02 UTC 2019

#############################################################

emonSD version: emonSD-17Jun2015

ERROR: emonSD base image old or undefined…update will not continue
See latest verson: https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log
Stopping update
Job is already running!
Job is already running!
Job is already running!

Yes that image is too old to update - too much has changed. Your only option is to export the data, create a new image (new SD Card recommended - or buy one from the shop preloaded) and then import your data.

HTH

Thanks - I’ll try this over the weekend. Looking through the guides, I’m trying to find the best way to do a backup on v8.5 so I can restore to a new image, but the guide i can find says to update the image before backing up, which I can’t do:

Is there another guide somewhere showing the best way to backup an old image, which I can then restore to a new one?

Mark

Firstly I’d suggest using a new SD Card - they do have a limited life and it gives you a roll back position (i.e. just put the old card back).

Secondly, I would do a manual backup rather than trying to install the module on an old system.

You don’t need to backup everything, just the data.

However, there were some changes to the data format around that time that required a transformation script to be run IIRC. @glyn.hudson @TrystanLea can you help?

So, I’ve got a new microSD card with the Oct 2018 stable image written to it. I haven’t yet booted it, but will do that tomorrow and expand the data partition.

I’ve not managed to get a backup of my data though - I’ve copied the backup files to a folder on the emonPi, made the script executable, configured the “config.cfg” file (not 100% sure it’s correct though) and tried to run the backup - but I get the following…

Thanks,
Mark

[email protected]:~/backup$ ./emoncms-export.sh
=== Emoncms export start ===
Fri Oct 18 23:34:32 UTC 2019
Backup module version:
    "version"      : "2.1.4"
EUID: 1000
Reading ./config.cfg....
Location of databases: /home/pi/data
Location of emonhub.conf: /home/pi/data
Location of Emoncms: /var/www/emoncms
Backup destination: /home/pi/backup/
emoncms backup module location /var/www/emoncms/Modules/backup
Image version: emonSD-17Jun2015
Log is turned off
Stopping feedwriter:  (feedwriter.php was not running...)
stopped
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
Error: Cannot read MYSQL authentication details from Emoncms settings.php

In the backup folder, can you do a

git describe --debug --tags
git status

from the backup folder please.

and post the config.cfg

Cheers

OK so I know why. The way settings are processed has changed. I have raised a PR #48

go back to the old version of backup by

git checkout 1.2.0

and try again.

This is proving somewhat more successful, the backup script kicked off fine when using 1.2.0, however I’ve now hit a disk space issue on the root partition. Just doing a clone of the SD card in case I break anything, and will then look at either changing the backup location or expanding the root partition (though that looks like it requires a few steps). I’ll report back this afternoon.

use

du -a / | sort -n -r | head -n 20

to find the largest files (probably logs)

To make the files smaller (deleting them can be a bad idea) use

truncate -s 0 /var/log/<log file>

HTH

Problem solved, it was an error in my config where I was putting the backup in /home/pi/backup. Moved it to /home/pi/data/backup and it has now completed successfully. Now to boot the new image and try an import.

I assume I should be safe to use the 2.0.0 backup script to import the data on the new image, or should I stick to 1.2.0?

It will be a different version I suspect.

Just get EmonCMS fully up to date and then do the import. Remeber once you import you need to use the original account info to log in.

You may find an oddity with the dashboards…

Oh and be patient…

Take a while to do all it’s bits first time.

Will do - many thanks for all the help, I’ll update once complete.

Hi,
I now have a new installation fully updated and ready to go. I’ve ensured it is updated, and have imported the backup through the web interface import utility. It appeared to progress well untilI got the following errors:

emonPi%20Import%20Error
emonPi%20Import%20Error%202

I also get an error on the Web GUI:
**Notice** : Trying to get property of non-object in **/var/www/emoncms/Theme/basic/menu_view.php** on line **144**

Also:
Database error, you may need to run database update

I’ve seen reports of this last error and the requirement to do a manual database update using the PHP script described here, however the script doesn’t appear to be available in that folder:

Any thoughts as to the next steps?

Found that the emoncmsdbupdate.php script is now in the update folder…

You should just be able to do it from the admin screen.

What page was this on?

The errors were pop-ups in Chrome, whilst importing the data through the GUI.

When selecting “Graphs” on the left, I still get a pop-up error in Chrome:

image

Incidentally, the data is imported (though I don’t know if it was a clean import) - I can see the graphs with my old data, but can’t currently see how to get new data logging to the old dataset.