Create a Network-Based UPS Monitoring System for Security System Power Backup
Think it’s working? I didn't. My security system’s UPS was a black box of silent anxiety. A power blip, and I’d be sprinting downstairs, heart pounding, just to squint at a tiny LCD. Was it online? How much runtime was left? No clue from my phone. Blind faith in a beeping brick. That's not a plan; it's a prayer. Here's how to stop guessing and start knowing.
The Gear: More Than Just a Smart Plug
Forget "smart" UPS models with their janky cloud apps. We’re going universal. The hero is **NUT** — Network UPS Tools. It’s the universal translator between your dumb UPS and the internet. You need the UPS (obviously), any Raspberry Pi (a Zero 2 W works great), and the USB cable it came with. That’s it. Software does the heavy lifting. This isn't a soldering-iron project; it's a "copy-paste some commands" project. Much better.
Turning Your Pi into a Power Guardian
Here’s the quick and dirty. SSH into your Pi. Run `sudo apt install nut`. Now, you teach NUT about your UPS. Edit the config file (`/etc/nut/ups.conf`). Add a few lines declaring your UPS, its driver (find it via `nut-scanner`), and the USB port. Then, you tell NUT to run as a server (`/etc/nut/nut.conf`). A quick restart of the service, and boom. Your Pi is now broadcasting your UPS’s vital signs — voltage, load, battery charge, the whole shebang — over your network. It feels like magic, but it’s just good Unix.
Bringing the Data Home (to Home Assistant)
This is where it gets fun. In Home Assistant, add the NUT integration. Point it at your Pi’s IP address. Thirty seconds later, you have a dozen new sensors. Battery percentage. Input voltage. Output load. The crown jewel? **`seconds_on_battery`**. Now you can create automations that actually matter. "If utility power is lost for more than 10 seconds, flash all the lights red and send a critical push notification." Or, "If battery drops below 20%, send an SMS." Your security system stops being a silent victim of a blackout and starts announcing its status. Loudly.
From Passive Box to Active Sentry
This changes everything. You're no longer reacting. You're informed. That peace of mind is the whole point. You can be on vacation, see the "Utility Power Fail" alert pop up, and then watch the battery percentage tick down, knowing exactly when your cameras and NVR will go dark. You can plan. You can call a neighbor. You can stop worrying about the one thing that’s supposed to stop you from worrying. The box on the floor finally earns its keep.