Jump to content

[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

10 minutes ago, jjcrc said:

I have an APC Smart-UPS C 2000 plugged into Unraid using the NUT plugin. About once or twice a day I get a seemingly incorrect notification "UPS On Battery" followed immediately by a "UPS Online". I don't notice the lights blinking when this happened, so I can only assume this is an issue with my UPS. I had the same issue with this UPS connected to my Synology before switching over to Unraid. 

 

Is there a way to add a custom setting to ignore "on battery" for x seconds before sending out a notification? 


Can you post the logs from when this event happens?

Link to comment

Hi all - I'm on nut-2.8.2-x86_64-3master.ssl11 with a BX750MI.

 

I have the following entries in ups.conf:

 

pollonly
lbrb_log_delay_sec = 3
lbrb_log_delay_without_calibrating

 

I've not gotten another LB/RB notice in the system log, but I notice this error has been showing up a lot, like every 5-10 minutes or so.

 

Aug 16 12:51:32 Tower usbhid-ups[3621]: nut_libusb_get_report: Input/Output Error

 

Is this just a harmless side effect of the fix?

 

Thank you all for your help.

Link to comment
8 minutes ago, DigitalAnalog said:

Hi all - I'm on nut-2.8.2-x86_64-3master.ssl11 with a BX750MI.

 

I have the following entries in ups.conf:

 

pollonly
lbrb_log_delay_sec = 3
lbrb_log_delay_without_calibrating

 

I've not gotten another LB/RB notice in the system log, but I notice this error has been showing up a lot, like every 5-10 minutes or so.

 

Aug 16 12:51:32 Tower usbhid-ups[3621]: nut_libusb_get_report: Input/Output Error

 

Is this just a harmless side effect of the fix?

 

Thank you all for your help.

 

These are minor connection interrupts and can be ignored if everything else works. 🙂 

  • Like 1
Link to comment
1 minute ago, DigitalAnalog said:

 

Thank you. :) And just to confirm - if the UPS does emit a valid battery or power issue - NUT will take action, right?

 

Yes, of course, you can test this by pulling the breaker or shortly unplugging your UPS (although the breaker method is better). I recommend everyone test a battery scenario at least once before relying on it in production.

  • Like 1
Link to comment
3 minutes ago, Rysz said:

 

Yes, of course, you can test this by pulling the breaker or shortly unplugging your UPS (although the breaker method is better). I recommend everyone test a battery scenario at least once before relying on it in production.

 

Thank you, yes I should have clarified UPS errors such as an actual failing battery, etc, that are more difficult to simulate. I've turned off the power outlet and confirm NUT orchestrates an orderly shutdown. :)

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

 

Thank you, yes I should have clarified UPS errors such as an actual failing battery, etc, that are more difficult to simulate. I've turned off the power outlet and confirm NUT orchestrates an orderly shutdown. :)

 

Yes, anything that persists longer than 3 seconds is reported (to filter out the bogus statuses). A real problem situation will always persist longer than 3 seconds.

  • Like 1
Link to comment
15 minutes ago, Sak said:

How do I disable the beeper?
I am using Eaton 5S1000i 

Screenshot2024-08-19at3_34.03intheafternoon.thumb.png.f963e623f09401d9636310c281c75910.png

 

If the UPS supports it (can be checked with upscmd -l ups terminal command), via terminal command:

upscmd -u admin -p adminpass ups beeper.disable

The username and password are the defaults and don't need to be modified in that command.

Link to comment
1 hour ago, Rysz said:

 

If the UPS supports it (can be checked with upscmd -l ups terminal command), via terminal command:

upscmd -u admin -p adminpass ups beeper.disable

The username and password are the defaults and don't need to be modified in that command.

Thanks! that worked

  • Like 1
Link to comment
5 hours ago, DigitalAnalog said:

I'm thinking of buying another UPS - can anyone suggest a particular brand or product line that just works out-of-the-box with apcupsd and/or NUT? I think I've heard good things about Eaton but not sure if it's just their enterprise line. Thank you.

 

I can recommend any Eaton devices, they've supported open source and participated in the NUT project for a long time (and it shows compatibility wise). Many other people seem to have good results with CyberPower too, but I have never used any of their devices myself. I'd always pick Eaton personally, also for their great customer service. 🙂 

 

  • Like 1
Link to comment

Hi ALL,

 

 

So a few days ago I installed ...

 

Network UPS Tools (NUT) for UNRAID - desertwitch from RYSZ's Repository on CA and set it up and got it working perfectly on my UNRAID server as Master and configured winut client on my Windows Machines as slaves pointing to the nut server on UNRAID.  Happy happy happy!

 

Two days ago,  I reboot my UNRAID server and all came up fine except for my NUT server.  Nut Service would not start. Checked Syslog and found this error ...

 

"Aug 20 04:48:05 servername root: plugin: skipping: nut-2.8.2-x86_64-3master.ssl31.txz - Unraid version too low, requires at least version 6.13"

 

I'm puzzled at this as I am running  the lasted version UNRAID 6.12.11

 

anyhow I removed this plugin  & installed a older version of NUT server from  older thread ...

 

using the plugin URL

 

https://raw.githubusercontent.com/dmacias72/NUT-unRAID/master/plugin/nut.plg

 

 

My UPS is once again being recognized by UNRAID and all clients seeing the UPS service on URNAID server.

 

this morning I see a message on UNRAID console informing met that NUT has been removed as the version is no longer supported.

 

SO I go back to CA and install the version from RYSZ's Repository and again the NUT service won't start.

 

SO for now I'm  back on old version of NUT which I know at some point will auto uninstall again.

 

any suggestions on how to install a version of NUT which woks on UNRAID 6.12.11 ?

 

thanks,

 

E

 

 

Link to comment
5 minutes ago, E-ManN said:

"Aug 20 04:48:05 servername root: plugin: skipping: nut-2.8.2-x86_64-3master.ssl31.txz - Unraid version too low, requires at least version 6.13"

 

This is normal, it just means some packages that are not meant for your OS version are skipped. Install my version again (the other versions are all deprecated). First click "Reset Config", then configure NUT. Afterwards try starting the NUT service and if it fails, post the NUT Debug Package that is found in NUT Settings.

 

Link to comment

OK thanks for that info.

 

OK so I have uninstalled the old NUT Plugin.  But your plugin on CA has "Pending" 

Probably because I was monkeying around with it this morning trying to install it.

 

image.png.a66360c8958a152d16d8cf07fd8f030d.png

 

I'm not sure how to get around this ...

 

can you post the plugin URL path in this thread ?

 

I'll try installing it this way.

 

thanks,

 

E

Link to comment
19 minutes ago, E-ManN said:

OK thanks for that info.

 

OK so I have uninstalled the old NUT Plugin.  But your plugin on CA has "Pending" 

Probably because I was monkeying around with it this morning trying to install it.

 

image.png.a66360c8958a152d16d8cf07fd8f030d.png

 

I'm not sure how to get around this ...

 

can you post the plugin URL path in this thread ?

 

I'll try installing it this way.

 

thanks,

 

E

 

Probably best to reboot your server as it seems something got messed up installing the many versions.

Link to comment

Thanks for all your help Rysz.

 

Got it working with your version of NUT ... hopefully on next reboot it will not give me that service not started error again.

 

step taken to fix ...

 

1) Uninstall the old unsupported version of the NUT Plugin

2) From terminal session  ..

     - cd /tmp/plugins/pluginPending

     - rm nut.plg

     - cd ..

     - rmdir pluginPending

3) Search for NUT in CA .. pending is gone. Woo Hoo !

4) Install NUT

 

service will fail to start again ...

 

5) are per your instructions  .. click "Reset Config" button

6) RE-Configure your nut server

 

image.thumb.png.d8649887e1ccb15ca80f4f03e9cca194.png

 

image.thumb.png.c8f3795410569503f50964eb76c71f96.png

 

image.png.c1f2a01e63464414b5172cec5c580ecd.png

 

ALL IS good for now  ... thanks,

 

😁

E

 

Edited by E-ManN
Link to comment
12 minutes ago, E-ManN said:

Thanks for all your help Rysz.

 

Got it working with your version of NUT ... hopefully on next reboot it will not give me that service not started error again.

 

step taken to fix ...

 

1) Uninstall the old unsupported version of the NUT Plugin

2) From terminal session  ..

     - cd /tmp/plugins/pluginPending

     - rm nut.plg

     - cd ..

     - rmdir pluginPending

3) Search for NUT in CA .. pending is gone. Woo Hoo !

4) Install NUT

 

service will fail to start again ...

 

5) are per your instructions  .. click "Reset Config" button

6) RE-Configure your nut server

 

image.thumb.png.d8649887e1ccb15ca80f4f03e9cca194.png

 

image.thumb.png.c8f3795410569503f50964eb76c71f96.png

 

image.png.c1f2a01e63464414b5172cec5c580ecd.png

 

ALL IS good for now  ... thanks,

 

😁

E

 

 

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. 🙂 

Link to comment
Just now, Masterwishx said:

if `Battery Replacement Notification=no` will be no notification at all or will be every 12h by default ? 

 

None at all, you will see it as status in the dashboard but won't get a notification. If set to yes, every 12 hours by default.

  • Like 1
Link to comment

I perform some test on shutdown UPS, whatever which version, it need stop NUT first. Is it possible to make it work even when NUT running. The command use to shutdown UPS was "upsdrvctl shutdown", I understand this command was critical, but this also useful to test UPS too. Thanks.

 

When NUT not running, it can shutdown UPS.

upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.8.2
Network UPS Tools - Generic HID driver 0.53 (2.8.2)
USB communication driver (libusb 1.0) 0.47
Can't open /var/run/nut/usbhid-ups-ups: No such file or directory
Using subdriver: APC HID 0.100
Initiating UPS shutdown
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it

 

When NUT running, it got exit status=1

upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.8.2
Network UPS Tools - Generic HID driver 0.53 (2.8.2)
USB communication driver (libusb 1.0) 0.47
select with socket: Invalid argument
Can't claim USB device [051d:0002]@0/0/0: Entity not found
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
Driver failed to start (exit status=1)

 

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

I perform some test on shutdown UPS, whatever which version, it need stop NUT first. Is it possible to make it work even when NUT running. The command use to shutdown NUT was "upsdrvctl shutdown", I understand the command was critical, but this also useful to test UPS too. Thanks.

 

When NUT not running, it can shutdown UPS.

upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.8.2
Network UPS Tools - Generic HID driver 0.53 (2.8.2)
USB communication driver (libusb 1.0) 0.47
Can't open /var/run/nut/usbhid-ups-ups: No such file or directory
Using subdriver: APC HID 0.100
Initiating UPS shutdown
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it

 

When NUT running, it got exit status=1

upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.8.2
Network UPS Tools - Generic HID driver 0.53 (2.8.2)
USB communication driver (libusb 1.0) 0.47
select with socket: Invalid argument
Can't claim USB device [051d:0002]@0/0/0: Entity not found
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
Driver failed to start (exit status=1)

 

 

You shouldn't use this command for testing, it's called from within the OS shutdown routine and it only works when the driver is not currently running (because it needs to re-start the driver with special permissions to be able to kill the UPS power). Also it does not do a graceful shutdown but kill the power immediately, it's the last step before the OS turns off and if you are doing this with disks mounted you'll have a parity check on next boot.

 

You should only use this command for testing the UPS shutdown (with NUT running):

upsmon -c fsd

 

Link to comment
5 minutes ago, Rysz said:

You should only use this command for testing the UPS shutdown:

upsmon -c fsd

 

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.

Edited by Vr2Io
Link to comment
Just now, 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 minim.

 

Thanks your support.

 

You can do this, if you really want it, with upscmd.

First you need to put allow_killpower at the end of UPS.CONF.

After, restart NUT and you can run: upscmd -u admin -p adminpass ups driver.killpower

The username and password are the NUT defaults, so you do not need to change them usually.

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...