EMonPi data 'disappears' after 4-6 days

I hope someone can point me in the right direction.

My EmonPi seems to have stopped logging data in mid November last year. It still displays data in real time and for up to six days, but at random intervals between four and six days, the recent data disappears and starts fresh.

This is what occurs now:


The six days prior to this has disappeared.

The Data stopped in November and is blank between then and the current four days:

The data viewer has the same gap in data.

Any thoughts?

Assuming you’re running your emonPi off an SD card, my first thoughts are, how old is it?

If it’s ‘old’ (maybe it dates from 2022 when we last saw you, or even earlier?) I suggest you back up your data to another machine as soon as possible, then get a new SD card and flash the Feb 2024 image (emonSD Download — OpenEnergyMonitor 0.0.1 documentation), then restore your backed up data to the new card.

If it’s a newish SD card, did you use the downloaded (or Shop-supplied) image or did you build it using the scripts? That’s as far as my knowledge of emonPi faults goes, so if this is the case, it will need somebody else to take over from here.

I changed the SD card around 12 months ago, because I was still running off the original one from 2016. I don’t recall exactly what SD I used, but it is likely a Sandisk Ultra or similar with 10Nov22 flash. It had been working fine until last November. I do not recall if I performed an update at that time, but I have done a couple since in case that would fix the issue.

The data displayed above ‘disappeared’ again two days ago. I noticed that the system “up time” exactly matched the new data window. I don’t know how the system works but it seems the data is not being appended to the long term data file. Could it be held in a volitile buffer or swap file and then lost when the system restarts? The system restarting less than weekly is also new to me. I recall having system up time of hundreds of days in the past.

Does this hardware get ‘flaky’ as it ages? Is it time to replace it? The screen has become difficult to read at times.

I’m afraid I can’t help with those questions, you need someone @borpin or @TrystanLea who knows emonCMS and the hardware much better than I do.

I believe this is so, I don’t know the details.

All I can add is I have emonCMS running on an early emonPi with a non-WiFi Raspberry Pi 2 Model B Rev 1.1 - 1GB (Sony UK), and it seems to be OK - the LCD on mine is OK (if you meant this, and not what you see on the web browser).

Yes LCD. Now that I think of it - LCDs are binary (segments either on or off), so that problem has to be the backlight.
Mine is: Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)

This isn’t the full story - I think adjusting the voltages applied will change the viewing angle at which the segments go to maximum contrast, so the problem might be in this area too.

The backlight is controlled - It lights when there’s activity, I don’t know the delay until it switches off it’s quite short.

@TrystanLea - one for you.