networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.12k stars 353 forks source link

No FSD when using driver apcupsd-ups #460

Closed tobby88 closed 7 years ago

tobby88 commented 7 years ago

When using the driver apcupsd-ups then the shutdown condition is configured in /etc/apcupsd/apcupsd.conf (BATTERYLEVEL & MINUTES = remaining battery percentage & runtime when shutdown will be initiated). Then the shutdown has to be disabled in apcupsd or just this one machine with apcupsd will get shut down without informing others via nut. This can be done for example by editing /etc/apcupsd/apccontrol and change "${SHUTDOWN} -h" to "${SHUTDOWN} -k".

Now nut should be usable with the apcupsd-ups-driver. But nut will never initiate a shutdown (FSD), because apcupsd changes the ups-status from "ONBATT" to "SHUTTING DOWN" when it's working on battery and the battery (or runtime) is below the limits, while nut interprets "SHUTTING DOWN" in the same way as a loss in connection.

This is wrong. "SHUTTING DOWN" should be the same as "LOWBATT". I will post a fix shortly.

tobby88 commented 7 years ago

Created a pull request (#461) which should fix this.