I am using an emonpi since a year or so to monitor the power generated by my solar panels and the house power consumption. I wrote a an application based on node-red to control a water heater, this way I make a more efficient use of the energy generated by the panels. When running it on the SD card, the system works fine for 2-3 months, then eventually crashes, and upon restart, the lcd screen shows “rasberry pi booting” but it never completes boot. At that point I need to write a new image onto the sd card and off we go.I bought a power supply for the pi with battery integrated, to preserve the sd card getting corrupted because of power outages. But this did not really help.
I then decided to boot from sd, but have root partition on an external ssd drive. I did this following the tutorial https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177&sid=2f4a07f3853a8f79c8ece282a5072dd9
The drive is connected to a usb hub that is powered by a 2A supply. The emonpi boots and works fine for 1-2 days, but then stops working. I can not access the emonpi through via ssh anymore. I have noticed that my external ssd spins down and the small led light turns off regularly. Could this be the problem? shoudn’t the drive that is running the operating system be constantly up and running? Do I need to configure the ssd drive in a specific way for this application?
I am running out of ideas for getting a stable system… any help would be appreciated.