Apcupsd Integration (APC UPS Daemon)

Hi all, first time posting here. Been using Sense since about Oct.

With the recent support for the Wemo and TP-Link plugs this got me thinking about another potential avenue to help Sense identify tricky devices. I imagine a good portion of us have our computers and maybe even modem/routers on a UPS and unless you went the uber cheap route it’s probably an APC. (or APC re-branded as OEM). The power conditioning nature of a good UPS may make it quite difficult to ever see behind it

There’s an open source project called apcupsd (apc ups daemon) that runs on all platforms and may be a way to gain truth data from these devices.

https://en.wikipedia.org/wiki/Apcupsd

It runs as a server you can query across your LAN to get near instantaneous usage. (The client I’m using here is a windows binary but it’s written in C++ and source is available). Below is a snapshot of my two UPS reporting their usage. One is my local desktop the other is on my modem/firewall stack

image

One downside, or at least minor complication is that it reports back in a percentage based form. Also since every UPS is different there would have to be a small bit of math done somewhere. It also limits your resolution a bit as seen below

image

For this case, 0.35 * 865 watts = 302.75 watts

For some reason they round the load to the nearest decimal so your resolution is within about 1% of the NOMPOWER. (In my case above, ± up to 8.6 watts) Not sure how big of an impact this would have

At any rate, just wanted to toss it out there and curious to see what others think! Happy to provide any more input as needed

3 Likes

Good idea, but I have issues…
I have an APC 1500G that can do this, but requires a USB or serial connection in my service closet, not a place I want to keep a PC. I use a 20 buck HS110 plugged into it to track power consumption of my modem, router, main switch, etc.

I must admit I have a Wemo on my main desktop UPS at the moment but I figured this may be a “free” solution to some. Could run the daemon on a Pi Zero hooked up via USB or something similar tho so a whole PC wouldn’t be needed

I’d like to vote for this local integration as well. I have ~10 UPS in my house that I would like to send the power stats for. Where ever possible I prefer to do local integrations rather than use devices that connect via the internet. My home automation tech is all local with a couple of exceptions.

A pi zero is the perfect platform to integrate this on. I could attach on to each battery and collect the data or forward it to sense for true live data.