Closed pspot2 closed 4 months ago
I'm not sure there is a way to get NUT not to issue and FSD, the powervalue config is meant for multiple UPS devices.
As HA in my case runs inside a Proxmox VM, NUT can only shut down the VM itself which doesn't make any sense as this won't shutdown other VMs and the Proxmox host itself.
Why wouldn't you run NUT on the host, rather than in a container inside a VM?
The NUT add-on behaves weirdly when shutdown_host is deactivated: it goes into the shutdown/startup loop and the respective integration floods HA with events. This makes it impossible to build any meaningful automations.
The addon shouldn't restart unless the "Watchdog" functionality is enabled.
Why wouldn't you run NUT on the host, rather than in a container inside a VM?
I'm running a HA NUT add-on (e.g. this GitHub project). HA add-ons are containers, right?
Another reason is my second point from the motivation section: even if NUT manages to shut down the physical host, other hardware plugged into the UPS doesn't have remote interfaces for graceful shutdown.
The addon shouldn't restart unless the "Watchdog" functionality is enabled.
Watchdog is not enabled. Logs from the restart loops are attached below.
Jun 24 21:37:32 home-assistant addon_a0d7b954_nut[548]: s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory Jun 24 21:37:32 home-assistant addon_a0d7b954_nut[548]: 5.009493 Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
Then that's an issue we should look at, unfortunately it's the first report I've seen..
As per the NUT documentation The whole point of UPS software is to bring down the OS cleanly when you run out of battery power. Everything else is roughly eye candy.
https://networkupstools.org/docs/user-manual.chunked/Configuration_notes.html#UPS_shutdown
My view is that you should control shutdown events at the base operating system (Proxmox in your case), virtualising and running containers means that you have no visibility to the state of the OS. The addon is designed for those without the knowledge to configure it themselves.
As per the NUT documentation
The whole point of UPS software is to bring down the OS cleanly when you run out of battery power. Everything else is roughly eye candy.
https://networkupstools.org/docs/user-manual.chunked/Configuration_notes.html#UPS_shutdown
Yes, I've read that documentation. This is a rather narrow view, highlighting just one of the use-cases. Imagine you'd like to automatically start a backup generator based on the "low battery" event. In this case you do NOT want to shut anything down, plus you want to have a customizable hook and not a pre-defined action that you cannot change.
My view is that you should control shutdown events at the base operating system (Proxmox in your case), virtualising and running containers means that you have no visibility to the state of the OS. The addon is designed for those without the knowledge to configure it themselves.
I could certainly give it a try, but from your earlier responses I understood that NUT doesn't offer control over FSD and auto-shutdown irrespective of whether the software is packaged as a container or runs natively.
The addon wraps the NUT software, this isn't something we are likely to implement, so I will close this out.
+1 have the same request. Id like the ability to not force a shutdown simply because the UPS is low.
Same here. My UPS is modified with much bigger battery than it ever seen in production so it runs very long time in critical state. It would be nice to still got data from it.
Problem/Motivation
I'd like to be able to disable the FSD / auto-shutdown completely for 3 reasons:
shutdown_host
is deactivated: it goes into the shutdown/startup loop and the respective integration floods HA with events. This makes it impossible to build any meaningful automations.My goal is to manage the "low battery" situation myself with my own automations and notifications.
Expected behavior
If I understand the add-on documentation correctly, setting the
powervalue
config option to0
is supposed to do the trick.Actual behavior
When setting
powervalue
to 0, the add-on refuses to start because of theMINSUPPLIES
option which is set to1
inupsmon.conf
. According to the error message,powervalue
cannot be lower thanMINSUPPLIES
.Steps to reproduce
Try setting
powervalue
to0
and restart the add-on.Proposed changes
Assuming that setting the
powervalue
to0
is the correct way to solve my problem (e.g. completely disable setting the FSD flag and shutting down the host/add-on), I suppose theMINSUPPLIES
option should be configurable as well.If that assumption is wrong, I'm open for better suggestions on how to achieve this.
Thanks