UPS for Raspi 4 B with openhabian

Hi, I’m a beginner, I have Openhabian version 3.1.0 mounted on a raspi 4 B, with node-red and mqtt. I would need a recommendation of ups for when there is a power failure, that is not very common and to avoid problems.
I already have option 53 Setup SD mirroring implemented, but I would like an extra security with the UPS, please one ups that is tested and works for raspi 4.
I have read that many times there are problems that cannot deliver enough amps to the raspi 4.
I’ve seen a lot of chinese hats on aliexpress, Geekworm, piejuice, I’m a little lost
greetings and thanks for the work you do and the many hours of learning that it provides me.

A UPS is a good idea–personally, I’d say it’s more of a requirement than a recommendation.

If you want to stick a hat and a battery on your RPi, then you should look for a tutorial that can tell you how to wire it up and send shutdown commands to your RPi. This wouldn’t be the place for that tutorial, since there’s no need for openHAB in that equation–it’s strictly an RPi task. However, people here have definitely done that, and may be able to point you in the right direction.

Personally, I wouldn’t bother with a hat unless your RPi is in a very confined space. You just need a simple plug-in UPS that is compatible with Network UPS Tools. Then you can just plug in the RPi’s native AC adapter and don’t have to worry about amperage.

the Waveshare one is good.

I have New version RPI UPS Pack not contain lithium batterry,New Expansion Board Power Supply with Switch for Raspberry 4B/3B+/3B|Demo Board Accessories| - AliExpress

Does that one work ? I have a similar one, the older Waveshare model, and somehow it never worked as expected when I remove power input. The main difference is USB-C input vs. some 8.4VDC on mine.
Can you manage or at least read yours ?

Thanks for the quick response, I agree that your solution is the safest and fastest, but I have a space problem to locate a device of that size, adding that you have to leave a safety distance with other devices, otherwise none of them works. The other options that they propose to me, I will have to choose this one, thanks

Thanks
stormi
, I have been reviewing the web and it seems serious but there are many options, could you recommend a specific device and that you have working correctly

Thanks James, I have reviewed the web and I have many doubts, in the order comes only the board, what battery do I need for pi4 and if you could recommend yours.
I also doubt its operation, when there is a power failure, the pi4 continues to work, a few minutes while there is a charge on the battery or it gives the order to turn off the pi immediately, I see that I also need awg22 cables, any indication would be thanks

sorry I had not read your previous post, I will try to explore the option of James

I use a powerbank capable of delivering 2A, since 2017. I am not using additional devices connected to the raspberry though, otherwise the current consumption would be too high. Beware that not all powerbanks are capable of acting as an UPS (they may have a glitch when the power is cut).
You may be interested in this link
https://www.raspberrypi.org/forums/viewtopic.php?p=1603035#p1603035

Yes I can talk to mcu I updated the firmware and it sends a message over uart.

communication heartbeat packets, whether there is an external power failure, percentage of battery capacity, outgoing voltage value.

or

STA Single Bus Interface: the UPS motherboard sends a pulse message (Halt signal) to the Raspberry Pie motherboard before the battery runs out, allowing the Raspberry Pie to safely perform a software shutdown. Once the Raspberry Pie is safely shut down, the Raspberry Pie’s 5V mains power supply is cut off again. (Both the USB-A and the 2P socket are programmed to do so). When the external power is restored, the UPS motherboard will automatically enter the charging process, and when the battery charge reaches a certain capacity, it will automatically restore power to the Raspberry Pie.

I have it connected to a 6000mah batt that I already had. The connector was different so I just soldered the batt to the board. It lasts many hours so its hard to fully integrate as it takes a long time to test.

I have already ordered the: 1) board

The awg22 cables Cable de silicona suave Dupont, 40 unids/lote, 20cm, 24AWG, 1pin, hembra a hembra|silicone wire|silicone cablewire silicone - AliExpress and the battery in amazon https://www.amazon.es/dp/B095BTSMYH/?coliid=I27KXTCWTNANSD&colid=2JQYE1O7ZMKIG&psc=1&ref_=lv_ov_lig_dp_it

When all the materials arrive 15 or 20 days, I will go to work and report to the forum

There’s a bunch of UPS hats for Raspberry Pi (google “rasperry pi upb hat”), which provide enough voltage for the RPi4 (5.1V+) and which can communicate with the Pi itself, so you could trigger some action, of main power is gone.
and there’s some powerbanks, which offer also enough voltage (e.g. EasyAcc 20 Ah) - but they just run out of power (ok, with 20Ah it’ll last a while) - and they will also work, if the powerbank is loading.

Hello,

I’ve implemented an alternative solution to shutdown the raspberry when the power fails, using a supercap and a small microcontroller which generates an interrupt on a raspberry pi4 pin. Thus the raspberry has enough time to shutdown. The micro automatically turns on the raspberry when the power returns.
It works fine, but it needs to be implemented on a PCB. I developed mine which is used as an interface in access control systems. Of course, it integrates OH3.

That basically what the one I posted above does and If I could buy yours for the same price as the one offered I would have gone with that solution. Call it a safe shutdown solution not a ups.

For home automation you don’t really need a UPS because if all the devices don’t have power there is nothing to control.

I enjoyed sharing my experience.

I’m agree with you.

My board is different from the one you posted. It not only has the function of soft shutdown, but inputs, outputs as relays and mosfets, realtime clock battery backuped, RS485 and Wiegand bus … all in one, so it’s sure more expensive.

I also have my modem and router on my UPS, so that openHAB can notify me when the power goes out, when it comes back on, and when the server is about to shut down. Safe shutdown is the priority, but the notifications are nice to have.

When needed, it is best to have both systems: safe shutdown and UPS. In some cases, I use a Meanwell as UPS with external battery, too. So the system notifies when the power fails, when it comes back and when the battery is low.
In every case, if the battery goes too low or there is a fault, the supervisor circuit with the supercap shutdown the raspberry.

1 Like

I just happened to purchase one of these. What driver are you using for networkupstools? I can’t find it on the compatibility list…

I don’t use the NUTs. Please let us know your findings.