[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

2 minutes ago, Rysz said:

 

Are you sure the text in "Network UPS Tools Backend" didn't change? Because this is the (older) stable backend which you've selected - so the correct backend is installed (according to your selection). Maybe you were on the (older) stable backend already - which is why your load value wasn't shown and the backend hasn't changed? The new backend is "nut-2.8.0-x86_64-11master.ssl11" or "nut-2.8.0-x86_64-12master.ssl11".

 

In any case the backend definitely switches when reinstalling, so worth trying changing again to:

  • default (recent master) => reinstall plugin => test if it works
  • legacy (2.7.4. stable) => reinstall plugin => test if it works

 

You are right. I just didn't read it right. However, load isn't shown with 2.8.0 or 2.7.4. I will try again with a different USB-Cable. Do I still have to set anything in Unraid's own UPS Settings?

Link to comment
1 minute ago, Hiko0 said:

 

You are right. I just didn't read it right. However, load isn't shown with 2.8.0 or 2.7.4. I will try again with a different USB-Cable. Do I still have to set anything in Unraid's own UPS Settings?

 

No - the UNRAID's own UPS settings (the APC daemon) should be set to "No" / "Disabled" 🙂

Link to comment
16 minutes ago, Rysz said:

 

Great - glad it works for you!! ✌️

Hi sorry for bother you again, Is Nut work as SNMP ups server ? I have a Qnap nas and also a Synology nas ,  set Nut as netserver with qnap default username and password would work fine,  but on synology it only give the option of USB / SNMP and synology serverd nas as source.  any suggistion?

Link to comment
20 minutes ago, atsrxL said:

Hi sorry for bother you again, Is Nut work as SNMP ups server ? I have a Qnap nas and also a Synology nas ,  set Nut as netserver with qnap default username and password would work fine,  but on synology it only give the option of USB / SNMP and synology serverd nas as source.  any suggistion?

 

On UNRAID you'd need to set NUT to netserver mode.

On QNAP you will then choose "Network UPS Slave"

About Synology I'm not sure if it'll work, there's a few topics on Google about it.

Link to comment
3 minutes ago, Rysz said:

 

On UNRAID you'd need to set NUT to netserver mode.

On QNAP you will then choose "Network UPS Slave"

About Synology I'm not sure if it'll work, there's a few topics on Google about it.

Synology will also work as ups name:ups username:monuser pass:secret   , but the tricky thing is this , a nut server can't use two identifaction at same time , thus I'm trying to use SNMP ups mode if NUT can provide.

Link to comment
16 minutes ago, atsrxL said:

Synology will also work as ups name:ups username:monuser pass:secret   , but the tricky thing is this , a nut server can't use two identifaction at same time , thus I'm trying to use SNMP ups mode if NUT can provide.

 

You can add a second user with different credentials like this:

  • Set NUT Monitor Username to something else than "monuser", like "masteruser"
  • Set NUT Slave Username and NUT Slave Password to the username/password your QNAP expects
  • Apply Settings (to save configuration)
  • In NUT Configuration Editor, modify the /etc/nut/upsd.users like this:

grafik.png.b73ce6e89d9c50e8ac175b995e120f38.png

  • Save the modified configuration file
  • Start NUT

 

Then on your Synology device you can use the monuser user, and on your QNAP the other user (here slaveuser). Make sure to put the additional user below the line 12 and leave the rest of the settings (as they are configured and overwritten by the GUI settings).

 

I can't guarantee this'll work (don't have QNAP/Synology devices).

But in theory it should work like this, unfortunately there's no SNMP server in NUT. 🙂

 

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

 

You can add a second user with different credentials like this:

  • Set NUT Monitor Username to something else than "monuser", like "masteruser"
  • Set NUT Slave Username and NUT Slave Password to the username/password your QNAP expects
  • Apply Settings (to save configuration)
  • In NUT Configuration Editor, modify the /etc/nut/upsd.users like this:

grafik.png.b73ce6e89d9c50e8ac175b995e120f38.png

  • Save the modified configuration file
  • Start NUT

 

Then on your Synology device you can use the monuser user, and on your QNAP the other user (here slaveuser). Make sure to put the additional user below the line 12 and leave the rest of the settings (as they are configured and overwritten by the GUI settings).

 

I can't guarantee this'll work (don't have QNAP/Synology devices).

But in theory it should work like this. 🙂

 

The another requirement of synology slave is that ups name should be "ups" other than "qnapups" , I tried add a [ups] section in ups.conf with same port , its won't work.

Link to comment
Just now, atsrxL said:

The another requirement of synology slave is that ups name should be "ups" other than "qnapups" , I tried add a [ups] section in ups.conf with same port , its won't work.

 

Yeah that's unfortunately not possible to setup with NUT on UNRAID, not without changes to the code at least. I think one user got it working a few pages back in this topic, you'll probably find it by searching "qnapups". But it's more of a workaround than something "officially" supported.

Link to comment
18 minutes ago, Rysz said:

 

Yeah that's unfortunately not possible to setup with NUT on UNRAID, not without changes to the code at least. I think one user got it working a few pages back in this topic, you'll probably find it by searching "qnapups". But it's more of a workaround than something "officially" supported.

Yeap, I tried ssh to synology and modified its upsmon.conf , then ran upsmon , it worked . but in the webui setting it will overwrite config.  I'll try some  workaround when I'm spare.  Overall, very thankful to you for solving my problem.

Link to comment

Hi recently every so often the service stops working and reloading doesnt seem to help. I am on stable branch and after a few days my syslog is full of the same error

Oct 25 10:33:37 Server upsmon[17350]: Poll UPS [[email protected]] failed - Data stale
Oct 25 10:33:37 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:39 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:41 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:42 Server upsmon[17350]: Poll UPS [[email protected]] failed - Data stale
Oct 25 10:33:43 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:45 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything

 

I have disabled for now, tried removing everything, fresh install and reboot but same error creeps back. Any suggestions?

Link to comment
2 minutes ago, bally12345 said:

Hi recently every so often the service stops working and reloading doesnt seem to help. I am on stable branch and after a few days my syslog is full of the same error

Oct 25 10:33:37 Server upsmon[17350]: Poll UPS [[email protected]] failed - Data stale
Oct 25 10:33:37 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:39 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:41 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:42 Server upsmon[17350]: Poll UPS [[email protected]] failed - Data stale
Oct 25 10:33:43 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything
Oct 25 10:33:45 Server usbhid-ups[17262]: libusb1: Could not open any HID devices: insufficient permissions on everything

 

I have disabled for now, tried removing everything, fresh install and reboot but same error creeps back. Any suggestions?

 

That's a dying USB port or USB cable (or worst case USB controller).

Best would be to try a different USB port or USB cable first and see if that changes anything.

 

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

 

That's a dying USB port or USB cable (or worst case USB controller).

Best would be to try a different USB port or USB cable first and see if that changes anything.

 

 

I will see if I can find another USB cable, I had same issue with my old supermicro motherboard and now using MSI motherboard so hopefully that rules out the controller.

 

Thanks for quick reply

  • Like 1
Link to comment
On 9/30/2023 at 4:03 AM, Rysz said:

Backend development can never plan for all UPS devices and updating comes with a chance of degraded UPS compatibility.

 

That means if NUT works well for you and you are happy with everything, updating is not going to bring you much benefit.

Thank you for the heads up!

 

Is there a way to roll back to a previous version of the plugin if you update and it breaks your UPS? I don't want to get "tech debt" by just letting the updates go.

Link to comment
55 minutes ago, autumnwalker said:

Thank you for the heads up!

 

Is there a way to roll back to a previous version of the plugin if you update and it breaks your UPS? I don't want to get "tech debt" by just letting the updates go.

 

The plugin currently offers three backend "channels" to choose from:

  • default (recent master, updated every ~1-2 weeks)
  • release (2.8.0 stable, from 04/2022)
  • legacy (2.7.4 stable, from 03/2016)

If you don't see them all, you're likely using an older version of UNRAID.

 

The "problem" is the last official NUT release was way back in 04/2022, but a lot of useful and important changes have been made to the NUT project since (including new drivers, new supported UPS, ...). Those changes haven't been published as a new release yet, but in the form of continued development in the NUT master repository. So I decided to base my default version of the plugin on a "default (recent master)" backend which I continuously compile and keep up-to-date with that master repository myself, so that everyone can get the most out of NUT, but with the possibility of switching to an older backend in case they have problems.

 

There is currently no easy way to roll back from "default (recent master)" - although I am looking at ways to "pin" that backend while continuing to get updates for the other parts of the plugin. For all the other selectable backends - this is already working. That means if you select "release (2.8.0 stable)" or "legacy (2.7.4 stable)", and one of those works well for you, you'll stay on that backend indefinitely and will still receive all updates to the other parts of the plugin when you update.

 

Good news is that a 2.8.1 stable release is already on the horizon, packing all the development of the past 1.5 years, and will soon be offered in the plugin along with the older backends. So once that is released I'll either be "pinning" that new release as the new default backend or you'll at least be able to choose it in form of a "release (2.8.1 stable)" backend and remain on that for as long as you like, while still getting updates to the other parts of the plugin when you update.

 

I've decided to include the update "warning" because a lot of the NUT development is based on theoretical logic and with 1171 hardware device models from 175 different manufacturers listed as supported it's impossible to always account for all of them. So there's always a slim chance that something that previously worked for your UPS might stop working with a newer built backend.

 

The plugin itself is just a type of "frontend" to the NUT backend, you see, which is developed by other people and with far more operating systems than UNRAID in mind. All I can do is select which backends to offer to the users, and I think I already offer quite a broad variety compared to some of the other plugins, as well as striving to make the "frontend" as useful and stable as possible.

 

"If it works, don't touch it." - there are some software packages to which I apply this principle. If NUT is among them, that'll be your personal decision, but I want people to make it a conscious one. Of course I am always excited if people update to the new backends for the latest changes, and I am always more than happy to help whenever problems should occur, but I have essentially no control over your individual device's compatibility.

 

Bottom line, most of the plugin's changes won't bring exciting new features, but aim to improve compatibility for new installations as well as offering bugfixes for people who are experiencing problems. If you're not among them, be happy, but do continue to read the changelogs and decide for yourself if it's worth to update. 🙂

 

Edited by Rysz
  • Like 1
Link to comment
On 10/25/2023 at 9:29 AM, Hiko0 said:

 

You are right. I just didn't read it right. However, load isn't shown with 2.8.0 or 2.7.4. I will try again with a different USB-Cable. Do I still have to set anything in Unraid's own UPS Settings?

 

We have since found the issue with this, the problem was that the server was not connected to the "master" power outlet and that this Eaton UPS doesn't report load for the "slave" power outlets.

 

Edited by Rysz
  • Upvote 1
Link to comment
23 minutes ago, merciful-democracy7667 said:

Do you know how to reset the settings to their initial state?

 

Even after uninstalling and reinstalling the plugin, the same settings are retained.

 

IMHO, I think it would be helpful if it's mentioned in the plugin introduction on the first page.

 

There's a button "Reset Config" - that'll reset everything to the default state. 🙂 

Link to comment
37 minutes ago, Rysz said:

 

There's a button "Reset Config" - that'll reset everything to the default state. 🙂 

 

Thank you for the quick feedback. I'm recording the process I went through, thinking that there may be others like me who are beginners. The UPS I'm using is the EATON Ellipse ECO 1600 USB DIN.

 

1. When I updated Unraid from 6.11 to 6.12, I encountered an issue in the "Update assistant" indicating that a plugin was not compatible.

2. Upon seeing the message, I deleted the plugin and proceeded with the Unraid update.

3. After the update, I found that the plugin was available for reinstallation, and when I did so, the user interface was completely different.

4. The Reset button was disabled.

5. I changed the "Start Network UPS Tools Service" to "No," and the Reset button became active.

6. I clicked Reset.

7. Then, I clicked on Auto Config.

8. It started working correctly.

 

Thank you.

 

 

2.png

3.png

4.png

  • Thanks 1
Link to comment

I have a new Tripp Lite UPS, i previously had an APC UPS configured and it worked fine. I can't seem to get NUT to work with my UPS. When i run Autodetect, it doesn't display anything and the Done button illuminates. When you click done, it selects Blazer_usb. I have tried both Tripplite_usb and Usbhid_ups. Neither worked. I ran lsusb and you can see in the attached image the UPS is connected. I have tried typing auto in for port as well. Any idea? 

LSusb.png

settings.png

Link to comment
19 minutes ago, scuppasteve said:

I have a new Tripp Lite UPS, i previously had an APC UPS configured and it worked fine. I can't seem to get NUT to work with my UPS. When i run Autodetect, it doesn't display anything and the Done button illuminates. When you click done, it selects Blazer_usb. I have tried both Tripplite_usb and Usbhid_ups. Neither worked. I ran lsusb and you can see in the attached image the UPS is connected. I have tried typing auto in for port as well. Any idea? 

LSusb.png

settings.png

 

Hello!

 

You seem to be using an extremely old version of the plugin, a lot of changes have been made to the autoconfigure mechanism and drivers since.

 

Please uninstall your outdated plugin and install "Network UPS Tools (NUT) for UNRAID" by Rysz from Community Applications ("Apps" Tab).

 

When you first set it up, best choose "Reset Config" to clear the old configuration and then "Auto Config" for auto detection of your UPS.

 

Also please make sure to never use the same usernames for Monitor and Slave, this can lead to unexpected behavior.

 

Please let us know if it worked for you 🙂 

 

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

 

Hello!

 

You seem to be using an extremely old version of the plugin, a lot of changes have been made to the autoconfigure mechanism and drivers since.

 

Please uninstall your outdated plugin and install "Network UPS Tools (NUT) for UNRAID" by Rysz from Community Applications ("Apps" Tab).

 

When you first set it up, best choose "Reset Config" to clear the old configuration and then "Auto Config" for auto detection of your UPS.

 

Please let us know if it worked for you 🙂 

 

 

Ok so, i upgraded, reset config, ran a scan. It didn't find the UPS. 

settings.png

scan.png

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.