I picked up a Bluetti Elite 30 V2 as a UPS for my homelab, and it ended up changing a lot more than just how long my servers stay up during an outage. It let me rip out a whole layer of scripts I'd built around a problem that, it turns out, no longer exists.
The old problem
My previous UPS didn't have a USB or data connection I could use to check power state programmatically. Even if it did, it wouldn't have mattered much, since my Unraid server (the biggest power draw on my table) spends most of its time asleep. Unraid pulls around 60 watts on a normal load, and it isn't even doing much CPU work at that point. It's just idle and thirsty. So I put it to sleep whenever nothing hits my Immich domain, which is where the Immich service itself is hosted, and a script on my Ubuntu server wakes it back up with a magic packet whenever that domain gets hit.
That setup meant I had no direct way to know if the power was actually out. So I built around the next best signal I had: internet connectivity.
The old setup: three scripts revolving around internet
I run PLDT in bridge mode since their stock modem/router is too limited, with a MikroTik handling routing and connections. The PLDT modem itself was never plugged into the UPS. That gave me a crude but workable signal: if the internet goes down, the power is probably out.
Three scripts made this work:
- A script on the MikroTik that checked whether internet access was down.
- A script on my Ubuntu server, meant to run rain or shine, handling the response.
- A script on Unraid to wake on power loss and shut down again once things stabilized.
When the internet dropped, MikroTik would send a magic packet to wake Unraid (so it could ride out the outage on battery for its own workloads) and shut down the Ubuntu server to conserve power. It worked, but it was built entirely around a proxy signal, not the thing I actually cared about.
Why that stopped making sense
The Bluetti Elite 30 V2 changed the math. I've already tested it: roughly 20 percent battery drain per hour under a continuous 50-60 watt load. Power outages just aren't the emergency they used to be. But my old setup still had a fatal flaw for the new reality: it shut down the Ubuntu server during an outage. That server hosts my websites, and I want those up all the time, outage or not. Internet loss was never actually the right trigger to be shutting anything down on.
The new setup: ping a CCTV camera instead
The real question was never "is the internet down," it was "is the power actually out." I needed a signal for that specific thing, something local, something not connected to the Bluetti. My CCTV camera fit perfectly: it's a local device on its own power, not on the UPS, so if it stops responding to pings, that's a real power outage, not just a flaky ISP.
The new script logic:
- Ubuntu server sends a Wake-on-LAN magic packet to Unraid only when the CCTV camera is reachable, and does nothing when it isn't. Traefik still hits the Immich domain constantly, but that traffic no longer triggers a wake on its own; the CCTV check happens first.
- The MikroTik no longer needs its WoL script at all, since there's no more "internet outage" case to react to.
- Ubuntu no longer has any shutdown logic tied to internet loss. It just stays up.
- Unraid, once woken during an actual power outage, runs its own check: ping the CCTV camera, and if it fails three consecutive attempts at 15-second intervals, shut itself down.
An Immich domain hit no longer wakes Unraid by itself if the CCTV is down, which is exactly the behavior I wanted. No more guessing based on internet status, no more taking down my own websites over a hiccup with PLDT.
The result
One fewer script on the MikroTik, a simpler Ubuntu script that only wakes Unraid on a real power signal, and an Unraid shutdown script that reacts to the actual outage state instead of an internet proxy. It's a small change on paper, but it fixed a design flaw that had been sitting quietly in my homelab since before I even had a UPS with this kind of runtime.