hassio-addons / addon-nut

Network UPS Tools - Home Assistant Community Add-ons
https://addons.community
MIT License
188 stars 36 forks source link

UPS power cycle after mains failure #311

Closed repiuk closed 1 year ago

repiuk commented 1 year ago

Problem/Motivation

After a mains failure I would like to see the UPS power cycle after mains returned

(Why the issue was filed) After a graceful shutdown of home assistant the only way it will come back is after a full drain of the UPS and after that mains restored. Most likely mains is restored before UPS is drained and shut down

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it) Installed NUT server on a ubuntu machine. The FSD flag is set on the UPS once battery level drops below 10%. If mains is restored the FSD flag remains active. If I reboot the ubuntu machine with the FSD flag set on the UPS the UPS power cycles. That doesn't happen on homeassistant if I restart the NUT Addon. The FSD flag is cleared and no power cycle. Both is unwanted. I want the UPS to powercycle once the mains is restored (maybe best after battery is above 10%) otherwise homeassistant machine is shutdown forever. So no graceful homeassistant shutdown

repiuk commented 1 year ago

I discovered my ups won't power down (and won't power cycle after mains is back) if NUT keeps the USB connection open and the FSD flag is set. Installed NUT a second Ubuntu machine which is now behaving properly. NUT on a HA Add On is my next test, a little confusing to translate what goes where in the configuration of the Add On vs the .conf files in NUT on Ubuntu.

I'll close this