Pete's Log: LRDC Update - UPS edition

Entry #1903, (Coding, Hacking, & CS stuff)
(posted when I was 42 years old.)

Motivated by our recent power outage, I decided it was time to add a UPS to the LRDC (Laundry Room Data Center). So I stopped by Microcenter today and picked one up.

The UPS I picked up has five outlets with battery backup and two more with just surge protection. I figured I'd put the following five items on battery backup:

  • ISP Optical Network Terminator (ONT)
  • ISP Router
  • pfSense firewall
  • NAS
  • Switch - which in turn powers the WIFI Access Point and Pi cluster via PoE

However, to my annoyance, I found that there was no way to plug in the ONT without blocking another outlet. Ugh. I opted to plug the ONT and ISP router into a power strip and plug that into one of the outlets. I'm not sure I like it. But So it goes. Now I could plug the Philips Hue bridge into a battery-powered outlet instead of just a surge-protected outlet. Not that any of my Hue bulbs would be online during a power outage.

There's a lot of cable management left to do. But everything is online and working.

Next, I wanted Home Assistant to monitor my UPS and potentially alert me to issues. I found that there is a Home Assistant Add-on that should make this pretty easy for me: Network UPS Tools Add-On. So away I went and happily installed it. And then fell victim to some sort of blindness. This is the configuration screen I saw:

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

The next step I was supposed to perform after installing the add-on was configuring it, and I just couldn't find where to do that. I spent a lot of time searching with no luck. Finally I happened to glance a little higher.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

There it is, right at the top. After I finally noticed the Configuration tab, I remembered I had had the exact same issue with the HA Let's Encrypt add-on. I don't know if it's the nice border around the screen in the first screenshot or what, but the placement of that Configuration tab has now twice caused me to be completely blind to it. Maybe it's just the general mushiness of my brain caused by parenthood.

Anyway. The next issue I accept no blame for.

After getting the Add-On configured, HA was kind enough to auto-discover it. It proudly informed me of this fact.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

So I went along with it and said yes I'd love to configure the thing you auto-discovered. Nope. After entering the user and password I had configured (which were the only options it would allow me to configure), it just told me "Failed to connect"

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

Sigh. Let's check the logs. The logs tell me "Failure getting NUT ups alias, Socket error". DuckDuckGo and Google both fail to provide me any promising leads on that error. I play and poke around for a while. I don't remember why, but I finally decide to bypass the auto-discovered route. I opt to manually add a NUT integration. HA helpfully reminds me that it auto-discovered one.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

I tell HA that no, I want to set up another instance of Network UPS Tools (NUT). It provides me a new configuration screen, similar to the one in auto-discovery mode, except this time I can enter a hostname and port.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

It defaults the hostname to localhost and the port to the default NUT port (3493). I enter the same username and password I've been using all along. It connects.

In disbelief, I actually canceled out and tried the auto-discovery option again, thinking maybe I somehow pasted the wrong password a dozen times. But no, that still doesn't work. So I don't know what the auto-discovery option is trying to connect to. Anyway, it's working now. But I can't say it's been a good week for Home Assistant.

But wait. It gets worse. After the above write-up, I decided to "ignore" the "discovered" NUT integration. I figured this would just ignore the one it found but failed to configure. And it did ignore that one. But it also removed the one I had successfully configured. So I had to go and unignore and then reconfigure it. And so it now looks like I'm going to have to live with HA regularly telling me about its auto-discovery.

I suppose there's a chance all of the above can be blamed on toddler brain. But I dunno.

Anyway, now that I can monitor it, I can see that with everything turned on, I am running at 20% load on the UPS. Which if I'm reading their specs right means I should last just over a half hour without power. That seems decent.