Nothing fancy, standard case and for the UPS just a cheap power bank inline. Cheapest solution (doesn’t allow state/charge monitoring) but depending on your needs (we have hardly more than 5 minutes of power outages per year) it can be more than enough.
Just make sure that the power bank can be charged and discharged at the same time and test if it works under full load without forcing a restart on your pi.
I’m not modifying my pi for UPS A Cyberpower 450va in line with the Pi will give about an hour and 25 minutes running flat out and costs less than $70usd. Bonus most of TrippLite/Cyberpowers ups’s are almost plug and play with NUT for monitoring.
Thanks for your response. Do you have a link to the make/model of the power bank you use? I have read a few articles that said using power banks as a UPS could be problematic as when the mains power was cut off and the RPI switched to the power bank, there was enough of a delay in switching from the mains power to the power bank that it could cause the RPI to power-off and potentially corrupt the SD card attached to it.
That model isn’t sold anymore - it’s a ~4 year old anker power bank.
That’s probably correct. I think it depends how the power bank internally works. It can have something like a power path (like a pass through from the charger) or it provides the power from the cells while charging them at the same time (if that’s even possible?)
Any way you need to test it. The first power bank I tried could only be charged or discharged but not at the same time. The second one was that anker one that worked so I sticked with that.
I didn’t buy them new but had them already floating around - so if you already own a power bank (or two) just try them out if they are capable!
I am also looking at PiJuice … to monitor a stand-alone greenhouse with no mains power. I haven’t found anything else that specifies using Solar panels to charge the battery, and integrates with HA.
I went with the PiJuice but found the Raspberry Pi was whinging about not having enough voltage to run itself. Probably because I had an external SSD attached to the Pi. I came home on one occasion to find the Pi had crashed completely and ended up having to restore a backed up Home Assistant image to the SSD before I could get it to start again. I’m now looking at beef-ier standalone UPS options but still in the research stage at the moment.
I read that the supplied battery gives only 4-6 hours of backup power, and that would be shortened depending on what peripherals you have added, and presumably how old the battery is. Though I think a SSD shouldn’t take much power.
More likely because PiJuice is boosting the voltage from a 3.7v battery, and either the battery or the PiJuice current is maxing out. I note the official power supplies are all rated at 5.1v but going from 12.5W for RasPi 3 to 15.3W for RasPi 4 to 27W for RasPi 5. My guess is that PiJuice may have been designed for RasPi 3, and with the supplied battery only just meets the RasPi 4 amperage without any extra hardware.
Maybe I should be looking at a motorcycle or 12v car battery to give 3 days worth of power when it’s pouring rain. Thinking to run out and plug in a powerbank to top up the battery charge - but don’t want to have to do that too frequently
How did you find the HA integration ? Does it expose all the useful sensors, or just the obvious ones ? I am particularly interested in my HA sending notifications as the battery gets low - well before it cuts out.
Hang on … did the PiJuice not shutdown the RasPi cleanly when the battery ran down ? Isn’t that its primary purpose ?
Or was it maybe a SSD disk failure ? Just this week I had fatal disk errors on the SSD in my PC server which runs HA. Thankfully I scavenged another M.2 SSD and reinstalled Proxmox and HA, only to discover that my recent HA backups were on the same disk SSDs are fast - but not so reliable; and the constant recording of sensor data gives them a good workout. I really MUST organise my backups better
I also found that all PiJuice resellers here (Australia) are out of stock, and even worse was PiSuply’s unhelpful reply in May to my query … ignoring most of my queries, and saying only that they hoped to have stock of PiJuice in July, and that they sell other batteries and solar panels.