Jump to content

[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

4 minutes ago, Rysz said:

 

It seems your UPS takes longer to get ready for a USB connection than it should.

I'm not sure what is causing this, as a workaround you can put this in your /boot/config/go file:

at now + 3 minutes <<< "/etc/rc.d/rc.nut restart | logger"

Which will restart the NUT services 3 minutes after system boot and it should be ready by then.

 

The UPS is on the entire time, never turned off, so I worry this won't work all the time. Is there a way to tell NUT to wait longer for the UPS to reply? The fact that it's taking a long time to get ready while it's constantly on is weird. But I must admit, most of the time starting it manually later does work so maybe it will fix it for good.

(I have not had a single power outage yet - these are simply reboots on the server I have done for various reasons as I change things around and test different things) 

Link to comment
5 minutes ago, PartyingChair said:

The UPS is on the entire time, never turned off, so I worry this won't work all the time. Is there a way to tell NUT to wait longer for the UPS to reply? The fact that it's taking a long time to get ready while it's constantly on is weird. But I must admit, most of the time starting it manually later does work so maybe it will fix it for good.

(I have not had a single power outage yet - these are simply reboots on the server I have done for various reasons as I change things around and test different things) 

 

Not sure to be honest, this is definitely not normal behaviour for a UPS.

It should be available because system boot takes long enough, did you try another USB port or cable?

Link to comment
5 minutes ago, Rysz said:

 

Not sure to be honest, this is definitely not normal behaviour for a UPS.

It should be available because system boot takes long enough, did you try another USB port or cable?

I've plugged it into a different port, but have not tested yet. I do not have another cable to try at the moment though. 

Link to comment
33 minutes ago, Rysz said:

 

Not sure to be honest, this is definitely not normal behaviour for a UPS.

It should be available because system boot takes long enough, did you try another USB port or cable?

Update: No dice. But even weirder, "Start Network UPS Tools Service" is set to Yes, but the status is "stopped"

I have to change it to no, then back to yes for it to start.

 

Update: seems to be working now. Thank you. I'm using the script. At the end of the day, even if it's a workaround, if it's working, I'm happy

 

image.thumb.png.657854018fdb13ece9633b4bb98b7745.png

Edited by PartyingChair
Working now
  • Like 1
Link to comment

Hi,  I am looking for some help if possible to setup my UPS, a Greencell UPS04 Micropower 1500 on my unraid server.  

 

When I install the NUT plugin 2.8.2 and do an autoconfig it returns the following:

 

/etc/nut/ups.conf

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"

 

After searching the internet I tried running nut-scanner -C but it gave the same results

 

root@HomeSrv:~# nut-scanner -C
Cannot load XML library (libneon.so) : file not found. XML search disabled.
Cannot load IPMI library (libfreeipmi.so) : file not found. IPMI search disabled.
Scanning USB bus.
No start IP, skipping SNMP
No start IP, skipping NUT bus (old connect method)
Scanning NUT simulation devices.
Scanning NUT bus (avahi method).
[nutdev-usb1]
        driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
        port = "auto"
        vendorid = "0001"
        productid = "0000"
        product = "MEC0003"
        vendor = "MEC"
        # bus = "003"
        # device = "002"
        # busport = "001"
root@HomeSrv:~# nut -h

 

But when I start the NUT service I get the following in Syslog:  Driver failed to start (exit status=1)

 

Apr 25 19:33:11 HomeSrv ool www[5732]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 19:33:12 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 19:33:13 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 19:33:13 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 19:33:13 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 19:33:33 HomeSrv rc.nut: Device not supported!
Apr 25 19:33:33 HomeSrv rc.nut: Device not supported!
Apr 25 19:33:33 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.2)
Apr 25 19:33:33 HomeSrv rc.nut: USB communication driver (libusb 1.0) 0.47
Apr 25 19:33:33 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 19:33:33 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2

 

I have tried the 2 proposed alternate drivers but unfortunately neither of them are working either...

 

I have tried using older versions of NUT as I found a post on the internet where someone said they got the "MEC0003"  to work with NUT using version 2.8.0 with driver blazer_usb  but unfortunately that did not work for me.

 

I am still new to Unraid but very willing to learn if someone can point me in the right direction.   If additional log files could be useful please let me know and I will be happy to provide them if told how to get them. 

 

Full syslogs and diagnotic files attached

 

Thank you for your help

homesrv-syslog-20240425-1745.zip homesrv-diagnostics-20240425-1915.zip

Link to comment
28 minutes ago, schalmers said:

Hi,  I am looking for some help if possible to setup my UPS, a Greencell UPS04 Micropower 1500 on my unraid server.  

 

When I install the NUT plugin 2.8.2 and do an autoconfig it returns the following:

 

/etc/nut/ups.conf

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"

 

After searching the internet I tried running nut-scanner -C but it gave the same results

 

root@HomeSrv:~# nut-scanner -C
Cannot load XML library (libneon.so) : file not found. XML search disabled.
Cannot load IPMI library (libfreeipmi.so) : file not found. IPMI search disabled.
Scanning USB bus.
No start IP, skipping SNMP
No start IP, skipping NUT bus (old connect method)
Scanning NUT simulation devices.
Scanning NUT bus (avahi method).
[nutdev-usb1]
        driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
        port = "auto"
        vendorid = "0001"
        productid = "0000"
        product = "MEC0003"
        vendor = "MEC"
        # bus = "003"
        # device = "002"
        # busport = "001"
root@HomeSrv:~# nut -h

 

But when I start the NUT service I get the following in Syslog:  Driver failed to start (exit status=1)

 

Apr 25 19:33:11 HomeSrv ool www[5732]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 19:33:12 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 19:33:13 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 19:33:13 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 19:33:13 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 19:33:33 HomeSrv rc.nut: Device not supported!
Apr 25 19:33:33 HomeSrv rc.nut: Device not supported!
Apr 25 19:33:33 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.2)
Apr 25 19:33:33 HomeSrv rc.nut: USB communication driver (libusb 1.0) 0.47
Apr 25 19:33:33 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 19:33:33 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2

 

I have tried the 2 proposed alternate drivers but unfortunately neither of them are working either...

 

I have tried using older versions of NUT as I found a post on the internet where someone said they got the "MEC0003"  to work with NUT using version 2.8.0 with driver blazer_usb  but unfortunately that did not work for me.

 

I am still new to Unraid but very willing to learn if someone can point me in the right direction.   If additional log files could be useful please let me know and I will be happy to provide them if told how to get them. 

 

Full syslogs and diagnotic files attached

 

Thank you for your help

homesrv-syslog-20240425-1745.zip 27.67 kB · 0 downloads homesrv-diagnostics-20240425-1915.zip 158.57 kB · 0 downloads

 

Can you try adding this line to your UPS.CONF using the NUT configuration editor under NUT Settings? Then restart NUT.

 

subdriver = "hunnox"

 

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

 

Can you try adding this line to your UPS.CONF using the NUT configuration editor under NUT Settings? Then restart NUT.

 

subdriver = "hunnox"

 

Thank you for replying I modified the UPS.CONF to be:

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"
    subdriver = "hunnox"

 

And restarted the NUT Service but unfortunately I am still getting the same type of error in Syslog:

 

Apr 25 20:21:14 HomeSrv ool www[5285]: /usr/local/emhttp/plugins/nut-dw/scripts/stop
Apr 25 20:21:15 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:21:16 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:21:16 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:21:16 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:21:17 HomeSrv rc.nut: Stopping the NUT services... 
Apr 25 20:21:19 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-ups.pid: No such file or directory
Apr 25 20:21:19 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-auto.pid either: No such file or directory
Apr 25 20:21:19 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2
Apr 25 20:21:29 HomeSrv ool www[5286]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 20:21:30 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:21:31 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:21:31 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:21:31 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:22:03 HomeSrv rc.nut: Device not supported!
Apr 25 20:22:03 HomeSrv rc.nut: Device not supported!
Apr 25 20:22:03 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.2)
Apr 25 20:22:03 HomeSrv rc.nut: USB communication driver (libusb 1.0) 0.47
Apr 25 20:22:03 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 20:22:03 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2

Link to comment
Just now, schalmers said:

Thank you for replying I modified the UPS.CONF to be:

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"
    subdriver = "hunnox"

 

And restarted the NUT Service but unfortunately I am still getting the same type of error in Syslog:

 

Apr 25 20:21:14 HomeSrv ool www[5285]: /usr/local/emhttp/plugins/nut-dw/scripts/stop
Apr 25 20:21:15 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:21:16 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:21:16 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:21:16 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:21:17 HomeSrv rc.nut: Stopping the NUT services... 
Apr 25 20:21:19 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-ups.pid: No such file or directory
Apr 25 20:21:19 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-auto.pid either: No such file or directory
Apr 25 20:21:19 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2
Apr 25 20:21:29 HomeSrv ool www[5286]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 20:21:30 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:21:31 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:21:31 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:21:31 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:22:03 HomeSrv rc.nut: Device not supported!
Apr 25 20:22:03 HomeSrv rc.nut: Device not supported!
Apr 25 20:22:03 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.2)
Apr 25 20:22:03 HomeSrv rc.nut: USB communication driver (libusb 1.0) 0.47
Apr 25 20:22:03 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 20:22:03 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.8.2

 

Ok let's try something else, remove the subdriver line again. Then set NUT Backend Switch to "legacy (2.7.4 stable)". Uninstall and reinstall NUT (or reboot server) and make sure the backend actually changed to 2.7.4. Then start NUT again with the same settings (without subdriver). Also try another USB port it that doesn't work.

Link to comment
21 minutes ago, Rysz said:

 

Ok let's try something else, remove the subdriver line again. Then set NUT Backend Switch to "legacy (2.7.4 stable)". Uninstall and reinstall NUT (or reboot server) and make sure the backend actually changed to 2.7.4. Then start NUT again with the same settings (without subdriver). Also try another USB port it that doesn't work.

 

Ok I reset the UPS.CONF back to:

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"

 

Then I changed the version back to "legacy (2.7.4 stable)" and closed down all VMs, Dockers, Array and restarted the server.

 

Verified in NUT Settings were the proper version:  

image.png.5f8f7085844105370c02bafb0fa8c7be.png

 

and restarted the NUT service the syslog still shows error:

 

Apr 25 20:45:10 HomeSrv ool www[10410]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 20:45:11 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:45:13 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Adding UDEV lines to rc.6 for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Adding UPS shutdown lines to rc.6 for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:45:13 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:45:28 HomeSrv rc.nut: Device not supported!
Apr 25 20:45:28 HomeSrv rc.nut: Device not supported!
Apr 25 20:45:28 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.39 (2.7.4.1)
Apr 25 20:45:28 HomeSrv rc.nut: USB communication driver 0.43
Apr 25 20:45:28 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 20:45:28 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

 

The FULL syslog from restart to starting NUT service is attached if it helps you see anything interesting.  Again really appreciate the help.

 

decided to try something ...

 

Checked Autoconfig in this 2.7.4 version and it returned a slightly different UPS.CONF (bus = "003" not REM'd out) 

 

    [ups]
    driver = "nutdrv_qx"
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    bus = "003"

 

Started the Service again but same error from what I can tell:

 

Apr 25 20:57:12 HomeSrv ool www[3490]: /usr/local/emhttp/plugins/nut-dw/scripts/stop
Apr 25 20:57:13 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:57:15 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:57:15 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:57:15 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:57:16 HomeSrv rc.nut: Stopping the NUT services... 
Apr 25 20:57:18 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-ups.pid: No such file or directory
Apr 25 20:57:18 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-auto.pid either: No such file or directory
Apr 25 20:57:18 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1
Apr 25 20:57:28 HomeSrv emhttpd: cmd: /usr/local/emhttp/plugins/nut-dw/scripts/nutscan
Apr 25 21:00:33 HomeSrv ool www[14971]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 21:00:34 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 21:00:36 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 21:00:36 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 21:00:36 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 21:00:51 HomeSrv rc.nut: Device not supported!
Apr 25 21:00:51 HomeSrv rc.nut: Device not supported!
Apr 25 21:00:51 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.39 (2.7.4.1)
Apr 25 21:00:51 HomeSrv rc.nut: USB communication driver 0.43
Apr 25 21:00:51 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 21:00:51 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

homesrv-syslog-20240425-1848.zip

Link to comment
3 minutes ago, schalmers said:

 

Ok I reset the UPS.CONF back to:

 

[ups]
    driver = "nutdrv_qx"    # alternately: blazer_usb nutdrv_atcl_usb
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    # bus = "003"
    # device = "002"
    # busport = "001"

 

Then I changed the version back to "legacy (2.7.4 stable)" and closed down all VMs, Dockers, Array and restarted the server.

 

Verified in NUT Settings were the proper version:  

image.png.5f8f7085844105370c02bafb0fa8c7be.png

 

and restarted the NUT service the syslog still shows error:

 

Apr 25 20:45:10 HomeSrv ool www[10410]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 20:45:11 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:45:13 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Adding UDEV lines to rc.6 for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Adding UPS shutdown lines to rc.6 for NUT...
Apr 25 20:45:13 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:45:13 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:45:28 HomeSrv rc.nut: Device not supported!
Apr 25 20:45:28 HomeSrv rc.nut: Device not supported!
Apr 25 20:45:28 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.39 (2.7.4.1)
Apr 25 20:45:28 HomeSrv rc.nut: USB communication driver 0.43
Apr 25 20:45:28 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 20:45:28 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

 

The FULL syslog from restart to starting NUT service is attached if it helps you see anything interesting.  Again really appreciate the help.

 

decided to try something ...

 

Checked Autoconfig in this 2.7.4 version and it returned a slightly different UPS.CONF (bus = "003" not REM'd out) 

 

    [ups]
    driver = "nutdrv_qx"
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    bus = "003"

 

Started the Service again but same error from what I can tell:

 

Apr 25 20:57:12 HomeSrv ool www[3490]: /usr/local/emhttp/plugins/nut-dw/scripts/stop
Apr 25 20:57:13 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 20:57:15 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 20:57:15 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 20:57:15 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 20:57:16 HomeSrv rc.nut: Stopping the NUT services... 
Apr 25 20:57:18 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-ups.pid: No such file or directory
Apr 25 20:57:18 HomeSrv rc.nut: Can't open /var/run/nut/nutdrv_qx-auto.pid either: No such file or directory
Apr 25 20:57:18 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1
Apr 25 20:57:28 HomeSrv emhttpd: cmd: /usr/local/emhttp/plugins/nut-dw/scripts/nutscan
Apr 25 21:00:33 HomeSrv ool www[14971]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 21:00:34 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 21:00:36 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 21:00:36 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 21:00:36 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 21:00:51 HomeSrv rc.nut: Device not supported!
Apr 25 21:00:51 HomeSrv rc.nut: Device not supported!
Apr 25 21:00:51 HomeSrv rc.nut: Network UPS Tools - Generic Q* USB/Serial driver 0.39 (2.7.4.1)
Apr 25 21:00:51 HomeSrv rc.nut: USB communication driver 0.43
Apr 25 21:00:51 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 21:00:51 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

homesrv-syslog-20240425-1848.zip 26.38 kB · 0 downloads

 

Thanks, any luck with the blazer_usb driver on the 2.7.4. backend?

Link to comment
6 minutes ago, Rysz said:

 

Thanks, any luck with the blazer_usb driver on the 2.7.4. backend?

Changed UPS.CONF to:

 

[ups]
    driver = "blazer_usb"
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    bus = "003"

 

Syslog shows the different driver but it still failed....

 

Apr 25 21:16:26 HomeSrv ool www[24750]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 21:16:27 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 21:16:29 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 21:16:29 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 21:16:29 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 21:16:35 HomeSrv rc.nut: No supported UPS detected
Apr 25 21:16:35 HomeSrv rc.nut: Network UPS Tools - Megatec/Q1 protocol USB driver 0.20 (2.7.4.1)
Apr 25 21:16:35 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 21:16:35 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

Link to comment
5 minutes ago, schalmers said:

Changed UPS.CONF to:

 

[ups]
    driver = "blazer_usb"
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    product = "MEC0003"
    vendor = "MEC"
    bus = "003"

 

Syslog shows the different driver but it still failed....

 

Apr 25 21:16:26 HomeSrv ool www[24750]: /usr/local/emhttp/plugins/nut-dw/scripts/start
Apr 25 21:16:27 HomeSrv rc.nut: Writing NUT configuration...
Apr 25 21:16:29 HomeSrv rc.nut: Updating permissions for NUT...
Apr 25 21:16:29 HomeSrv rc.nut: Checking if the NUT Runtime Statistics Module should be enabled...
Apr 25 21:16:29 HomeSrv rc.nut: Disabling the NUT Runtime Statistics Module...
Apr 25 21:16:35 HomeSrv rc.nut: No supported UPS detected
Apr 25 21:16:35 HomeSrv rc.nut: Network UPS Tools - Megatec/Q1 protocol USB driver 0.20 (2.7.4.1)
Apr 25 21:16:35 HomeSrv rc.nut: Driver failed to start (exit status=1)
Apr 25 21:16:35 HomeSrv rc.nut: Network UPS Tools - UPS driver controller 2.7.4.1

 

I'm sorry, the only thing I can think of is going through these settings again with another USB port or cable (keep the bus, device, busport commented out though to not fix NUT on a specific USB port). Otherwise unfortunately we seem to be out of luck.

Link to comment
22 minutes ago, Rysz said:

 

I'm sorry, the only thing I can think of is going through these settings again with another USB port or cable (keep the bus, device, busport commented out though to not fix NUT on a specific USB port). Otherwise unfortunately we seem to be out of luck.

I appreciate all of the help,  I have been trying different USB ports with both of the 2 drivers "nutdrv_qx" and "blazer_usb" with all of your recommendations to keep commented out  but I have not had any luck.

 

I guess I will have no other choice but to look for a different UPS for this server.    Thanks again

Link to comment
Just now, schalmers said:

I appreciate all of the help,  I have been trying different USB ports with both of the 2 drivers "nutdrv_qx" and "blazer_usb" with all of your recommendations to keep commented out  but I have not had any luck.

 

I guess I will have no other choice but to look for a different UPS for this server.    Thanks again

 

Another thing to try apart from NUT would be the default "UPS Settings" (which use APCUPSD) if you haven't already tried that.

Link to comment
1 hour ago, Rysz said:

 

Another thing to try apart from NUT would be the default "UPS Settings" (which use APCUPSD) if you haven't already tried that.

 

I unistalled NUT and tried the default UPS app and it didn't work on default settings, just shows lost communication

image.png.13652a4cb24c392765cd408bc2c88625.png

 

Apr 25 23:06:13 HomeSrv root: plugin: running: anonymous
Apr 25 23:06:23 HomeSrv root: plugin: nut-dw.plg removed
Apr 25 23:07:34 HomeSrv apcupsd[19282]: apcupsd 3.14.14 (31 May 2016) slackware startup succeeded
Apr 25 23:07:34 HomeSrv apcupsd[19282]: NIS server startup succeeded
Apr 25 23:08:44 HomeSrv apcupsd[19282]: Communications with UPS lost.
Apr 25 23:08:44 HomeSrv sSMTP[25149]: Creating SSL connection to host
Apr 25 23:08:44 HomeSrv sSMTP[25149]: SSL connection using TLS_AES_256_GCM_SHA384
Apr 25 23:08:47 HomeSrv sSMTP[25149]: Sent mail for [email protected] (221 2.0.0 closing connection t18-20020a05600c199200b00417ee784fcasm28619198wmq.45 - gsmtp) uid=0 username=root outbytes=728

 

Thanks again for the help trying

Link to comment

Ive been getting this error daily for as long as i can remember 

usbhid-ups[14966]: nut_libusb_get_report: Input/Output Error
usbhid-ups[14966]: #012Reconnecting. If you saw "nut_libusb_get_interrupt: Input/Output Error" or similar message in the log above, try setting "pollonly" flag in "ups.conf" options section for this driver!
usbhid-ups[14966]: nut_libusb_get_string: Pipe error

But I don’t know how to set the pollonly flag. Any idea how?

 

also i get lots of errors like this one that fills up and i dont know why.

nginx: 2024/04/30 12:35:07 [alert] 12245#12245: worker process 21789 exited on signal 6

 

Link to comment
2 hours ago, Mr.meowgi said:

Ive been getting this error daily for as long as i can remember 

usbhid-ups[14966]: nut_libusb_get_report: Input/Output Error
usbhid-ups[14966]: #012Reconnecting. If you saw "nut_libusb_get_interrupt: Input/Output Error" or similar message in the log above, try setting "pollonly" flag in "ups.conf" options section for this driver!
usbhid-ups[14966]: nut_libusb_get_string: Pipe error

But I don’t know how to set the pollonly flag. Any idea how?

 

also i get lots of errors like this one that fills up and i dont know why.

nginx: 2024/04/30 12:35:07 [alert] 12245#12245: worker process 21789 exited on signal 6

 

 

pollonly

Just put this in UPS.CONF on line 8 using GUI configuration editor and restart NUT afterwards. But if all works as it should, I'd just ignore these messages in syslog and not mess around with extra settings.

 

Edited by Rysz
Link to comment

I've seen a fair few people report issues with PowerWalker/BlueWalker UPS' stopping working and needing a server reboot (or just a replug) both here and on reddit.
I've been struggling with the same, usually it'll wok great for 3-4 days (sometimes a full week!) without needing to be replugged.

 

I've found a solution to this, adding: pollonly = "enabled" to your ups.conf. My UPS has not disconnected for over a full month now since doing this.
Just posting this here as this hread shows up when googling issues with NUT and PowerWalker/BlueWalker.

Edited by VodkaPump
  • Like 1
Link to comment
On 4/18/2024 at 6:01 PM, Rysz said:

 

I've compiled a package for you... 🙂 

From current Git master with all debug symbols included and also --with-debuginfo.

 

You can install it on your Unraid system as follows:

  1. Stop NUT in NUT Settings
  2. cd /var/log/packages
  3. removepkg nut-2.8.2* (make sure to uninstall only nut, not nut-plugin)
  4. Put the debug package somewhere on your system (e.g /root/)
  5. cd /root
  6. installpkg nut-2.8.2-x86_64-1debug.txz
  7. Start NUT in NUT Settings or directly start driver for debugging (as above)

nut-2.8.2-x86_64-1debug.txzUnavailable

 

You can find the build scripts in the packages themselves under /usr/src/nut-2.8.2/nut.SlackBuild

Please let me know what debugging information is shown for the segmentation fault, I'm curious too.

 

Probably also worthwhile to raise the debug level on the driver with -DDDDDD

 

 

Thank you for generating the compiled version with DEBUG active, however unfortunately I still haven't been able to find out for sure the cause of the segmentation fault.

However, I discovered some useful settings for debugging and extra configurations.
 

In ups.conf , there are some additional settings that live outside the driver section, that is, they must be placed BEFORE the [driver-configuration-name] and are not valid to define inside the driver section.
(https://github.com/networkupstools/nut/blob/ff045c089b362085ec0abd651da5e9216c49e281/conf/ups.conf.sample#L45-L80)

In my case, I changed the "Enable Manual Configuration:" option in the Nut Unraid UI to "for UPS Driver" and my ups.conf looked like this:
 

maxretry = 3
user = nut
group = nut
debug_min = 6
synchronous = yes

[nhs]
driver = gamatronic
port = /dev/ttyACM0
desc = "nhs_1500va"


After that, I started the NUT driver directly (gamatronic) with some debug options and got this:

> Note: In case anyone reads this and doesn't understand, each NUT driver is an independent executable, so I can use it directly instead of using `upsdrvctl`. The problem with using upsdrvctl for debugging is that not every driver has the same arguments and upsdrvctl can hide some of the error messages, which makes debugging difficult;

 

root@f:~# /usr/libexec/nut/gamatronic -DDDDDDD -a nhs -u root
Network UPS Tools - Gamatronic UPS driver 0.03 (2.7.4.1)
   0.000000     [D5] send_to_all: SETINFO driver.parameter.port "/dev/ttyACM0"
   0.000019     [D1] debug level is '7'
   0.000296     [D5] send_to_all: SETINFO device.type "ups"
Connected to UPS on /dev/ttyACM0 baudrate: 2400
   2.209413     [D5] send_to_all: SETINFO driver.version "2.7.4.1"
   2.209425     [D5] send_to_all: SETINFO driver.version.internal "0.03"
   2.209430     [D5] send_to_all: SETINFO driver.name "gamatronic"
   2.209435     [D1] PC-->UPS: "^P003AP1"
   2.209506     [D1]  send returned: 8
   3.631085     [D1] UPS<--PC: "3,6,7,8,9,10,14,16,18,19,20,21,224,28,4,28,29,33,36,37,38,39,43"
   3.631097     [D1] PC-->UPS: "^P003AP2"
   3.631171     [D1]  send returned: 8
   5.130488     [D1] UPS<--PC: "47,51,54,55,56,57,58,59,61,62,63,64,65,68,69,776,77,80,81,82,84,87,88,7,88,89"
   5.130515     [D1]  Query 0 is ST5
   5.130518     [D1]  Querying varnum 3
   5.130522     [D1]  Querying varnum 6
   5.130526     [D1]  Querying varnum 7
   5.130530     [D1]  Querying varnum 8
   5.130535     [D1]  Querying varnum 9
   5.130543     [D1]  Querying varnum 10
   5.130548     [D1]  Querying varnum 14
   5.130552     [D1]  Query 1 is NOM
   5.130554     [D1]  Querying varnum 16
   5.130557     [D1]  Query 2 is ST1
   5.130559     [D1]  Querying varnum 18
   5.130564     [D1]  Querying varnum 19
   5.130568     [D1]  Querying varnum 20
   5.130570     [D1]  Querying varnum 21
Segmentation fault


Apparently, the driver is able to initiate communication with the UPS, but fails at some point.

That said, 4 hours ago some fixes for the gamatronic driver were merged into NUT ( gamatronic driver revised for safer memory operations. [#2427].
I'm hoping this is a possible fix for the bug I'm experiencing.


@Rysz  If it's not too much to ask, could you generate a new build from the current master branch of NUT?

Link to comment
4 minutes ago, SimonF said:

Hi @Rysz

 

Has a changed happend in the backend to report trim? Why is this amber and not green?

 

On Line - Trimming Input

 

There's three priorities in the GUI:

  • Green - nothing out of the ordinary is happening (OL, CHRG, CAL)
  • Orange - something out of the ordinary is happening (OB, BYPASS, DISCHRG, TRIM, BOOST)
  • Red - something critical is happening (LB, HB, RB, OVER, OFF, FSD)

So orange is not necessarily bad, it's just that the UPS is doing something for the user to notice in the GUI.

 

Link to comment
20 minutes ago, luzfcb said:

 

Thank you for generating the compiled version with DEBUG active, however unfortunately I still haven't been able to find out for sure the cause of the segmentation fault.

However, I discovered some useful settings for debugging and extra configurations.
 

In ups.conf , there are some additional settings that live outside the driver section, that is, they must be placed BEFORE the [driver-configuration-name] and are not valid to define inside the driver section.
(https://github.com/networkupstools/nut/blob/ff045c089b362085ec0abd651da5e9216c49e281/conf/ups.conf.sample#L45-L80)

In my case, I changed the "Enable Manual Configuration:" option in the Nut Unraid UI to "for UPS Driver" and my ups.conf looked like this:
 

maxretry = 3
user = nut
group = nut
debug_min = 6
synchronous = yes

[nhs]
driver = gamatronic
port = /dev/ttyACM0
desc = "nhs_1500va"


After that, I started the NUT driver directly (gamatronic) with some debug options and got this:

> Note: In case anyone reads this and doesn't understand, each NUT driver is an independent executable, so I can use it directly instead of using `upsdrvctl`. The problem with using upsdrvctl for debugging is that not every driver has the same arguments and upsdrvctl can hide some of the error messages, which makes debugging difficult;

 

root@f:~# /usr/libexec/nut/gamatronic -DDDDDDD -a nhs -u root
Network UPS Tools - Gamatronic UPS driver 0.03 (2.7.4.1)
   0.000000     [D5] send_to_all: SETINFO driver.parameter.port "/dev/ttyACM0"
   0.000019     [D1] debug level is '7'
   0.000296     [D5] send_to_all: SETINFO device.type "ups"
Connected to UPS on /dev/ttyACM0 baudrate: 2400
   2.209413     [D5] send_to_all: SETINFO driver.version "2.7.4.1"
   2.209425     [D5] send_to_all: SETINFO driver.version.internal "0.03"
   2.209430     [D5] send_to_all: SETINFO driver.name "gamatronic"
   2.209435     [D1] PC-->UPS: "^P003AP1"
   2.209506     [D1]  send returned: 8
   3.631085     [D1] UPS<--PC: "3,6,7,8,9,10,14,16,18,19,20,21,224,28,4,28,29,33,36,37,38,39,43"
   3.631097     [D1] PC-->UPS: "^P003AP2"
   3.631171     [D1]  send returned: 8
   5.130488     [D1] UPS<--PC: "47,51,54,55,56,57,58,59,61,62,63,64,65,68,69,776,77,80,81,82,84,87,88,7,88,89"
   5.130515     [D1]  Query 0 is ST5
   5.130518     [D1]  Querying varnum 3
   5.130522     [D1]  Querying varnum 6
   5.130526     [D1]  Querying varnum 7
   5.130530     [D1]  Querying varnum 8
   5.130535     [D1]  Querying varnum 9
   5.130543     [D1]  Querying varnum 10
   5.130548     [D1]  Querying varnum 14
   5.130552     [D1]  Query 1 is NOM
   5.130554     [D1]  Querying varnum 16
   5.130557     [D1]  Query 2 is ST1
   5.130559     [D1]  Querying varnum 18
   5.130564     [D1]  Querying varnum 19
   5.130568     [D1]  Querying varnum 20
   5.130570     [D1]  Querying varnum 21
Segmentation fault


Apparently, the driver is able to initiate communication with the UPS, but fails at some point.

That said, 4 hours ago some fixes for the gamatronic driver were merged into NUT ( gamatronic driver revised for safer memory operations. [#2427].
I'm hoping this is a possible fix for the bug I'm experiencing.


@Rysz  If it's not too much to ask, could you generate a new build from the current master branch of NUT?

 

Thanks for the detailed write-up, I'll build a new debug package as soon as possible (most likely tonight). 🙂 

  • Like 1
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...