Giter VIP home page Giter VIP logo

Comments (15)

addons-assistant avatar addons-assistant commented on June 16, 2024

πŸ‘‹ 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.

sinclairpaul avatar sinclairpaul commented on June 16, 2024

Can you give some details on where you get this behavior from? The addon stops when asked to by NUT itself.

from addon-nut.

sinclairpaul avatar sinclairpaul commented on June 16, 2024

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.

abhi23768 avatar abhi23768 commented on June 16, 2024

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.

sinclairpaul avatar sinclairpaul commented on June 16, 2024

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.

abhi23768 avatar abhi23768 commented on June 16, 2024

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.

sinclairpaul avatar sinclairpaul commented on June 16, 2024

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.

abhi23768 avatar abhi23768 commented on June 16, 2024

I have opened PR with a possible solution. I have locally tested it and it works for me

from addon-nut.

addons-assistant avatar addons-assistant commented on June 16, 2024

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.

Adorem avatar Adorem commented on June 16, 2024

Is there any reason (except that now it need a rebase) why the corresponding PR was not take in account?

from addon-nut.

jrob avatar jrob commented on June 16, 2024

Are there any plans for this to get merged?

from addon-nut.

github-actions avatar github-actions commented on June 16, 2024

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.

jrob avatar jrob commented on June 16, 2024

Did this get merged?

from addon-nut.

frenck avatar frenck commented on June 16, 2024

no, this is an issue. There is nothing that can be merged in an issue itself.

from addon-nut.

github-actions avatar github-actions commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.