UPS Monitoring from a Raspberry Pi

I have a raspberry Pi that I use for my Tablet Dashboards. I am thinking of attaching a APC UPS to it to monitor my power and also keep things working. Is there a way to "Check" the status of the UPS from a Hubitat device? Can I link a URL on the Pi to a Template so I can see the status page of the UPS. If I wanted a Pushover notification, is that possible? Just spitballing here

+1 for interest in this... I'm using a RPi to run House Panel and both the HE and RPi are on a UPS... Was previously looking for something in the RPi to notify me when they both went to UPS... Got busy and have shelved that for a minute...

Take a look at the Linux upsd, and it's counterpart upsmon command line tool.

Both of these are installed as part of the nut package install (at least, they are on Debian and Ubuntu)

sudo apt-get install nut

You should be able to configure upstool to use a shell script that pushes Status data, over Hubitat's Maker API via curl.

There are a bunch of config steps to getting upsd working with your specific UPS (APC, etc) and how it's connected to the rPi (USB, Ethernet, etc). The steps don't look too complex overall.

There's a similar(ish) discussion in this thread

I found this:

At worst it could send an email to pushover. But I want more, maybe status on my HE dashboard AND a pushover message :))


I got APCUPSD running. Changing to NUT probably isn't a big deal. I have just started to look into Maker API but it looks so far that it only does a GET not a Push. Once getting the info to HE through the API, how would I display it? A virtual device of some type?


Yes. I have a system that's doing that for the sensors of my Alarm system. In my case, I created a bunch of Virtual {Contact|Motion} Sensors and pushed the information there. In some cases, there wasn't a handy Virtual device to cover what I needed, so I mapped it's values to the 2 states of a a Virtual Contact Sensor.

If you have apcupsd running, then it's likely you can do something similar with it, avoiding the need to move to the nut bundle.

So theorhetically I should be able to parse out the output from apcaccess and use curl to send specific info to a device in the HE and use attributes to show status. This might be pretty ambitious and I don't know how to do it but a custom device could be created?

Yup, see this thread (the latter parts) for a more native version:

Sweet. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.