Emponpi - suspected failed upgrade

Hi There,
I have owned an EmonPI for a while now and it has been collecting state for a couple of years. I noticed that is failed to connect to the wifi so i pulled in ethernet and it immediately began an upgrade (not sure which version from/to).
the Upgrade hung on “Upgrading, do not unplug” for a couple of hours so I rebooted it and now it hangs on “Booting…please wait”.
I have shelled in using ssh and tried various manual upgrades using the various .sh files and readme instructions which all complete successfully but then various services fail to start (emonhub and emonpiLCD).

From what I can read the best way to solve the issue is to export the data then flash a new SD card and import it. That raises a couple of questions

  1. How can i get to the SD card - the box is in a sealed container?
  2. I have been able to export but the data but am not sure thats correct as its only 1k and it has two years of data

Thanks in advance for any help / wisdom

I cannot answer the question about backups - but agree there’s not enough data there. Looking at my ‘test’ emonPi, a single 18 months old feed is 20 MB.

Regarding the SD Card, what is the sealed box you refer to? Does your emonPi look like this:

To get to the SD card, your need a Torx T20 screwdriver or bit (A decent tool/DIY shop) and take the end plate off at the pushbutton end. The SD card is there.

Thanks Robert,
Okay so i went and got a T20 and did as suggested, i flashed a new card and then put the old card with the data into the USB slow and ran an import - all good - all data there…

BUT the device LCD hangs on Booting… this was happening before but i thought/hoped it was because the USB with the old card was inserted. Now thats removed and the imported USB is no longer present it would suggest maybe its a hardware problem somewhere?

Any thoughts on how i can debug also i think because the UI is borked and i dont have ssh enabled in this system, i can no longer ssh in to try and update that component manually.

i see this when i try to upgrade via the ui

Stopping emonPiLCD service
Display update message on LCD
Traceback (most recent call last):
  File "/opt/openenergymonitor/emonpi/lcd/./emonPiLCD_update.py", line 8, in 
    bus = smbus.SMBus(1)
FileNotFoundError: [Errno 2] No such file or directory

and this on the system info screen

anyone seen this before or got any bright ideas…

Hello @DigitalBanana which Image version did you flash to the new SD card? does restarting the emonPiLCD service from that interface help at all? or does it always crash with that error?

It’s possible to enable SSH by putting an empty file named ‘ssh’ on the boot partition of the SD card if you need a work around in the mean time.

Would be good to understand why you’re getting the above issue though on a freshly flashed image…

okay so i got a new sd card, flashed it with emonSD-21Jul1 then imported the old data and all was fine.

so am guessing the original problem was a failed upgrade that left the installation in a borked state, the sd card i used to create a new installation had a fault (maybe) and so that mostly worked except for the LCD (weird)
the new sd card i bought worked fine so i “think” the above is true - working now though

no tried this i managed to shell in using the method prescribed below but kept seeing

Traceback (most recent call last):
  File "/opt/openenergymonitor/emonpi/lcd/./emonPiLCD_update.py", line 8, in 
    bus = smbus.SMBus(1)
FileNotFoundError: [Errno 2] No such file or directory

yep thanks for this tip - i found this somewhere in the forums but i couldnt get passed the same issue, thats when i decided to get a new sd card which seemed to resolve this issue. well it was a fresh image flashed to a new card that solved it

very strange though