Jump to content

[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

56 minutes ago, dkopsieker said:

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”

When battery not charging then it actually was in discharging, so it may not a fault and it may not trigger NUT to go shutdown routine. It likely relate APC have some change in some UPS model's firmware, and not as usual.

 

The key point is dose NUT going to shutdown routine. For example, I test my APC UPS and got below message, but NUT won't going to shutdown.

 

I think most important message are online or on battery. If that true, may be NUT should not RED all online status.

 

image.png.d840e195456b6b77cdb058a5817c9e24.png

Edited by Vr2Io
Link to comment

APC has had some very weird firmware changes (bugs?) with more recent models (it seems). Some other of their UPS series have also had spurious false statuses being reported. Unfortunately, there's not much that can be done from the NUT (plugin) side. The important thing, as @Vr2Io pointed out, is that the "on battery" situation is detected correctly and no wrong shutdowns are caused in situations where the UPS is not in fact on "on battery".

 

There is some major work being done in the NUT backend at the moment that might lead to an improvement of the parameters read from the UPSes, it can be followed here: https://github.com/networkupstools/nut/pull/2604. I'll push the next update to NUT once that pull request gets merged, which will also include the fix for your kill power issue which has since been merged ( @Vr2Io ) : https://github.com/networkupstools/nut/pull/2606.

 

  • Thanks 1
Link to comment

Hello! 

I switched from a supported Eaton UPS to a larger Liebert / Emerson / Vertiv GXT5-1500LVRT2UXL. It has a USB connection as well as a NIC card for web-based administration. When I attach it to the usbhid-ups driver, I do see some basic information, but not enough to configure the footer with the LOAD/TIMELEFT that I used to have. I'm actually having issues starting the NUT plugin in UNRAID now, so I'm posting my debug log. It looks like the error in the syslog is "libusb1: Could not open any HID devices: insufficient permissions on everything" and:

 

Sep 2 09:42:26 NAS01 rc.nut: This Liebert device (10af:1000) is not (or perhaps not yet) supported

Sep 2 09:42:26 NAS01 rc.nut: by usbhid-ups. Please make sure you have an up-to-date version of NUT. If

Sep 2 09:42:26 NAS01 rc.nut: this does not fix the problem, try running the driver with the

Sep 2 09:42:26 NAS01 rc.nut: '-x productid=1000' option. Please report your results to the NUT user's

Sep 2 09:42:26 NAS01 rc.nut: mailing list <[email protected]>.

 

The driver I'm not sure where to set the '-x productid=1000' option, though. is that editing ups.conf or can that be done in the UNRAID GUI?
 

I'm not seeing really anyone else that has this unicorn of a UPS since they are a bit expensive. I tried using custom drivers in the GUI settings, but I didn't have any luck with that, either. It seems that NUT doesnt even want to start up now. I did try re-installing it, but it still has errors on startup. It was working when I switched from Eaton to a temporary GXT4 to the permanent GXT5, but not I cannot even get it to start.

 

If I use the UNRAID UPS plugin, it shows the batteries at 1000000000.0 Percent and the Load at 200 Percent. Not exactly correct, but the TIMELEFT variable is accurate. 

 

I'm not sure if NUT or UNRAID can support these, so I'm not sure if I have a dead-end here and I need to look at something else like SNMP. Thanks!

nut-debug-20240902095721.zip

Link to comment
2 hours ago, jholman76 said:

Hello! 

I switched from a supported Eaton UPS to a larger Liebert / Emerson / Vertiv GXT5-1500LVRT2UXL. It has a USB connection as well as a NIC card for web-based administration. When I attach it to the usbhid-ups driver, I do see some basic information, but not enough to configure the footer with the LOAD/TIMELEFT that I used to have. I'm actually having issues starting the NUT plugin in UNRAID now, so I'm posting my debug log. It looks like the error in the syslog is "libusb1: Could not open any HID devices: insufficient permissions on everything" and:

 

Sep 2 09:42:26 NAS01 rc.nut: This Liebert device (10af:1000) is not (or perhaps not yet) supported

Sep 2 09:42:26 NAS01 rc.nut: by usbhid-ups. Please make sure you have an up-to-date version of NUT. If

Sep 2 09:42:26 NAS01 rc.nut: this does not fix the problem, try running the driver with the

Sep 2 09:42:26 NAS01 rc.nut: '-x productid=1000' option. Please report your results to the NUT user's

Sep 2 09:42:26 NAS01 rc.nut: mailing list <[email protected]>.

 

The driver I'm not sure where to set the '-x productid=1000' option, though. is that editing ups.conf or can that be done in the UNRAID GUI?
 

I'm not seeing really anyone else that has this unicorn of a UPS since they are a bit expensive. I tried using custom drivers in the GUI settings, but I didn't have any luck with that, either. It seems that NUT doesnt even want to start up now. I did try re-installing it, but it still has errors on startup. It was working when I switched from Eaton to a temporary GXT4 to the permanent GXT5, but not I cannot even get it to start.

 

If I use the UNRAID UPS plugin, it shows the batteries at 1000000000.0 Percent and the Load at 200 Percent. Not exactly correct, but the TIMELEFT variable is accurate. 

 

I'm not sure if NUT or UNRAID can support these, so I'm not sure if I have a dead-end here and I need to look at something else like SNMP. Thanks!

nut-debug-20240902095721.zip 178.9 kB · 0 downloads

 

Thanks for the detailed post and the debug package, you can indeed try adding:

productid = 1000

to the end of UPS.CONF through the GUI configuration editor in NUT Settings.

Make sure to put this on line 9 or later so it is not overwritten by the GUI settings.

 

If this doesn't help, remove the line again and then I'd try with SNMP instead.

With such more enterprise-oriented devices SNMP is usually the best choice.

Most SNMP implementations use an industry standard MIB ensuring you'll see all values.

Besides, SNMP is usually much more stable than USB, so I recommend it wherever available.

 

The disadvantage is having to protect all network devices between the server and UPS too.

You'll need to ensure that the network connection between the server and UPS always stays up.

 

SNMP usually needs to be activated on the UPS device first, then you can use it with the UPS

Driver "net-snmp" & setting the UPS Port to the IP of your UPS device (where SNMP is activated).

 

I recommend using SNMP v1/v2 if available as v3 needs a more complicated (configuration file) setup.

Please let me know if you got it to work with either of my suggestions... 🙂 

 

Link to comment

I just pushed an update to NUT with some new features and the new "preview" backend.

 

@Masterwishx: The "preview" backend now includes your Eaton fixes (NUT GitHub PR#2604).

 

@Vr2Io: The "preview" backend now includes your allow_killpower fixes (NUT GitHub PR#2606).

Please let me know if the allow_killpower flag in UPS.CONF works for you now. 🙂 

  • Thanks 1
Link to comment
3 hours ago, Rysz said:

@Vr2Io: The "preview" backend now includes your allow_killpower fixes (NUT GitHub PR#2606).

Please let me know if the allow_killpower flag in UPS.CONF works for you now. 🙂 

@Rysz I try add the line and also remove the line in ups.conf, it work flawlessly. Thanks

 

image.png.f1d18fa59237146881382f93ee0e5d2c.png

Edited by Vr2Io
  • Like 1
Link to comment
On 9/2/2024 at 12:30 PM, Rysz said:

 

Thanks for the detailed post and the debug package, you can indeed try adding:

productid = 1000

to the end of UPS.CONF through the GUI configuration editor in NUT Settings.

Make sure to put this on line 9 or later so it is not overwritten by the GUI settings.

 

If this doesn't help, remove the line again and then I'd try with SNMP instead.

With such more enterprise-oriented devices SNMP is usually the best choice.

Most SNMP implementations use an industry standard MIB ensuring you'll see all values.

Besides, SNMP is usually much more stable than USB, so I recommend it wherever available.

 

The disadvantage is having to protect all network devices between the server and UPS too.

You'll need to ensure that the network connection between the server and UPS always stays up.

 

SNMP usually needs to be activated on the UPS device first, then you can use it with the UPS

Driver "net-snmp" & setting the UPS Port to the IP of your UPS device (where SNMP is activated).

 

I recommend using SNMP v1/v2 if available as v3 needs a more complicated (configuration file) setup.

Please let me know if you got it to work with either of my suggestions... 🙂 

 

Hello again! Sorry for the delay. I was able to enable SNMP v2c on the UPS and set up a basic community string. NUT picked it up with the SNMP driver/port and I get all of the information now. My last question is if I can change the footer GUI output. It looks like I see battery %, which is good, but I also see UPS Load %. I'd rather see the variable output.realpower, or add that to the footer (or other variables, too) with those others to see what all equipment is pulling for Watts. Is there a simple config file I can edit or is that more difficult to customize?

 

Also thanks again for such fast support! I'm very happy that this is showing data again and was hoping I wouldn't be unable to safely shut down my server if there was an outage. As for network connectivity, I have all of my network gear connected to this same UPS, so if its ever off... its all off... hah. 

Edited by jholman76
  • Thanks 1
Link to comment
3 hours ago, jholman76 said:

Hello again! Sorry for the delay. I was able to enable SNMP v2c on the UPS and set up a basic community string. NUT picked it up with the SNMP driver/port and I get all of the information now. My last question is if I can change the footer GUI output. It looks like I see battery %, which is good, but I also see UPS Load %. I'd rather see the variable output.realpower, or add that to the footer (or other variables, too) with those others to see what all equipment is pulling for Watts. Is there a simple config file I can edit or is that more difficult to customize?

 

Also thanks again for such fast support! I'm very happy that this is showing data again and was hoping I wouldn't be unable to safely shut down my server if there was an outage. As for network connectivity, I have all of my network gear connected to this same UPS, so if its ever off... its all off... hah. 

 

If it's not showing the power draw already, you can set these settings up with your UPS rated capacities:

grafik.thumb.png.80ab4250a71cc4b7f7c0e87cd89434d5.png

 

And it'll calculate the power draw from those settings in combination with the reported load percentage of the UPS. Other variables are not possible to be shown in the footer (yet), but I'll put that on the TO-DO list for the future. However you can already monitor/have charts for other variables with the NUT Runtime Statistics Module.

 

The footer itself should look like this when everything's working as designed:

grafik.png.6598a8af3c92b4991e08839a5873d2ff.png

 

Link to comment
11 hours ago, Rysz said:

 

If it's not showing the power draw already, you can set these settings up with your UPS rated capacities:

grafik.thumb.png.80ab4250a71cc4b7f7c0e87cd89434d5.png

 

And it'll calculate the power draw from those settings in combination with the reported load percentage of the UPS. Other variables are not possible to be shown in the footer (yet), but I'll put that on the TO-DO list for the future. However you can already monitor/have charts for other variables with the NUT Runtime Statistics Module.

 

The footer itself should look like this when everything's working as designed:

grafik.png.6598a8af3c92b4991e08839a5873d2ff.png

 

Oh yah. that's exactly what I needed to do! I have the wattage showing in the footer. I also updated a few of the variables for the Stats Module since this UPS seems to play by its own rules and that is fully populated now, too. Thanks so much for the help! I'm very happy to have all of this back reporting again. I'll have to do a load test with my UNRAID array off-line to make sure it all works now. 

  • Like 1
Link to comment

Would it be possible to make this message also Dismiss-able:

grafik.thumb.png.8d5e8b3877194028ed75ff655ea9b757.png

 

Another idea from my side would be to make the plugin use tabs and to put the Controll Center in another tab (don't know if you like that but I think that would be super cool and would make the plugin page more accessible) :

grafik.thumb.png.788e04a23897e541ad9bd6253557882c.png

Link to comment
3 minutes ago, ich777 said:

Would it be possible to make this message also Dismiss-able:

grafik.thumb.png.8d5e8b3877194028ed75ff655ea9b757.png

 

Another idea from my side would be to make the plugin use tabs and to put the Controll Center in another tab (don't know if you like that but I think that would be super cool and would make the plugin page more accessible) :

grafik.thumb.png.788e04a23897e541ad9bd6253557882c.png

 

Sure, I will add both (valid and good) suggestions in the next update.

 

To be honest on the machine I developed the command center on, the connected UPS had only like 4 or so commands available. After updating NUT on my production server, I saw that my Eaton UPS had around 15... and now it does seem a bit too much to have all that on on page. 😄 

 

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

I saw that my Eaton UPS had around 15...

Same over here, the page is now reeaaaaaally long... :)

 

Don't know if you want to do that and not how much work that would be but split all into tabs because with that you have a really good overview.

NUT Settings | Display Settings | NUT Details | NUT Configuration Editor | NUT Command Center

 

...again, just an idea and not sure if it makes sense to split everything into it's own tab.

Link to comment
7 minutes ago, ich777 said:

Same over here, the page is now reeaaaaaally long... :)

 

Don't know if you want to do that and not how much work that would be but split all into tabs because with that you have a really good overview.

NUT Settings | Display Settings | NUT Details | NUT Configuration Editor | NUT Command Center

 

...again, just an idea and not sure if it makes sense to split everything into it's own tab.

 

This is already kind of implemented and depends on the user's "Display Settings" (Unraid-wide ones):

grafik.png.221f4cfb25b01699ac061d4d8e24b32a.png

 

grafik.thumb.png.f741cfd6d950465a2fa1ffcf51139607.png

 

... which (now that I remember) was I think also the reason I put the command center on this page.

... or do you mean a setting to override the Unraid-wide tabbing settings just for this (long) plugin? 🙂 

Not sure how easy that would be because the tabbing seems to happen before the page building...

 

Link to comment
6 minutes ago, Rysz said:

Not sure how easy that would be because the tabbing seems to happen before the page building...

Yes that's true, I'm also not sure how hard that would be for your plugin.

In my opinion it looks better organized when not everything is on one page.

 

Not sure how much work that would be because you would have to split everything onto it's own dedicated page but since you have Apply and Save buttons for every page I assume it would be not too hard.

 

9 minutes ago, Rysz said:

"Display Settings" (Unraid-wide ones)

I don't have a Ultra wide, just a big montior. :D

Link to comment

Hello everyone, please tell me how to fix the problem with the UPS (ups.model Back-UPS BX750MI) not remembering the setting to turn off the beeper. In the NUT settings, I press the button to run the script to turn off the beeper, go and disconnect the UPS from the network, the first time it turns off the server and turns off itself without sound, but after power is supplied to the UPS, the sound returns.

111.png

Link to comment
8 minutes ago, Kilrah said:

There are plenty of plugins (e.g appdata backup) that have tabs, should be possible :)

 

 

9 minutes ago, ich777 said:

Yes that's true, I'm also not sure how hard that would be for your plugin.

In my opinion it looks better organized when not everything is on one page.

 

Not sure how much work that would be because you would have to split everything onto it's own dedicated page but since you have Apply and Save buttons for every page I assume it would be not too hard.

 

I don't have a Ultra wide, just a big montior. :D

 

I mean it is already possible to switch NUT to tabbed mode, the behaviour just follows the OS settings and system-wide user preference. If you set Settings => Display Settings => Page view: Tabbed, then you will have NUT tabbed as well. 🙂 If not, then you will have it all on one page... I don't really want to override the OS setting because everyone has a different taste and this way the user can decide (for all the OS). So NUT already has separate *.page files for all the pages, it's the OS (and that setting) which decide how to show everything to the user.

 

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

If you set Settings => Display Settings => Page view: Tabbed then you will have NUT tabbed as well. 🙂

Thanks for the hint, didn't know that this is a thing... :D

 

2 minutes ago, Rysz said:

NUT already has every *.page set out for both settings, the OS decides (and that setting) decides how to show everything.

Okay, then it should be pretty easy to change that but since the tabbed view is already there I don't know if that's necessary... That's up to you. :)

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

Thanks for the hint, didn't know that this is a thing... :D

 

Okay, then it should be pretty easy to change that but since the tabbed view is already there I don't know if that's necessary... That's up to you. :)

I prefer a non tabbed view and change via display settings if required so I think this is the correct approach

  • Like 2
Link to comment
6 minutes ago, ich777 said:

Thanks for the hint, didn't know that this is a thing... :D

 

Okay, then it should be pretty easy to change that but since the tabbed view is already there I don't know if that's necessary... That's up to you. :)

 

3 minutes ago, SimonF said:

I prefer a non tabbed view and change via display settings if required so I think this is the correct approach

 

Yes, I think it's best we leave this to the user preference via the system-wide "Display Settings".

In any case, both tabbed/non-tabbed are already supported by the plugin depending on the OS setting.

 

But will put the "NUT Command Center" on a separate page for logical separation (and sheer length). 🙂 

 

  • Like 1
Link to comment
14 minutes ago, Owerrride said:

Hello everyone, please tell me how to fix the problem with the UPS (ups.model Back-UPS BX750MI) not remembering the setting to turn off the beeper. In the NUT settings, I press the button to run the script to turn off the beeper, go and disconnect the UPS from the network, the first time it turns off the server and turns off itself without sound, but after power is supplied to the UPS, the sound returns.

111.png

 

As this is a very entry-level UPS series (with limited firmware compatibility), it probably doesn't store the setting somewhere on a chip when it's turned off - this is unfortunately outside of NUT's control.

 

  • Upvote 1
Link to comment

I apologize if this has already been asked but I cant find it anywhere.  I want to use NUT to send a shutdown command to my UDM Pro but I cant figure out how to go about doing it.  I figure that I have to write a script to ssh into the router and send a shutdown command at a given power state but I have no idea how make that work in the plugin.  Does anyone know how to make this work?

Link to comment
17 hours ago, Rysz said:

As this is a very entry-level UPS series (with limited firmware compatibility), it probably doesn't store the setting somewhere on a chip when it's turned off - this is unfortunately outside of NUT's control.

Can I make user script and when unraid start always use script to turn off the beeper? Can you write this command and I make script. Thank you

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