Jump to content

[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

15 minutes ago, Vr2Io said:

Understand, but I want to shutdown UPS immediately and bypass all setting shutdown condition. If no way then may be I stop NUT or change all shutdown condition to minimum.

 

Thanks your support.

 

By the way, upsmon -c fsd also does an immediate shutdown and bypasses all NUT shutdown conditions. But it does a graceful, safe OS shutdown (= same as clicking "Shutdown" in Web GUI), killing the UPS power with the other commands is the equivalent to pulling the cable from the power socket while the system is running.

 

Link to comment
4 minutes ago, Vr2Io said:

Just try it, it response OK, but UPS haven't any action.

 

image.png.2ee5420f58161a42b7f3f1bcf666fbf3.png

 

Does ups.conf look correct ?

image.png.ac572b086f7b3287efb13fc7b01183a8.png

 

Thanks

 

No, please put it at least on line 9 because line 1 - 8 are reserved and overwritten by GUI.

So put it on line 9 or later to be safe, and restart NUT and afterwards try again. 🙂 

Link to comment
9 minutes ago, Rysz said:

 

No, please put it at least on line 9 because line 1 - 8 are reserved and overwritten by GUI.

So put it on line 9 or later to be safe, and restart NUT and afterwards try again. 🙂 

It still not work. "driver.flag.allow_killpower" was "0" seems were problem.

Does "driver.state" "quiet" normal ?

 

image.png.25f7073c3f176ade8728688d1b056d64.png

Edited by Vr2Io
Link to comment
20 minutes ago, Vr2Io said:

It still not work. "driver.flag.allow_killpower" was "0" seems were problem.

Does "driver.state" "quiet" normal ?

 

image.png.25f7073c3f176ade8728688d1b056d64.png

 

Can you try setting: allow_killpower = 1 (and restart NUT afterwards)

Yes, the driver state being quiet is normal and not a problem.

 

Link to comment
36 minutes ago, Rysz said:

Can you try setting: allow_killpower = 1

Yes, driver state quiet is normal.

 

Try "allow_killpower = 1" or "allow_killpower = yes", "driver.flag.allow_killpower" still "0" and submit command also no action.

 

Does upsmon -k have meaningful message ? There are no "no_killpower" or "killpower" file in /etc/nut/

 

And FSD just got message and actually won't shutdown UPS.

 

EDIT : Actually it would shutdown UPS but also shutdown Unraid first.

 

image.png.e385d828b1d42240814f3347446185a3.png

 

image.thumb.png.9db805b10e3fcc0fbbb48690d8c39e9e.png

 

Edited by Vr2Io
Link to comment
20 minutes ago, Vr2Io said:

 

Try "allow_killpower = 1" or "allow_killpower = yes", "driver.flag.allow_killpower" still "0" and submit command also no action.

 

Does upsmon -k have meaningful message ? There are no "no_killpower" or "killpower" file in /etc/nut/

 

image.thumb.png.9db805b10e3fcc0fbbb48690d8c39e9e.png

 

 

I think this is a bug, I've opened an issue on GitHub - you can follow it here:
https://github.com/networkupstools/nut/issues/2605


The upsmon -k command has a different function, it won't help us here, I'm afraid.

Link to comment

I also share a true story about UPS case, one night my home PC got smoking out and it connect to UPS. Luckly, I am at home so I can power down UPS to cut the power ( no response by PC power button ) , otherwise it will continue firing, my family member only know how to switch off main circuit-breaker, clearly this can't protect them.

 

I have apply some automation if a power plug have abnormal reading, so if I can power-off UPS, then also sound great for safety.

Edited by Vr2Io
Link to comment

Update : Finally got

 

upsrw -u admin -p adminpass -s driver.flag.allow_killpower=1 ups

 

will set "driver.flag.allow_killpower" be "1"

 

image.png.e1bd26866a303a3c57d3ff31bffc0aac.png

 

and "upscmd -u admin -p adminpass ups driver.killpower" work immediately.

 

image.png.a30d378cfb0307882b77dc96012fc6cd.png

 

Thanks !!

 

Below are the list which variable can be R/W. 

upsrw -u admin -p adminpass -l ups
[battery.charge.low]
Remaining battery level when UPS switches to LB (percent)
Type: STRING
Maximum length: 10
Value: 10

[battery.mfr.date]
Battery manufacturing date
Type: STRING
Maximum length: 10
Value: 2024/05/05

[battery.runtime.low]
Remaining battery runtime when UPS switches to LB (seconds)
Type: STRING
Maximum length: 10
Value: 120

[driver.debug]
Current debug verbosity level of the driver program
Type: NUMBER
Value: 0

[driver.flag.allow_killpower]
Safety flip-switch to allow the driver daemon to send UPS shutdown command (accessible via driver.killpower)
Type: NUMBER
Value: 0

[input.sensitivity]
Input power sensitivity
Type: STRING
Maximum length: 10
Value: low

[input.transfer.high]
High voltage transfer point (V)
Type: STRING
Maximum length: 10
Value: 278

[input.transfer.low]
Low voltage transfer point (V)
Type: STRING
Maximum length: 10
Value: 160

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: STRING
Maximum length: 10
Value: 20

 

Edited by Vr2Io
Link to comment
1 minute ago, Vr2Io said:

Update : Finally got

 

upsrw -u admin -p adminpass -s driver.flag.allow_killpower=1 ups

 

will set "driver.flag.allow_killpower" be "1"

 

image.png.e1bd26866a303a3c57d3ff31bffc0aac.png

 

and "upscmd -u admin -p adminpass ups driver.killpower" work immediately.

 

image.png.a30d378cfb0307882b77dc96012fc6cd.png

 

Thanks !!

 

 

 

Thanks for the update, I still hope we can get the configuration flag bug fixed as soon as possible, so you don't need to run this "upsrw" command every time you restart NUT and the configuration flag takes care of that in the future.

  • Like 1
Link to comment

Hello. I have a rack mounted cyber power unit and whenever I try to start the NUT driver I get:

 

Aug 27 17:48:52 Domain rc.nut: libusb1: Could not open any HID devices: insufficient permissions on everything

 

I have tried different ports, cables & restarts. This also started as soon as I switched UPS, so it was working just fine.

Link to comment

I'm having an issue with a brand new APC. I never got this warning on the Unraid APC service. I switched so that I could get the data into Home Assistant, but it might not be worth it if I get these notifications every 20 minutes or so. Absolutely kills the Unraid UI. Take forever for them to clear out.

Screenshot_20240827-212704_Telegram FOSS.png

Link to comment
58 minutes ago, m0ngr31 said:

I'm having an issue with a brand new APC. I never got this warning on the Unraid APC service. I switched so that I could get the data into Home Assistant, but it might not be worth it if I get these notifications every 20 minutes or so. Absolutely kills the Unraid UI. Take forever for them to clear out.

 

This indicate UPS always switch between battery and mains, first should check does mains voltage out of range or unstable.

  • Like 1
Link to comment
28 minutes ago, Vr2Io said:

This indicate UPS always switch between battery and mains, first should check does mains voltage out of range or unstable.

I can't imagine that it is. I've had that server plugged in for 3 years without issues with the power before now

Link to comment
2 hours ago, spartanooof said:

Hello. I have a rack mounted cyber power unit and whenever I try to start the NUT driver I get:

 

Aug 27 17:48:52 Domain rc.nut: libusb1: Could not open any HID devices: insufficient permissions on everything

 

I have tried different ports, cables & restarts. This also started as soon as I switched UPS, so it was working just fine.

 

2 minutes ago, m0ngr31 said:

I can't imagine that it is. I've had that server plugged in for 3 years without issues with the power before now

 

Please post the NUT Debug Package that can be found in NUT Settings.

Link to comment

from Rysz ...

 

Great, glad you got it working. If it fails again, please don't uninstall the plugin, but download the "NUT Debug Package" from "NUT Settings" and post here again before doing anything else. 🙂 

 

Foe those who don't know I founD what Rysz was referring to for "NUT Debug Package" from "NUT Settings" ... 

 

I had to look hard for it ...  😁

 

image.thumb.png.13383fb096530e4b25b1b10035fc1243.png

 

thought I'd share as I did not see it right away.

 

thanks,

 

E

 

 

  • Thanks 1
Link to comment
5 hours ago, m0ngr31 said:

 

First of all you need to disable APCUPSD (the inbuilt UPS service controlled through "UPS Settings") as having that enabled at the same time with NUT will make both services fight for the UPS. Also your UPS seems to be switching to battery frequently due to fluctuations in input voltage: input.transfer.reason: input voltage out of range. If your power grid or electric installation is unstable in terms of input voltage, you may be able to reduce the UPS sensitivity (consult the UPS manual about this) to avoid such frequent switching (although not switching and related voltage spikes can harm your electronic devices too, so it's a fine balance there). If it's not, you may need to consider a hardware fault of your UPS detecting and acting on a wrongly measured input voltage. If your UPS does not actually go on battery (and you can't see any such LEDs or hear the inverter clicking/switching in such situations where you are notified) and it does really work in APCUPSD without any such issues, it may also be a compatibility issue with NUT, in which case you should better use APCUPSD (through "UPS Settings") instead.

 

Link to comment
On 8/27/2024 at 9:37 PM, Rysz said:

 

Thanks for the update, I still hope we can get the configuration flag bug fixed as soon as possible, so you don't need to run this "upsrw" command every time you restart NUT and the configuration flag takes care of that in the future.

 

Just to follow up, I think I've identified the underlying issue and have a proposed fix in the pipeline:

https://github.com/networkupstools/nut/pull/2606

I'll let you know @Vr2Io when there is something to test (waiting on feedback from maintainers).

  • Thanks 1
Link to comment
28 minutes ago, Rysz said:

 

First of all you need to disable APCUPSD (the inbuilt UPS service controlled through "UPS Settings") as having that enabled at the same time with NUT will make both services fight for the UPS. Also your UPS seems to be switching to battery frequently due to fluctuations in input voltage: input.transfer.reason: input voltage out of range. If your power grid or electric installation is unstable in terms of input voltage, you may be able to reduce the UPS sensitivity (consult the UPS manual about this) to avoid such frequent switching (although not switching and related voltage spikes can harm your electronic devices too, so it's a fine balance there). If it's not, you may need to consider a hardware fault of your UPS detecting and acting on a wrongly measured input voltage. If your UPS does not actually go on battery (and you can't see any such LEDs or hear the inverter clicking/switching in such situations where you are notified) and it does really work in APCUPSD without any such issues, it may also be a compatibility issue with NUT, in which case you should better use APCUPSD (through "UPS Settings") instead.

 

Ha, yeah I did notice that APCUPSD is running. I did shut it down before I started NUT, but it started again 🤔. I shut it down again.

 

So my house power is completely off-grid. Solar charging my battery bank. I'll have to go in the crawlspace and just wait and see if the what the UPS does when I get the notification. It might have been doing this with APCUPSD and just not notifying me? But I've never had issues with any electronics in my house in almost 4 years of living here.

Link to comment

I've done some searching and found one thread with this same problem, but didn't have a solution.

 

I  just moved an APC BackUPS BGM-1500 to my unraid server.

When i set up NUT, it always says "On Line - Discharging Battery" 

 

But it's not discharging. It is running off of AC fine and hasn't switched to battery at all. I set up a windows VM and passed the USB port to it to test the unit with PowerChute, and it tested fine and wasn't running on the battery.

 

Is there anything I can do to get it to report correctly?

Link to comment
On 8/31/2024 at 4:05 PM, dkopsieker said:

I've done some searching and found one thread with this same problem, but didn't have a solution.

 

I  just moved an APC BackUPS BGM-1500 to my unraid server.

When i set up NUT, it always says "On Line - Discharging Battery" 

 

But it's not discharging. It is running off of AC fine and hasn't switched to battery at all. I set up a windows VM and passed the USB port to it to test the unit with PowerChute, and it tested fine and wasn't running on the battery.

 

Is there anything I can do to get it to report correctly?

I also just found out that it only does this when the battery is at 100%. If I unplug and let the battery diminish by even 1% and plug it in it reports correctly saying that it’s on line. But as soon as it charges to 100%, it switches back to red status of “on line - Discharging Battery”

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...