Comments (15)
π Thanks for opening your first issue here! If you're reporting a π bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.
from addon-nut.
Can you give some details on where you get this behavior from? The addon stops when asked to by NUT itself.
from addon-nut.
Also you may want to verify in the events that your UPS issues the OP LB event, https://networkupstools.org/docs/user-manual.chunked/ar01s06.html , as it should occur prior to the shutdown,
from addon-nut.
It seems OB LB was issued by the UPS,
First I got the notification: UPS cyberups@localhost battery is low
Immediately after that, the second notification was: Auto logout and shutdown proceeding
6.3. Configuring automatic shutdowns for low battery events
In Shutdown design, Step 6 is getting executed (upsmon master calls the SHUTDOWNCMD as Home Assistant is getting Shutdown/halt) bur Step 8 (below) is not getting executed
8. init then runs your shutdown script. This checks for the POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off the load._
The issue is that If the mains power come back before UPS shutdown (complete discharge) on its own , Hassio which has shutdown will not get restarted automatically as UPS load will not reset.
Also this is causing UPS battery to completely discharge (0%) and shutdown. I wanted UPS to shutdown when 15% of battery is left.
from addon-nut.
Looking at this more, I doubt this is something we can fix. As you have stated, and from what I can see, the power off UPS command is passed off to init, which although we could do this in some way from the container, the host would not be shutdown. We would then be powering off the UPS, and killing all power.
If this behaviour is important to you, the only thing I could recommend is running NUT externally somewhere and using the addon as a client.
from addon-nut.
Running NUT externally on other machine (just to shutdown UPS) can be an option but if add-on can be updated that will be great.
Is there any way to provide access / include command line NUT client tools such 'upscmd' or 'upsdrvctl' ? These can be used through scripts or Node Red to shut down UPS. I have set ups.delay.shutdown=180; The idea is to first call UPS shutdown (upscmd ups shutdown.return or upsdrvctl shutdown) and then can call Hassio shutdown (UPS will provide power for 3 minutes for clean HA shutdown).
I am sure many folks are using Home Assistant as critical system and would like to use NUT addon for clean shutdown and smooth restart after a prolong Power failure. This will implement NUT functionality to the fullest
from addon-nut.
The addon already supports running in both server and client mode, please refer to the documentation. Obviously any setup of NUT externally would be down to the user.
As I stated before the UPS shutdown is handed off to init, i.e. handled by the shutdown process of the OS. I don't see a way that we can cleanly duplicate this in a docker container, as you will never know what the host OS is doing.
I appreciate your ask, and as always PR's are welcomed, but I really don't see a way to implement without causing other issues. Of course I could be wrong and someone may have a better solution.
from addon-nut.
I have opened PR with a possible solution. I have locally tested it and it works for me
from addon-nut.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from addon-nut.
Is there any reason (except that now it need a rebase) why the corresponding PR was not take in account?
from addon-nut.
Are there any plans for this to get merged?
from addon-nut.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment π
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
from addon-nut.
Did this get merged?
from addon-nut.
no, this is an issue. There is nothing that can be merged in an issue itself.
from addon-nut.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment π
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
from addon-nut.
Related Issues (20)
- Nut Server with EATON UPS HOT 1
- Spaces in device name cause add-on to fail to start HOT 1
- NUT fails to start reporting insufficient permissions on libusb HOT 41
- upsd high cpu usage on rpi4 (0.12.0) and causes HA to crash HOT 2
- SNMP not working - Add on not starting HOT 2
- Fails to start with HAOS 11.1 HOT 3
- The HOST is rebooted after the add-on is launched HOT 12
- NUT fails to start using SNMP. HOT 8
- Only one BX1500M is seen HOT 18
- Missing MIB HOT 4
- NUT not starting (No such file or directory)
- Fails with 2 UPSes HOT 11
- UPS monitoring fails randomly with "Poll UPS [myups@localhost] failed - Data stale" HOT 2
- Manufacturer details missing HOT 1
- Manufacturer details missing HOT 1
- Option 'pollonly' does not exist HOT 4
- NUT fails to start: Can't claim USB device: Other error / Driver failed to start HOT 21
- Server not listening on port 3943 HOT 1
- Two identical Cyberpower UPS's HOT 3
- Data stale error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addon-nut.