[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts



ok found it
what was missing was that : 
MONITOR ups@localhost 1 root password master


I think it was just the null username and password. The 127.0.0.1 is fine but the default should be

MONITOR [email protected] 1 monuser monpass master

I just removed the plugin and deleted the plugin directory on the flash drive. And reinstalled just to double check. Everything works. So maybe there was some old conf or cfg files left over. Or bad values from the Autodetect button since there was a bug with that. I'll make it so you can't have null username and passwords.
Link to comment
  • 3 weeks later...

Hi,

 

I am trying to run nut on my router (GL-iNet) on openwrt.

 

Installed the following packages: nut, nut-driver-usbhid-ups

 

Here is my ups.conf:

[durant]
   driver = "usbhid-ups"
   port = "auto"
   vendorid = "0764"
   productid = "0501"
   product = "CP1500EPFCLCD"
   serial = "CRNGV2000035"
   vendor = "CPS"
   bus = "002"
   desc = "Cyber Power CP1500EPFCLCD Unit 35"
   ignorelb
        override.battery.runtime.low = 4000
        override.ups.timer.shutdown = 10
        override.ups.delay.shutdown = 60

 

upsmon.conf says...

MONITOR durant@localhost 1 root pass master

 

When I try to shutdown the UPS, I always get this message:

root@GL-MT300N-V2:~# upsdrvctl shutdown
Network UPS Tools - UPS driver controller reboot-6807-g58f7b5b
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
Can't claim USB device [0764:0501]: No such file or directory
Driver failed to start (exit status=1)

 

No other UPS process is running (e.g. apcupsd)

 

Thanks in advance.

 

 

 

 

 

Link to comment



Hi,
 
I am trying to run nut on my router (GL-iNet) on openwrt.
 
Installed the following packages: nut, nut-driver-usbhid-ups
 
Here is my ups.conf:
[durant]
   driver = "usbhid-ups"
   port = "auto"
   vendorid = "0764"
   productid = "0501"
   product = "CP1500EPFCLCD"
   serial = "CRNGV2000035"
   vendor = "CPS"
   bus = "002"
   desc = "Cyber Power CP1500EPFCLCD Unit 35"
   ignorelb
        override.battery.runtime.low = 4000
        override.ups.timer.shutdown = 10
        override.ups.delay.shutdown = 60
 
upsmon.conf says...
MONITOR durant@localhost 1 root pass master
 
When I try to shutdown the UPS, I always get this message:
root@GL-MT300N-V2:~# upsdrvctl shutdown
Network UPS Tools - UPS driver controller reboot-6807-g58f7b5b
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
Can't claim USB device [0764:0501]: No such file or directory
Driver failed to start (exit status=1)
 
No other UPS process is running (e.g. apcupsd)
 
Thanks in advance.
 
 
 
 
 


If this error is on your router, it's probably a permissions problem. You could be missing necessary directories too. Just google
Nut Can't claim USB device No such file or directory
Link to comment
10 hours ago, dmacias said:


 

 


If this error is on your router, it's probably a permissions problem. You could be missing necessary directories too. Just google
Nut Can't claim USB device No such file or directory

here's what I got from debug lines...

 

root@GL-MT300N-V2:~# /lib/nut/usbhid-ups -DDDDD -a durant
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
   0.000000    send_to_all: SETINFO driver.parameter.port "auto"
   0.001167    send_to_all: SETINFO driver.parameter.vendorid "0764"
   0.002656    send_to_all: SETINFO driver.parameter.productid "0501"
   0.003927    send_to_all: SETINFO driver.parameter.product "CP1500EPFCLCD"
   0.005188    send_to_all: SETINFO driver.parameter.serial "CRNGV2000035"
   0.005373    send_to_all: SETINFO driver.parameter.vendor "CPS"
   0.006187    send_to_all: SETINFO driver.parameter.bus "002"
   0.006371    send_to_all: SETINFO driver.flag.ignorelb "enabled"
   0.006513    send_to_all: SETINFO battery.runtime.low "4000"
   0.006606    send_to_all: SETFLAGS battery.runtime.low
   0.006765    debug level is '5'
   0.007771    upsdrv_initups...
   0.013575    Checking device (1D6B/0002) (001/001)
   0.015552    - VendorID: 1d6b
   0.016554    - ProductID: 0002
   0.017856    - Manufacturer: Linux 4.4.92 ehci_hcd
   0.018840    - Product: EHCI Host Controller
   0.020118    - Serial Number: 101c0000.ehci
   0.020867    - Bus: 001
   0.021482    - Device release number: 0404
   0.021595    Trying to match device
   0.021687    Device does not match - skipping
   0.021841    Checking device (0764/0501) (002/007)
   0.032514    - VendorID: 0764
   0.033564    - ProductID: 0501
   0.033688    - Manufacturer: CPS
   0.033754    - Product: CP1500EPFCLCD
   0.033819    - Serial Number: CRNGV2000035
   0.034533    - Bus: 002
   0.034616    - Device release number: 0001
   0.034681    Trying to match device
   0.034920    Device matches
   0.035020    failed to claim USB device: Resource busy
   0.035109    failed to detach kernel driver from USB device: No such file or directory
   0.035758    failed to claim USB device: Resource busy
   0.035864    failed to detach kernel driver from USB device: No such file or directory
   0.035948    failed to claim USB device: Resource busy
   0.036031    failed to detach kernel driver from USB device: No such file or directory
   0.036113    failed to claim USB device: Resource busy
   0.036199    failed to detach kernel driver from USB device: No such file or directory
   0.036284    Can't claim USB device [0764:0501]: No such file or directory

Link to comment
here's what I got from debug lines...
 
root@GL-MT300N-V2:~# /lib/nut/usbhid-ups -DDDDD -a durant
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
   0.000000    send_to_all: SETINFO driver.parameter.port "auto"
   0.001167    send_to_all: SETINFO driver.parameter.vendorid "0764"
   0.002656    send_to_all: SETINFO driver.parameter.productid "0501"
   0.003927    send_to_all: SETINFO driver.parameter.product "CP1500EPFCLCD"
   0.005188    send_to_all: SETINFO driver.parameter.serial "CRNGV2000035"
   0.005373    send_to_all: SETINFO driver.parameter.vendor "CPS"
   0.006187    send_to_all: SETINFO driver.parameter.bus "002"
   0.006371    send_to_all: SETINFO driver.flag.ignorelb "enabled"
   0.006513    send_to_all: SETINFO battery.runtime.low "4000"
   0.006606    send_to_all: SETFLAGS battery.runtime.low
   0.006765    debug level is '5'
   0.007771    upsdrv_initups...
   0.013575    Checking device (1D6B/0002) (001/001)
   0.015552    - VendorID: 1d6b
   0.016554    - ProductID: 0002
   0.017856    - Manufacturer: Linux 4.4.92 ehci_hcd
   0.018840    - Product: EHCI Host Controller
   0.020118    - Serial Number: 101c0000.ehci
   0.020867    - Bus: 001
   0.021482    - Device release number: 0404
   0.021595    Trying to match device
   0.021687    Device does not match - skipping
   0.021841    Checking device (0764/0501) (002/007)
   0.032514    - VendorID: 0764
   0.033564    - ProductID: 0501
   0.033688    - Manufacturer: CPS
   0.033754    - Product: CP1500EPFCLCD
   0.033819    - Serial Number: CRNGV2000035
   0.034533    - Bus: 002
   0.034616    - Device release number: 0001
   0.034681    Trying to match device
   0.034920    Device matches
   0.035020    failed to claim USB device: Resource busy
   0.035109    failed to detach kernel driver from USB device: No such file or directory
   0.035758    failed to claim USB device: Resource busy
   0.035864    failed to detach kernel driver from USB device: No such file or directory
   0.035948    failed to claim USB device: Resource busy
   0.036031    failed to detach kernel driver from USB device: No such file or directory
   0.036113    failed to claim USB device: Resource busy
   0.036199    failed to detach kernel driver from USB device: No such file or directory
   0.036284    Can't claim USB device [0764:0501]: No such file or directory
You might need this package too kmod-usb-hid and maybe more. I'm not sure as I've only played with openwrt a bit.
Link to comment
1 minute ago, dmacias said:
37 minutes ago, Jag said:
here's what I got from debug lines...
 
root@GL-MT300N-V2:~# /lib/nut/usbhid-ups -DDDDD -a durant
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
   0.000000    send_to_all: SETINFO driver.parameter.port "auto"
   0.001167    send_to_all: SETINFO driver.parameter.vendorid "0764"
   0.002656    send_to_all: SETINFO driver.parameter.productid "0501"
   0.003927    send_to_all: SETINFO driver.parameter.product "CP1500EPFCLCD"
   0.005188    send_to_all: SETINFO driver.parameter.serial "CRNGV2000035"
   0.005373    send_to_all: SETINFO driver.parameter.vendor "CPS"
   0.006187    send_to_all: SETINFO driver.parameter.bus "002"
   0.006371    send_to_all: SETINFO driver.flag.ignorelb "enabled"
   0.006513    send_to_all: SETINFO battery.runtime.low "4000"
   0.006606    send_to_all: SETFLAGS battery.runtime.low
   0.006765    debug level is '5'
   0.007771    upsdrv_initups...
   0.013575    Checking device (1D6B/0002) (001/001)
   0.015552    - VendorID: 1d6b
   0.016554    - ProductID: 0002
   0.017856    - Manufacturer: Linux 4.4.92 ehci_hcd
   0.018840    - Product: EHCI Host Controller
   0.020118    - Serial Number: 101c0000.ehci
   0.020867    - Bus: 001
   0.021482    - Device release number: 0404
   0.021595    Trying to match device
   0.021687    Device does not match - skipping
   0.021841    Checking device (0764/0501) (002/007)
   0.032514    - VendorID: 0764
   0.033564    - ProductID: 0501
   0.033688    - Manufacturer: CPS
   0.033754    - Product: CP1500EPFCLCD
   0.033819    - Serial Number: CRNGV2000035
   0.034533    - Bus: 002
   0.034616    - Device release number: 0001
   0.034681    Trying to match device
   0.034920    Device matches
   0.035020    failed to claim USB device: Resource busy
   0.035109    failed to detach kernel driver from USB device: No such file or directory
   0.035758    failed to claim USB device: Resource busy
   0.035864    failed to detach kernel driver from USB device: No such file or directory
   0.035948    failed to claim USB device: Resource busy
   0.036031    failed to detach kernel driver from USB device: No such file or directory
   0.036113    failed to claim USB device: Resource busy
   0.036199    failed to detach kernel driver from USB device: No such file or directory
   0.036284    Can't claim USB device [0764:0501]: No such file or directory

You might need this package too kmod-usb-hid and maybe more. I'm not sure as I've only played with openwrt a bit.

 

driver is already there:

root@GL-MT300N-V2:~# opkg list-installed | grep kmod-usb-hid
kmod-usb-hid - 4.4.92-1

 

I tried to shutdown the UPS through this command and I get:

 

root@GL-MT300N-V2:~# /lib/nut/usbhid-ups -a durant -D -k
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
   0.000000    debug level is '1'
   0.001698    upsdrv_initups...
   0.018973    Can't claim USB device [0764:0501]: No such file or directory

 

I checked /dev/usb/hiddev0 and nothing is there.

Then I unplug/plug my USB, /dev/usb/hiddev0 shows up, I try to shutdown again, and then it works.

Problem is, unplug/plug is not a solution. Would you know what is going wrong here? Read a lot and some say I need to do udev stuff. Problem though, openwrt has no udev.

 

 

 

Link to comment
 
driver is already there:
root@GL-MT300N-V2:~# opkg list-installed | grep kmod-usb-hid
kmod-usb-hid - 4.4.92-1
 
I tried to shutdown the UPS through this command and I get:
 
root@GL-MT300N-V2:~# /lib/nut/usbhid-ups -a durant -D -k
Network UPS Tools - Generic HID driver 0.41 (reboot-6807-g58f7b5b)
USB communication driver 0.33
   0.000000    debug level is '1'
   0.001698    upsdrv_initups...
   0.018973    Can't claim USB device [0764:0501]: No such file or directory
 
I checked /dev/usb/hiddev0 and nothing is there.
Then I unplug/plug my USB, /dev/usb/hiddev0 shows up, I try to shutdown again, and then it works.
Problem is, unplug/plug is not a solution. Would you know what is going wrong here? Read a lot and some say I need to do udev stuff. Problem though, openwrt has no udev.
 
 
 
I'm not sure. Maybe something else is claiming it first.
Link to comment

Thanks for this plugin, it works fine.

I have only issue with notifications.

My neighbors use welding device often, so I'm getting lots of notifications pair "The UPS is on battery" and "The UPS is back on line" that comes instantly together.

I would like to configure it to send notifications only if UPS is on battery at least 10 seconds.

How can I do it with this plugin?

 

PS: also it breaks terminal with mc, check out screenshot

Screenshot 2018-06-06 13.49.35.png

Edited by IGHOR
Link to comment



hi,

 

i had installed the Network UPS Tools (NUT) plugins, but my eaton is not loaded by the plugins.

 

i got an 1600 Ellipse pro Eaton, how to monitor it with unraid 6.5 ?

 

+++



Sorry I'm not sure. You'll have to look up your specific UPS model and nut compatibility
Link to comment
Thanks for this plugin, it works fine.
I have only issue with notifications.
My neighbors use welding device often, so I'm getting lots of notifications pair "The UPS is on battery" and "The UPS is back on line" that comes instantly together.
I would like to configure it to send notifications only if UPS is on battery at least 10 seconds.
How can I do it with this plugin?
 
PS: also it breaks terminal with mc, check out screenshot
1717857660_Screenshot2018-06-0613_49_35.thumb.png.90aed988414e1d851356f96db7e7109c.png
I'll look at the notification timing. As far as mc, this plugin had no effect on that. It only loads nut and net-snmp
Link to comment
  • 2 weeks later...

I have a APC BACK-UPS HS 500VA 230V which AFAIK doesn't support any remote management.  However it does have a (terrible) web interface.  In the days when I ran a windows server I built a tool to query the web interface, and scrape out the battery % and shut down the server if it got below a certain %.  

 

Obviously now that I use unraid, this won't work ... I'd much rather use this plugin.  My question is, is there something super simple and well documented that I could build a utility to emulate?  ie. scrape the UPS battery % and report it back to nut by emulating another device.

 

Or any other suggestions? (besides get a new UPS!)

 

Link to comment

Newbie to UPS's...

 

I picked up a 2nd hand APC Smart-UPS 750

 

Connected with a standard USB cable to my server, DELL Poweredge T310.

 

Autodetect found it, all seems ok, but Nominal Power, UPS Load and UPS Load % are blank.

 

If I switch display settings to manual, and add VA and watts I then get  Nominal Power to display 500, but not Load or load %

Do I need a special USB cable, or ????

Link to comment
  • 2 weeks later...

hi, i need some help here. Im very new to NUT. But have a bluewalker PW ups VI 2000 that i would love to get working. I have installed the NUT plugin. Setup the config to auto and use of blaze_usb driver.

But how do i get it to start. ITs still not running status. And how can i monitor that there is a connection to my UPS?

Link to comment

Just installed this and it works perfectly for my Trust Oxxtron 1500VA UPS and it works well. Always struggled with PC software for this UPS so glad I can get it working on my Unraid box. Thanks for the work.

 

 

Showing as: USB DEVICE: Bus 001 Device 003:    ID 0925:1234 Lakeview Research  
Screenshot is for anyone else struggling with this UPS.
 

image.png

Link to comment
  • 3 months later...
  • 4 weeks later...

Is there a way to successfully make changes to the config files and have it saved? I've tried making changes via the UI and saving then restarting, but the settings get wiped out. Also tried from the command line, but same thing - wiped out upon restart of the plugin. I'm assuming there is something in the plugin that writes the settings to the files on start, but I'm not sure. Any advice? Trying to modify the battery.charge.low setting to turn off ESXi boxes almost immediately (90%) after an event - long story as to why this method is being sought - but I can't seem to get this setting adjusted. 

 

Forgive my lack of understanding the options - seems you can use the manual option to use the files. I see the help outlines if I set to No, some options may be overridden in the config files. Seems the ups.conf file is one of such - which makes sense as some of the entries were options of setting the config for that ups device. Makes sense. Thanks for the great plugin!! 

Edited by 1activegeek
Found solution
  • Like 1
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.