[DRIVER] NUT Discovery + UPS & Outlet Status

Wanted to add my thanks to @guyeeba for these drivers. Getting NUT working on my RPi4 was the most difficult part. Your drivers were easy and look to be working great. So again, thank you.

1 Like

Is there a guide for how to set this up, including the NUT setup for a Raspberry Pi? I found this, but I think I am missing something. Any help you guys can provide would be great. For reference when SSH into the pi I can see and communicate with the CyberPower UPS, but Hubitat cannot see/connect to the pi.

Specifically, what are the setup parameters in Hubitat? I'm guessing the IP or hostname of NUT server is the IP or hostname of the Pi in my case, but is Username at NUT server the username to get into the pi, or is it another user I have to make within NUT? The same question for Password at NUT server is this the Pi password, or is it another password for NUT?

1 Like

What are you using to monitor your UPS? If you are using a Raspberry Pi, could you provide some guidance into how to set it up? Also @gd_brock if you have any input it would be appreciated since you appear to have it working properly.

I used the same guide that you referenced in your earlier post. I followed the steps outlined in the "Reconfigure NUT on the server" section. Make sure nut.conf is setup for MODE=netserver. In the upsd.users configuration I created a slave user I called "Hubitat" setup like the guide shows for the "upsmon-remote" users but on the line that declares the user as a slave account I have the full username. I think the guide is wrong and should have been "upsmon-remote slave". Then in the upsd.conf I'm setup to listen on the 127.0.0.1 loop back address and my wired IP address for the Pi that the Hubitat will connect to which for me is 192.168.1.55 for both I keep the standard port of 3493.

Back on the Hubitat in the master device preferences I filled in the IP of the Pi, the user name and password as I entered in the upsd.users configuration file. The port is the default.

Something else I've done is played around with node-red installed on the Pi where I use the upsmon user to monitor the UPS for better granular control to shutdown the Pi itself. From node-red I also have a redundant post sent to the Hubitat to make sure it shuts down.

1 Like

Yes, I’m using a raspberry pi to monitor my UPS. not sure what guide I used but it was one of the top google hits. I also am using a Homebridge plugin to monitor as well.

1 Like

Thank you so much, its all up and running now.

Is this still maintained ?

I cannot get it working. My ups is an APC Smart-UPS RT1000 (SURT1000XL).
I have the Raspberry setup running, i get a few stats with another driver [NUT UPS Device], but not with this one.

Setup:
nut.conf - set to netserver mode
upsd.conf - listen to 127.0.0.1 and raspberry ip on default port.
upsd.users - upsmon as master and hubitat as slave
hubitat - ip of raspberry and hubitat user credentials

My ups has an AP9631 network card. On the NUT page i cannot find neither the ups or the network card as supported, although i can find SURT2000XL and AP9630 (same family / gen).

In hubitat logs i get the following error: Parse: Couldn't process message: "ERR UNKNOWN-UPS"

I haven't looked at it lately because I was not running Hubitat due to a natural disaster but having recently plugged it in with the same NUT server that it used to be looking at running it picked up status right away and kept going. I see the Github at the top was last updated a couple months ago so appears reasonable efforts have been made to keep it going..

That error, and I'm no NUT guru, appears to be that the NUT server doesn't know what UPS is connected as the driver here isn't actually going through a big list of UPS's or anything. If NUT knows what it is it passes it along to Hubitat, the hub doesn't need to identify it.

Further, I upgraded to the latest version and all seems well still, so the drivers appear to still be working :slight_smile:

Hi All,
This is a great thread and I'm almost there with the configuration and I'm getting a status from the NUT server on the PI. However when I configure the NUT drivers on Hubitat I'm getting connection refused on the virtual device. Any tips ?

if your apc has the net card take a look at my driver here ...

1 Like

Try without a password, even though I am pretty sure I setup the password correctly, I have a lot of issues when I put it in on the hubitat side. Unauthenticated sessions seem to be fine so far.

1 Like

apc

Connection ok. I need to test it further.

Thanks.

1 Like

here are two different hub shutdown rules based on my driver..
sorry if off topic has nothing to do with nut ...

also seems really hot for an ups.. mine reads like this?
have you checked through the web interface..

The NUT based driver responds faster. It detect power outages in a few seconds. On your driver i can only set refresh to 1 minute. Can you make it respond faster ?

it takes a while to run as it is using telnet .. so cannot run that often.. i can add a 30 sec. but 1 minute intervals should be sufficient for any shutdown rule so not sure why you would want to overload your hub checking faster anyway.. can you enlighten me.
also based on your ups model, temperature and low runtime would indicate to me that it is continually trying to charge and your batteries are eol.

It's not necessary to refresh faster than 1 minute, but i like instant response from devices. In this case i can understand that having a lower refresh rate brings more trouble than advantages.

Regarding the batteries: i never thought having a 50 C temperature would affect them. The batteries are under 1 year old. I need to check them but you may be right (unfortunately)

let me know if you want me to add the 30 sec. time.. i can easily do it.. i would not go lower than that though as it takes 10 secs or so to run normally

Thank you.. This work perfectly

Indeed. It works perfectly. apc2

I've also solved the cooling for my ups. The fans (Noctua Redux) were not starting at 5V. I've changed to 9V and it seems ok. Unfortunately i have to change the batteries too.

But this driver eliminates the raspberry bridge. So please maintain it.

Could you add more stats? Like Load (watts) and input voltage?

1 Like