Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] NUT v2 - Network UPS Tools

Featured Replies

How do I setup my UnRaid as the NUT master. I change the UPS mode to net server but I can't change the IP from 127.0.0.1 to actually the IP of this UnRaid?  I need this to be the master so I can have a client setup to this master.

 

image.thumb.png.eae2764bd03143916c5064697003bbbd.png

  • Replies 2.1k
  • Views 457.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I am stopping updates for my version of the plugin. Update to the latest version 2023.09.17 and then you can remove my version and install Rysz's from CA and it will retain your configs.   T

  • Released 2023.07.26, @ich777 is creating a new package for me to use, and I want to look to move to 2.8 as the default version but will need to check upgrade path works ok.

  • That APC BX series is known to suffer from this (what we believe to be) firmware issue and we've put patches in place to suppress this unwanted behaviour on the UPS side. Here's how you can set it up:

Posted Images

30 minutes ago, johnwhicker said:

How do I setup my UnRaid as the NUT master. I change the UPS mode to net server but I can't change the IP from 127.0.0.1 to actually the IP of this UnRaid?  I need this to be the master so I can have a client setup to this master.

 

image.thumb.png.eae2764bd03143916c5064697003bbbd.png

I use the manual config. but the IP address is not used for the master as far as I can remember. My two slaves have the master IP.

 

image.thumb.png.ce7959d986c326ed7a309d285e10a8b3.png

  • 1 month later...

Hi All this version has issues with 6.12 I have created a fork and added to CA if you click on info then actions you will have an option to update.

 

I may create a new support page for the new vers.

On 9/5/2022 at 12:15 AM, cassiusdrow said:

I have 2.8.0 running on unraid 6.10.3.  I am using an APC SMT1000RM2U with a AP9630 network management card.  It uses the snmp-ups driver and it was failing with this error:

 

/usr/libexec/nut/snmp-ups: error while loading shared libraries: libnetsnmp.so.35: cannot open shared object file: No such file or directory
Driver failed to start (exit status=127)

 

This post suggested installing net-snmp v5.8, but the file no longer exists.  Instead I decided to try to get nut 2.8.0 to run.  I downloaded these package files to the flash drive:

 

https://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware64-15.0/nut-2.8.0-x86_64-1gds.txz

https://slackware.uk/slackware/slackware64-15.0/patches/packages/net-snmp-5.9.3-x86_64-1_slack15.0.txz

 

Then added commands to the go script to install the packages and modify the NUT plugin to work with them:

...

 

I had problems with the plugin as well and ended up doing the above. I might start over and see if I can get away without this, but right now I'm also stuck on getting

Quote

UPS [email protected] is unavailable

 

messages repeatedly. I can use snmpwalk to talk to the UPS, which is a CyberPower PR2000RTXL2U. I'm trying to run in standalone mode. I'm not having any luck searching online for what's happening with this, even though it seems like it should be a straightforward configuration issue to sort out.

 

Does anyone know what's happening here?

2 minutes ago, Roland Roberts said:

 

I had problems with the plugin as well and ended up doing the above. I might start over and see if I can get away without this, but right now I'm also stuck on getting

UPS [email protected] is unavailable

messages repeatedly. I can use snmpwalk to talk to the UPS, which is a CyberPower PR2000RTXL2U. I'm trying to run in standalone mode. I'm not having any luck searching online for what's happening with this, even though it seems like it should be a straightforward configuration issue to sort out.

 

Does anyone know what's happening here?

 

Actually, I wonder if the issue is this

1479 root> upsc [email protected] ups.mfr
CYBERPOWER
1479 root> upsc [email protected] ups.status

1479 root>

Note that ups.status isn't returning the 0L message I was expecting.

  • 2 weeks later...

Does anyone know if this plugin can be used to monitor 2 different UPSs?  I'd like to have this monitor both UPS's and then provide that data to Home Assistant.

4 hours ago, wraith1385 said:

Does anyone know if this plugin can be used to monitor 2 different UPSs?  I'd like to have this monitor both UPS's and then provide that data to Home Assistant.

No it only supports one UPS. How are you UPS devices connected both into the unraid host?

1 hour ago, SimonF said:

No it only supports one UPS. How are you UPS devices connected both into the unraid host?

They're both connected via USB

For anyone interested I did a quick-and-dirty tweak to match the display formatting to 6.12's default:

916447433_Screenshot2023-03-19at9_43_55AM.png.a0efc1c5c23e8ba64309f3e2eed93a54.png

 

Requires changing two files, presented below in diff format.

 

nut_status.php:

Spoiler
44,45c48,49
<       $runtime   = gmdate("H:i:s", $val);
<       $status[2] = strtok($val/60,' ')<=5 && !in_array('ups.status: OL', $rows) ? "<td $red>$runtime</td>" : "<td $green>$runtime</td>";
---
>       $runtime   = strtok($val/60,' ');
>       $status[2] = strtok($val/60,' ')<=5 && !in_array('ups.status: OL', $rows) ? "<td $red>".intval($runtime)."m</td>" : "<td $green>".intval($runtime)."m</td>";
49a54,56
>     case 'input.voltage':
>       $voltage   = intval(strtok($val,' '));
>       break;
53a61,63
>     case 'ups.model':
>       $model     = $val;
>       break;
64c74
<   $status[3] = $power==0 ? "<td $red>{$power}w</td>" : "<td $green>{$power}w</td>";
---
>   $status[3] = $voltage<114 ? "<td $orange>${voltage}V</td>" : "<td $green>${voltage}V</td>";
66a77
>   $status[6] = "${model} ${power}W";

 

 

nutFooter.page:

Spoiler
32c32
< <tbody id="tblUPSNUTDash" title="_(UPS(NUT))_">
---
> <tbody id="tblUPSNUTDash" title="_(POWER)_">
34c34
< <div class='section'>_(UPS(NUT))_<br><span><i class='ups fa fa-line-chart'></i><span id='load'>Load: <span class='nut_loadpct' id='nut_loadpct'></span></span>
---
> <div class='section'>_(POWER)_<br><span><i class='ups fa fa-line-chart'></i><span id='model'>UPS Model: <span class='nut_model' id='nut_model'></span></span>
158,162c158,163
<         "<tr class='updated'><td><span class='w36 ups'>UPS status:</span><span class='nut_status'>"+data[0]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Battery charge:</span><span class='nut_bcharge'>"+data[1]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Runtime left:</span><span class='nut_timeleft'>"+data[2]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Nominal power:</span>"+data[3]+"</td></tr>");
<     $("#tblUPSNUTDash").find('.nut_loadpct').html(data[5]+' - '+data[4]);    
---
>         "<tr class='updated'><td><span class='w36 ups'>UPS Status:</span><span class='nut_status'>"+data[0]+"</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>UPS Load:</span><span class='nut_loadpct'>"+data[4]+" ("+data[5]+")</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>Battery Charge:</span><span class='nut_bcharge'>"+data[1]+"</span></td></tr>" +
> "<tr class='updated'><td><span class='w36 ups'>Runtime Left:</span><span class='nut_timeleft'>"+data[2]+"</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>Input Voltage:</span><span class='nut_voltage'>"+data[3]+"</span></td></tr>");
>       $("#tblUPSNUTDash").find('.nut_model').html(data[6]);
184c185
<       $("#db-box1").find('.nut_nompower').html(data[3]);
---
>       $("#db-box1").find('.nut_voltage').html(data[3]);

 

 

1 hour ago, CS01-HS said:

For anyone interested I did a quick-and-dirty tweak to match the display formatting to 6.12's default:

916447433_Screenshot2023-03-19at9_43_55AM.png.a0efc1c5c23e8ba64309f3e2eed93a54.png

 

Requires changing two files, presented below in diff format.

 

nut_status.php:

  Reveal hidden contents
44,45c48,49
<       $runtime   = gmdate("H:i:s", $val);
<       $status[2] = strtok($val/60,' ')<=5 && !in_array('ups.status: OL', $rows) ? "<td $red>$runtime</td>" : "<td $green>$runtime</td>";
---
>       $runtime   = strtok($val/60,' ');
>       $status[2] = strtok($val/60,' ')<=5 && !in_array('ups.status: OL', $rows) ? "<td $red>".intval($runtime)."m</td>" : "<td $green>".intval($runtime)."m</td>";
49a54,56
>     case 'input.voltage':
>       $voltage   = intval(strtok($val,' '));
>       break;
53a61,63
>     case 'ups.model':
>       $model     = $val;
>       break;
64c74
<   $status[3] = $power==0 ? "<td $red>{$power}w</td>" : "<td $green>{$power}w</td>";
---
>   $status[3] = $voltage<114 ? "<td $orange>${voltage}V</td>" : "<td $green>${voltage}V</td>";
66a77
>   $status[6] = "${model} ${power}W";

 

 

nutFooter.page:

  Reveal hidden contents
32c32
< <tbody id="tblUPSNUTDash" title="_(UPS(NUT))_">
---
> <tbody id="tblUPSNUTDash" title="_(POWER)_">
34c34
< <div class='section'>_(UPS(NUT))_<br><span><i class='ups fa fa-line-chart'></i><span id='load'>Load: <span class='nut_loadpct' id='nut_loadpct'></span></span>
---
> <div class='section'>_(POWER)_<br><span><i class='ups fa fa-line-chart'></i><span id='model'>UPS Model: <span class='nut_model' id='nut_model'></span></span>
158,162c158,163
<         "<tr class='updated'><td><span class='w36 ups'>UPS status:</span><span class='nut_status'>"+data[0]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Battery charge:</span><span class='nut_bcharge'>"+data[1]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Runtime left:</span><span class='nut_timeleft'>"+data[2]+"</span></td></tr>" +
<         "<tr class='updated'><td><span class='w36 ups'>Nominal power:</span>"+data[3]+"</td></tr>");
<     $("#tblUPSNUTDash").find('.nut_loadpct').html(data[5]+' - '+data[4]);    
---
>         "<tr class='updated'><td><span class='w36 ups'>UPS Status:</span><span class='nut_status'>"+data[0]+"</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>UPS Load:</span><span class='nut_loadpct'>"+data[4]+" ("+data[5]+")</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>Battery Charge:</span><span class='nut_bcharge'>"+data[1]+"</span></td></tr>" +
> "<tr class='updated'><td><span class='w36 ups'>Runtime Left:</span><span class='nut_timeleft'>"+data[2]+"</span></td></tr>" +
>         "<tr class='updated'><td><span class='w36 ups'>Input Voltage:</span><span class='nut_voltage'>"+data[3]+"</span></td></tr>");
>       $("#tblUPSNUTDash").find('.nut_model').html(data[6]);
184c185
<       $("#db-box1").find('.nut_nompower').html(data[3]);
---
>       $("#db-box1").find('.nut_voltage').html(data[3]);

 

 

You just need to update to my version of NUT in CA for 6.12

Unraid 6.12 introduces an API for adding elements (tiles) to the dashboard.

 

Besides the new layout, plugins need to be updated to use the API, the old way of hacking in to the dashboard does not work anymore.

 

20 hours ago, SimonF said:

You just need to update to my version of NUT in CA for 6.12

 

Right these tweaks are to your plugin (thanks by the way, works beautifully.)

Did I post in the wrong thread?

19 minutes ago, CS01-HS said:

 

Right these tweaks are to your plugin (thanks by the way, works beautifully.)

Did I post in the wrong thread?

Ah so your changes are to make it match the APC stock dashboard. May look to have as an option so people can choose.

 

Thanks for the Diffs I will review.

 

I thought the changes you posted where to fix old plugin version on Dashboard, hadn't looked at the code.

5 hours ago, CS01-HS said:

 

Right these tweaks are to your plugin (thanks by the way, works beautifully.)

Did I post in the wrong thread?

Looking at your changes, With nut I think some of the devices will not report model mine doesnt as it will be dependant on the Vendor

 

image.thumb.png.f1838d556dc9e33a9ee30eda3c862a93.png

Ah. I only have the one UPS so I can't test what's particular vs generic.

 

Something else that might affect it:

I have unRAID set up as client to a NUT server on an RPi.

 

While I have you (in case it's helpful) here are additional state codes I gathered:

>   'OL CHRG'        => 'Online: charging',
>   'OL CHRG LB'     => 'Online: charging',
>   'OL DISCHRG'     => 'Online: discharging',
>   'OL DISCHRG LB'  => 'Online: discharging',
>   'OL BOOST'       => 'Online: low voltage',
>   'OB DISCHRG'     => 'Offline: On battery',

 

Edited by CS01-HS

Here's my details page for reference:

444670466_Screenshot2023-03-21at8_06_11AM.thumb.png.471894ee7ad90ad1f19464df7a77783f.png

Will this be updated to work with Unraid 6.12?

11 minutes ago, boxer74 said:

Will this be updated to work with Unraid 6.12?

Update to the plugin maintained by SimonF

Just now, boxer74 said:

Will this be updated to work with Unraid 6.12?

My version on CA is ok for 6.12 same for IPMI

Great, thanks!

I had to uninstall and reinstalling the Nut plugin for it to work on 6.12.0-rc2

Edited by AB3DC

On 3/21/2023 at 1:25 PM, SimonF said:

My version on CA is ok for 6.12 same for IPMI

 

Out of curiosity, does your patched versions work on older 6.10.3 systems? I am wondering if I can switch over before hand, so when I do opt to move to 6.12 it eill be a couple less steps to do at that time.

 

Thanks for the updates.

4 minutes ago, BRiT said:

 

Out of curiosity, does your patched versions work on older 6.10.3 systems? I am wondering if I can switch over before hand, so when I do opt to move to 6.12 it eill be a couple less steps to do at that time.

 

Thanks for the updates.

Yes my main box is on 6.10.3 running my vers

@SimonF I really appreciate that you are taking over maintenance of the NUT plugin.  Would you be willing to update your plugin to use NUT 2.8?  I am using dmacias's plugin with an APC SMT1000RM2U with a AP9630 network management card.  It uses the snmp-ups driver but the net-snmp package included dmacias's plugin does not work on Unraid 6.11.5.  I use some commands in my go script that alter dmacias's plugin scripts to use NUT 2.8 and net-snmp 5.9.3 as explained in this 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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.