[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

On 1/8/2021 at 12:33 AM, JimmyGerms said:

NUT will reset ups.delay.shutdown and ups.delay.start to their default values of 20 and 30 blowing the whole setup randomly.

 

Are you sure it's random? If e.g. it's reset on startup you can save the good version to your boot drive and copy it over in config/go (which I'm pretty sure runs after plugins are installed)

Link to comment

I don't believe it's as random as I'm thinking. It seems to reset every time this error pops up in the logs:

usbhid-ups[3459]: nut_libusb_get_report: Input/Output Error.

I cannot find much on google about this.

 

What I've done for now is setup a raspberry pie to be the netserver and I've had no issues so far. Thanks for the tutorial. It helped me get to where I needed to go!

Edited by JimmyGerms
  • Like 1
Link to comment
13 hours ago, JimmyGerms said:

Thanks for the tutorial. It helped me get to where I needed to go!

 

Glad it was helpful.

 

Actually I've updated it with misc reliability tweaks and a shift from battery level-based shutdown to timer-based shutdown. I was holding off until I had a few natural power outage/shutdowns to test with but I'm reasonably confident it's an improvement.

Edited by CS01-HS
Link to comment
  • 3 weeks later...

Has anyone tried to get a Liebert GXT3 1500 UPS connected with a USB cable to work?  When I try to start the Nut plugin I get the following:

 

Writing nut config
Updating permissions...
Network UPS Tools - UPS driver controller 2.7.4.1
Network UPS Tools - Generic HID driver 0.55 (2.7.4.1)
USB communication driver 0.43
This Liebert device (10af:0000) is not (or perhaps not yet) supported
by usbhid-ups. Please make sure you have an up-to-date version of NUT. If
this does not fix the problem, try running the driver with the
'-x productid=0000' option. Please report your results to the NUT user's
mailing list <[email protected]>.

No matching HID UPS found
Driver failed to start (exit status=1)

 

Here is the ups.conf file I tried to add the suggestion in the error log to and it did not help.

 

[ups]
driver = Usbhid-ups
-x productid=0000
port = 10af:0000

 

 

Thank you in advance for any help.

 

 

 

 

nut config.PNG

Edited by j5428
Link to comment

Hi all,

 

I have a Tripp Lite SMART1500LCD UPS, and I'm having an issue getting the current wattage to show up correctly. I have a Kill-A-Watt connected between the UPS and the wall. It seems that no matter what I do, I cannot get an accurate reading. Currently, these are my settings for the UPS. The only driver that will work is usbhid, although I believe that the tripplite-usb driver should work.

 

image.png.edd20cd8ea2d01ad64dfaad96e40b6f0.png

image.png.e2ad3bebbed06b8092331231c8e80b0e.png

 

Currently, NUT is showing around 520 watts of power being consumed, while the kill-a-watt is only showing 350.

 

This gets exacerbated when I try to import the data into grafana with nut-influxdb-exporter. The ups.power value shows nothing when selected, however when I select "watts" it shows the erroneously high value. Do I need to change username/password and select tripplite-usb to fix this? It's very frustrating.

 

Link to comment
2 hours ago, Surgikill said:

Do I need to change username/password and select tripplite-usb to fix this? It's very frustrating.

No.

 

Most UPS won't provide power usage figure, plugin will calculate base on ups.load / output.current / other. You can setting "UPS Power and Load Display Settings" to tune that. And you should know UPS / Kill-A-Watt would provide very different figure is normal, accurate power measurement not a easy job.

 

image.png.5772571ab98512d7e769a8488756f291.png

Link to comment
4 hours ago, Vr2Io said:

No.

 

Most UPS won't provide power usage figure, plugin will calculate base on ups.load / output.current / other. You can setting "UPS Power and Load Display Settings" to tune that. And you should know UPS / Kill-A-Watt would provide very different figure is normal, accurate power measurement not a easy job.

 

image.png.5772571ab98512d7e769a8488756f291.png

This only fixes the display in unraid. It does not change the value that gets sent to influx db.

 

I would not expect the UPS to report a figure higher than the kill-a-watt. Currently, I have on-board power monitoring for all of my servers. The only non power monitored items in my rack are a non-poe switch, and a modem. If I am to take the power reported from each server and subtract it from the power reported by the UPS, I am left with around 100-150 watts of overhead, which is much more than my switch and modem pull.

 

Power factor correction is also enabled on all of the machines.

Link to comment
  • 3 weeks later...

I am trying to get my Tripp Lite SMART1500LCDT to work with the NUT plugin. I am able to pass through the UPS's USB and get it to work on a Mint VM using NUT installed on the VM. But I cannot get it to work directly within Unraid with the NUT plugin.  On the VM I have to change the /lib/udev/rules.d/62-nut-usbups.rules to just contain the following:

 

SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"

# TrippLite
#  e.g. TrippLite SMART1500LCD - usbhid-ups
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="09ae", ATTR{idProduct}=="3016", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"

LABEL="nut-usbups_rules_end"


However, unraid overwrites the udev folder on boot. So this is not an option. Is there some way for me to update this file and not have it overwritten? The plugin adds this file somehow (it's not in the udev folder when the plugin is uninstalled), how is the file added by the plugin?

Link to comment
16 hours ago, david_w said:

However, unraid overwrites the udev folder on boot. So this is not an option.

 

I don't know enough about the plugin to know if that's the best solution but you can overwrite the rules file on boot by saving your custom version on the flash drive (I created the directory /boot/extras/ for custom scripts) then adding something like the following to your /boot/config/go file:

 

# Custom autofan
cp /usr/local/emhttp/plugins/dynamix.system.autofan/scripts/autofan /usr/local/emhttp/plugins/dynamix.system.autofan/scripts/autofan.orig
cp /boot/extras/autofan /usr/local/emhttp/plugins/dynamix.system.autofan/scripts/autofan

 

Link to comment
17 hours ago, david_w said:

udev folder

The running files are not persistent.  Plugins get reloaded at boot so they can copy/create the file, as @CS01-HSsaid you can use the go file to make changes.

 

This is part of my plugin install which is just a bash script.

# move the rules file

cp /usr/local/emhttp/plugins/&name;/99_persistent_usb.rules /etc/udev/rules.d/

chmod 644 -R /etc/udev/rules.d/99_persistent_usb.rules 2>/dev/null



# reload udev rules

udevadm control --reload-rules

So create a udev rules file on you boot drive, in the go file copy to udev rules and then run udevadm to update with your rules. My location is from the plugin which gets restored at boot.

Edited by SimonF
Link to comment
  • 2 weeks later...
On 9/4/2020 at 6:45 AM, b0m541 said:

I am wondering, are there no others using SNMP to monitor /manage their UPS?

Is nobody else having this problem? If so, there must be a way to do it right / better, an I would like to learn how.

Is nobody currently maintaining the NUT plugin?

 

 

I'm also trying to get my UPS set up with the NUT plugin and SNMP.  I can get it working via Unraid's default UPS functionality using SNMP but not via NUT.  I'm getting the error that was mentioned above "/usr/libexec/nut/snmp-ups: error while loading shared libraries: libnetsnmp.so.35: cannot open shared object file: No such file or directory".

 

It sounds like there were some temporary workarounds mentioned but they no longer work.  Any update on a more long term fix?

Link to comment
  • 3 weeks later...

i've posted this in General Support but it might get a bit more NUT attention in here:

 

 

Quote

ok, so against my better judgement [i just wanted UPS protection that i currently lost from the broken down one] i ordered the PowerCool 1000VA

 

plugged it in and used AutoDetect in NUT and it detected:

 

 

nutscanner.png.6c5cbeacd3794944bdc5cbdb34b92a6c.png

 

but it kept setting the driver to blazer [which reading in the NUT manual - LINK is what is it], but then further reading and googling found this:

Discussion on the Powercool and the nutdrv-qx driver

GitHub

2113680434_2021-04-02(1).png.a43551522d858272194b4c13790d892f.png

so put this [without quotes] into the ups.conf in the editor at the bottom of NUT settings and set USB driver to custom nutdrv_qx

 

2067977535_2021-04-02(2).thumb.png.fadb4be870795351a13b2489ab9e0244.png

 

1117220360_2021-04-02(3).thumb.png.bc8248d4ec943140ce60fa26e2d765bf.png

 

989888241_2021-04-02(4).png.96802d6f68a1d9fad797ff6b30b3c7b6.png

and that is the limit of capabilities.

 

has anyone managed to get Powercool UPS to work with NUT?

 

a little surprised as its such a budget/cheap UPS in the UK that if it were to work easily, it'd be a no-brainer for UK users to get one!

 

 

any advice anyone can offer, i'd appreciate it!

 

 

 

 

 

 

Edited by Jammy B
Link to comment
  • 2 weeks later...

Hey Guys,
I am bit stuck trying to figure out how to configure NUT tools to connect to my APC 1500 (AP9630 via SNMP) 

if I put the UPS Mode as slave and the UPS IP address to the my AP930 ip.. I am bit confused what I put in for UPS monitor user/pass .
slave/userpass.

has anyone setup NUT tools connecting to APC ups via SNMP? if you have would be great to hear how do it.

Thanks.

Edited by PowerShell
spelling mistake
  • Like 1
Link to comment

Hi, back in 2016 I got a Riello UPS working with the old version of NUT.

Now I want to buy a new UPS, but I do not want to go through the trial and error way to make it work again.

Could anyone confirm which Trademarks are working out of the box?

Rgds

 

Link to comment
  • 2 weeks later...

I have a CyberPower 1600 UPS. 'VP1600ELCD' which is connected via the supplied USB plug.

It worked fine in the built in UPS section.

I want NUT so I can also tie it in with home assistant.

Anyway.. I have it up and running and can see it in home assistant.

My problem is that it seems to just die randomly.

Usually a reboot will fix it however sometimes it again just dies.

Basically it it is working as intended and then it just stops reporting anything and shows all '-' and N/A in the little page footer bit.

I try a 'reload' using the button in the NUT settings but it doesn't come back.

I have set the built in UPS settings as noted in the fist post.

Anything else I can try? Any ideas

Link to comment
On 5/2/2021 at 8:36 PM, Joshndroid said:

I have a CyberPower 1600 UPS. 'VP1600ELCD' which is connected via the supplied USB plug.

It worked fine in the built in UPS section.

I want NUT so I can also tie it in with home assistant.

Anyway.. I have it up and running and can see it in home assistant.

My problem is that it seems to just die randomly.

Usually a reboot will fix it however sometimes it again just dies.

Basically it it is working as intended and then it just stops reporting anything and shows all '-' and N/A in the little page footer bit.

I try a 'reload' using the button in the NUT settings but it doesn't come back.

I have set the built in UPS settings as noted in the fist post.

Anything else I can try? Any ideas

 

As dumb as this may sound;

It may seem that the generation of port may be playing a part in why it dies.

I noticed in the log this error - usbhid-ups[7753]: nut_libusb_get_interrupt: Input/Output Error.

I read a very old post in which people were advising that nut was using an old libusb which is deprecated and been replaced. It also advises within that the newer libusb it addresses deficiencies with USB 2 and 3...  source: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810449

On flowing through i can see that this is still an open issue on the NUT's github https://github.com/networkupstools/nut/issues/300

Considering I don't have much to lose at this point i noticed I had the USB plugged into a USB 3 port on the motherboard rear (it may have been even a 3.1 port, hard to tell colour at the back in the dark).

Anyway I switched the USB to the keyboard/mouse usb at the top of the motherboard and voila, hit refresh and UPS came back. Something it has never done before after it dies.

Something to think about when using the USB plug from your UPS

Link to comment
11 hours ago, ryphez said:

Which time are you referring to? I'm looking for it to automatically stop the array before powering down but I didn't see any option for that

 

thats because that is what it should be doing. when it initiates power off it stops the array, containers and VMs before it then powers off. But if the array isn't stopping in time, then you're getting parity checks on reboot.

 

you might need to reduce the time it runs on battery to give you more shut down time on battery

 

image.png.7add02f76d591ddfb07ca64eb25489c9.png

 

not fully sure. mine doesn't work at all at the moment. but it should complete a clean power off each time.

 

its normally a container thats holding it up. what do you diagnostic/logs say?

Edited by Jammy B
Link to comment
  • 1 month later...

since @dmacias doesn't seem to respond to PMs or mentions in this thread.

 

how does one update NUT to incorporate latest driver additions that the NUT makers have made?

 

I'm keen to get the Powercool UPS i have working with it and from the NUT mailing list, they have done some development that could mean that unRAID would be able to communicate with it with a new driver without me having too much issue.

 

i just don't know where/how to begin adding in the relevant bits to enable this possibility.

 

any ideas?

 

 

Edited by Jammy B
Link to comment
  • Rysz featured this topic

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.