[Plugin] NUT v2 - Network UPS Tools


dmacias

359 posts in this topic Last Reply

Recommended Posts

Hi there! I posted a bit on another tread about a CyberPower CP1500PFCLCD UPS and some issues I was running into and wanted to post here on what I found. The goal is to edit my shutdown and start times for the CyberPower UPS because it does not play nice with "Turn off UPS after shutdown".

Problem:

 

This is what I just tried:

  • ups.conf:
[CP1500]
	driver = usbhid-ups
	port = auto
	offdelay = 300
	ondelay = 0
	ignorelb
	override.battery.charge.low = 50
	override.battery.charge.warning = 60
  • "Start Network UPS Tools service"=No (Because Yes would not start on reboot)
  • "Enable Manual Config Only"=Yes
  • Edited "/boot/config/go" to contain:
    • bash /etc/rc.d/rc.nut start

 

Upon a power outage the server will shutdown cleanly and the CP1500PFCLCD will count down from 5 min and remain off when done. When power is restored I see it counting down from 10 seconds and then it turns itself back on. Exactly what I want...EXCEPT...NUT will reset ups.delay.shutdown and ups.delay.start to their default values of 20 and 30 blowing the whole setup randomly.

 

When I noticed the reset I saw this in the logs:

usbhid-ups[16281]: nut_libusb_get_string: Pipe error.
usbhid-ups[16281]: nut_libusb_get_report: Input/Output Error.

Any help would be much appreciated. I would love to get my CyberPower UPS to shutdown and restart upon power loss/restore if possible!

Thanks!

 

EDIT:

After watching and reading the logs the reset is caused by whatever this error is doing:

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

Google is coming up with this thread and not much else around this error.

Edited by JimmyGerms
Link to post
  • Replies 358
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

NUT plugin v2 for unRAID 6.1+   NUT - Network UPS Tools - http://www.networkupstools.org/   Based on the original NUT plugin by macester Original thread https://forums.lime-technology.com/

Try running from the command line ps aux | grep ups   If something is still running run e.g. killall upsmon   There's some differences between the nut packages. I think I need to add some more c

Looks like the slave shuts down first in this scenario.  Takes about 30 seconds for the second server, and longer for Unraid... maybe because it's running more dockers and other things.  That command

Posted Images

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 post

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
Link to post
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 post
  • 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 <nut-upsuser@lists.alioth.debian.org>.

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 post

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

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.