No. No matter what I do, I just keep getting the same error from Hubitat.
I know that both Windows and Ubuntu clients are fully logged in with an established connection though because I can use both of those to issue commands like turn off Load A or enable/disable alarms, etc..
I feel like there must be some stupid setting that I accidentally changed on the server that has broken this and maybe the full clients just don't care about that particular setting.... I just can't figure out what happened. I might wipe it entirely and start over from scratch again.
Nevermind on that. It just looks like it on the windows client, it doesn't do anything. Read only, values go back after attempts to change. Trying to debug from work over remote connection.
1 Like
Issuing commands to the ups via upscmd, like turning on/off loads and enabling/disabling alarms, does not go through the upsmon connection. That is a direct connection between upscmd and upsd.
Temping though that may be, I would log into the container a look at the log files first. 
Yes but the bigger problem is, I have no idea how to do that at this point in my Home Assistant journey... 
Might be better to just wipe it and go with Raspbian or Ubuntu..
Plus my other UPS is older and has a serial port instead of USB, so having all the configuration hidden from view might be a problem. I'm not sure if I'll need to install additional drivers or if a serial-to-usb adapter is even a workable solution.
Example:
root # docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2f7a186d11f9 d86bb48900e0 "/init" 5 days ago Up 3 hours homeassistant
root # docker exec -ti homeassistant bash
or
root # docker exec -ti 2f7a186d11f9 bash
Bash might not be available, if it isn't use sh instead.
I've been running NUT on an old RPi-3B (edited) since July and not one tiny little hiccup once I had it going.
What OS are you using? I put Home Assistant OS on the Pi3B+ and put NUT in that.. but I have just discovered that I am not a big fan of Home Assistant... I am probably going to ditch the Home Assistant and look for an alternate OS like Debian or Ubuntu.
I might have to find a different Pi though. I recently discovered a strange quirk of the Pi 3B+. It seems to immediately disable and prevent my second UPS from turning back on the moment I plug the USB-to-serial adapter into the USB port on the Pi. No other machine in my house caused this same weird phenomenon to occur except the other Pi 3B+ which is currently a PiHole box.
Raspbian GNU/Linux 11
Currently, it's only running NUT.
And I misstated the hardware version, it's a "Raspberry Pi 3 Model B Rev 1.2"
Literally found it in a box of junk my son left here.
1 Like
So when, specifically, does this driver shut down the HE hub? immediately on LB (low battery) from the NUT server? Some time after that? or at some battery time remaining setting?
LJ
It's the same as any other NUT client. Shutdown will be triggered when the server status is either of:
- FSD (Forced Shut Down)
- OB (On Battery) and LB (Low Battery)
These are the statuses that a sever emits prior to initiating a shutdown.
1 Like
You can also turn off the automatic shut down and create your own rules. I already had a huge rule built from the older driver so I just switched my rule over to this new driver and have the shut down setting disabled.
Yeap, that is exactly what I did as well, it sends me an update every 10% battery loss.
1 Like
Yes, I am familiar with those functions and statuses. I had just written a rule that behaved a little differently and sent period status messages during the discharge process and then handled the shutdown of various devices including HE in the rule. I can tweak that to work with your driver because your driver doesn't have the Telnet timeout issue of the other driver. Thanks.
LJ
Thanks for this its exactly what I've been looking for, one of simplest installs to date. Works really well and means that i won't lose the HE on our next brown out. 
1 Like
You are most welcome. Thank you for the shout out.
I assume you found your UPS name and have it working. 
FWIW, I do not recommend using Rule Machine with battery percentage to manage a UPS shutdown. Using Rule Machine is problematic for two reasons:
- If the percentage is hit prior to the LB (Low Battery) signal, the hub will shut down and will remain off if power recovers prior to declaring LB.
- If the percentage comes after the UPS declares LB, the hub will likely still be running when power is cut.
Use the "Enable Hub Shutdown" setting instead.
Question, do you have to configure that low battery threshold on the NUT server or is it just determined by the UPS itself? My UPS connects to windows machine via USB cable, which has Apcupsd running. Then the NUT server connects to that and is used just to relay everything elsewhere. I did not do much configuration in NUT, just enough to get it working.
I currently have a rule machine rule which gives me updates as well as shutting down eventually. I created it before your awesome driver. I could switch off the shut down part in my rule and use your driver for that instead but I never understood how it worked exactly.
I also RARELY lose power for more than a few minutes so it was more of just a fun little project than anything. I think it was only been tested fully by unplugging it on purpose.
LB is controlled by the UPS itself. Some UPSs have this value configurable based on runtime, whereas others have only fixed levels.
apcupsd may be able to configure the LB triggers, or it may provide some form of override. It's been a long, long time since I looked apcupsd, so I'm not familiar with it. Is the project still alive?
Does not seem to be active anymore but still works. Was the easiest way to get data from my older UPS connected via USB cable to a windows host.
Might be one of these settings, but I think that just shuts down the host system.
# If during a power failure, the remaining battery percentage
# (as reported by the UPS) is below or equal to BATTERYLEVEL,
# apcupsd will initiate a system shutdown.
BATTERYLEVEL 6
# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
MINUTES 10
Or this one
# Low battery warning delay in minutes
# LOWBATT 02 05 07 10 (default = 02)
#LOWBATT 2