[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

12 minutes ago, scuppasteve said:

 

TrippLite SMART1500RM2UL

 

Should work with driver "tripplite_usb" and port "auto" - can you test this combination with this version of the plugin?

 

You need to set Start Network UPS Tools setting to "No", change the settings and then back to "Yes" to start NUT again.

 

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

 

Should work with driver "tripplite_usb" and port "auto" - can you test this combination with this version of the plugin?

 

You need to set Start Network UPS Tools setting to "No", change the settings and then back to "Yes" to start NUT again.

 

 

As requested, i stopped the service, set it to "Tripplite_usb" and port "auto", started the service. 

 

NUT Details - No information available

settings.png

Link to comment
12 minutes ago, scuppasteve said:

 

As requested, i stopped the service, set it to "Tripplite_usb" and port "auto", started the service. 

 

NUT Details - No information available

settings.png

 

Hmm, does it say anything in the logs with the tripplite_usb driver?

 

What else you can try:

  • Auto Config with different USB port
  • Same settings on backend "release (2.8.0 stable)"
  • Same settings on backend "legacy (2.7.4 stable)"
  • Auto Config on backend "release (2.8.0 stable)"
  • Auto Config on backend "legacy (2.7.4 stable)"

If you don't want to reboot changing backends, you can also just uninstall and reinstall the plugin (after changing the backend). Just make sure that "Network UPS Tools Backend:" says something different than before, that it's actually changed (you at least need to reinstall the plugin, otherwise it won't change the backend).

 

Edited by Rysz
Link to comment

It seems there is an update to the plugin every day and if I let it update NUT won't work until I restart the whole server. I've decided to ignore updates for NUT from now on instead of having to restart the whole server after every update.

 

Why does Unraid tell me there is an update for NUT seemingly every day?

Link to comment
8 hours ago, Malakai said:

It seems there is an update to the plugin every day and if I let it update NUT won't work until I restart the whole server. I've decided to ignore updates for NUT from now on instead of having to restart the whole server after every update.

 

Why does Unraid tell me there is an update for NUT seemingly every day?

 

It tells you that because I am doing a lot of development work there at the moment. A lot of re-factoring and code-wise improvements are done in preparation of the imminent NUT 2.8.1 release. I'm expecting things to quiet down after the NUT 2.8.1 release, so bear with me here until then (no promises). It does say in the plugin description I'm putting a focus on frequent updates though, so there's that... 😃

 

What exactly "won't work" after updating that would make you restart your server? Sorry, but that's a bit vague of a statement to determine if there's an actual problem, one I'm sure that other users would have been very vocal about (having to restart their servers to update a plugin) if it were a more common occurrence.

 

It's certainly your prerogative to ignore updates and I'm in fact even slightly discouraging users to update their plugin if everything just works for them (with most changes aimed towards people having problems and not introducing new features + UPS drivers being unpredictable as they are).

 

Edited by Rysz
Link to comment
Oct 28 01:10:32 Sirius usbhid-ups[19839]: WARNING: send_to_all: write 34 bytes to socket 15 failed (ret=-1), disconnecting: Broken pipe
Oct 28 01:10:42 Sirius usbhid-ups[32495]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
Oct 28 01:10:43 Sirius upsd[32517]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
Oct 28 01:10:43 Sirius upsmon[32521]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it


I have recently been getting the following error messages in the syslog. Does anyone have an idea what this could mean?

Link to comment
1 hour ago, Anym001 said:
Oct 28 01:10:32 Sirius usbhid-ups[19839]: WARNING: send_to_all: write 34 bytes to socket 15 failed (ret=-1), disconnecting: Broken pipe
Oct 28 01:10:42 Sirius usbhid-ups[32495]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
Oct 28 01:10:43 Sirius upsd[32517]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
Oct 28 01:10:43 Sirius upsmon[32521]: upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it


I have recently been getting the following error messages in the syslog. Does anyone have an idea what this could mean?

 

The first one is likely a warning about a USB write-timeout, these occur sometimes and shouldn't cause any trouble on their own. The others are newer diagnostic messages in the NUT backend and have no particular meaning on UNRAID. They just report that NUT itself isn't connected to a systemd or similar environment as on other linux distributions, if everything seems to work as it should - you can safely ignore those messages. 🙂

 

Edited by Rysz
  • Thanks 1
Link to comment

Hi, I'm posting about the recent warning in the changelog. This sentence caught my eye in particular:

Quote

updating comes with a chance of degraded UPS compatibility

Are breaking changes being introduced without being mentioned in the changelog, or is it just like "random mistakes happen, so if it works now don't update"?

I always keep plugins up to date because there might be new features, in this case a UI improvement for example. Updating might also be necessary to support newer UNRAID versions.

 

Not sure what the best course of action is, should I really stop updating?

 

Either way thank you for your work 🙏

Link to comment
18 minutes ago, nicosemp said:

Hi, I'm posting about the recent warning in the changelog. This sentence caught my eye in particular:

Are breaking changes being introduced without being mentioned in the changelog, or is it just like "random mistakes happen, so if it works now don't update"?

I always keep plugins up to date because there might be new features, in this case a UI improvement for example. Updating might also be necessary to support newer UNRAID versions.

 

Not sure what the best course of action is, should I really stop updating?

 

Either way thank you for your work 🙏

 

Hello!

 

Thanks for asking about this - I've outlined it in detail in this post:

 

Basically this was mostly an issue in the past few months, where the default NUT backend has changed more often due to ongoing development and bug-fixing efforts in preparation of a NUT 2.8.1 stable release. A small amount of people were still on very outdated backends (from 2016) and experienced some compatibility problems updating to the newer backends (from 2023).

 

The NUT 2.8.1. stable release is now on the horizon and will become the new (pinned) default backend, so there'll be no more frequent backend changes after that (at which point I'll also remove that warning, because updating will affect only the GUI). It's just something I wanted people to be cautious of while I make the transition to the NUT 2.8.1 stable release as new default backend, which should happen in the next 1-2 weeks.


This is basically all unrelated to the plugin, it's the updating of the NUT backend (with the UPS drivers) that's caused some issues beyond my control as the plugin maintainer. The changelog is limited to the changes made by me (to the plugin), but doesn't include those made to the NUT backend (being a program of its own developed by other people for multiple OSes).

 

Edited by Rysz
  • Thanks 1
Link to comment

Hi,

I'm trying to monitor My UPS PowerWalker - https://powerwalker.com/pl/produkt/10121100/ with UnRaid. Right after installation NUT and enable monitoring everything was connected and working, I could see current power and all attributes, after while it stopped to show LOADdfed1f06-8337-4413-9d64-ae78371c91c7.png

 

It seams like my ups not showing load under 50W. When I was doing migration or something what takes more power load is visible and its over 50W. Is it possible?

Link to comment
45 minutes ago, pawelb said:

Hi,

I'm trying to monitor My UPS PowerWalker - https://powerwalker.com/pl/produkt/10121100/ with UnRaid. Right after installation NUT and enable monitoring everything was connected and working, I could see current power and all attributes, after while it stopped to show LOADdfed1f06-8337-4413-9d64-ae78371c91c7.png

 

It seams like my ups not showing load under 50W. When I was doing migration or something what takes more power load is visible and its over 50W. Is it possible?

 

Unfortunately this is out of NUT's control, as your UPS seems to cut off the information "flow" to that specific load variable when under 50 watts. This is commonly seen with more powerful UPS which consider such a miniscule load not worthy to report, but not having the load reported is merely an optical problem rather than a functional one - load is not a variable required for NUT to function.

  • Like 1
Link to comment
3 minutes ago, Rysz said:

 

Unfortunately this is out of NUT's control, as your UPS seems to cut off the information "flow" to that specific load variable when under 50 watts. This is commonly seen with more powerful UPS which consider such a miniscule load not worthy to report, but not having the load reported is merely an optical problem rather than a functional one - load is not a variable required for NUT to function.

 

Thank you very much for an answer. It's sad there is such a "feature".

Link to comment

I used to get notified by Unraid when my power would drop - "UPS on Battery," etc. I haven't received any such emails recently. Yesterday the power went out, as far as I could tell Unraid shut itself down appropriately, but I didn't receive any notifications. Is there a setting I missed somewhere on the new NUT?

Link to comment
5 minutes ago, Dovy6 said:

I used to get notified by Unraid when my power would drop - "UPS on Battery," etc. I haven't received any such emails recently. Yesterday the power went out, as far as I could tell Unraid shut itself down appropriately, but I didn't receive any notifications. Is there a setting I missed somewhere on the new NUT?

 

The NUT plugin uses the UNRAID notification settings to notify you in such cases - so you'd need to check them. Is it possible you don't have all your network devices connected to the UPS and UNRAID couldn't notify you because it had no internet connection anymore at that point? Was this a large-scale power loss where your ISP could have been affected too?

 

I've just tested it with mine and it notified me of all status changes as it should.

 

Edited by Rysz
Link to comment

@Rysz thank you for taking this on and for being so active and helpful here in the community.

 

I was working with one of the NUT devs to compile support for Liebert GXT UPS with is-webcard and this older network card I had at the time - we got really close and then he / she fell off the face of the earth so we never quite finished. My UPS mostly works with the ietf MIB. I'm hoping that one of the new NUT builds will incoroporate the work that we did for the Liebert GXT line.

Link to comment
5 minutes ago, Malakai said:

Dashboard panel:

image.png.0bd575031dd07c4ecc8e3da9934629fd.png

 

Log during the above:
image.thumb.png.f3f59cb154cd24066eaefe201969501c.png

After pressing the 'Reload NUT' button:
image.thumb.png.ca9627204204676a59f82d89cce682ab.png

Update NUT then unplug the UPS and plug it back in:
image.thumb.png.1f4d2f95d158ae7ff0cd8ee943d48511.png

Dashboard panel is missing completely now.

I hope this is good information. :)

 

The NUT dashboard panel is not viewed when NUT itself is not running, so it doesn't take up useless space - that's normal. From your logs this seems more of a USB connectivity problem (which seems to resolve when restarting), rather than a NUT backend problem. What kind of UPS is this you're using ("PPC Offline UPS") and have you tried any other USB ports or cables?

 

Edited by Rysz
Link to comment

Yes I think you are right about a connectivity problem. After rebooting the server all various log entries every few seconds are gone.

image.png.173caa616240e62b80de28c5d71b27ce.png

I've used this UPS since March 2023 when I put fresh batteries in it. It never had this problem until changing to the newly recommended NUT for UNRAID v6.12.x

Do you think I should try a different Backend Switch?
image.png.da08369c43979e72a95581920e12dee8.png

Edited by Malakai
Link to comment
8 minutes ago, Malakai said:

Yes I think you are right about a connectivity problem. After rebooting the server all various log entries every few seconds are gone.

image.png.173caa616240e62b80de28c5d71b27ce.png

I've used this UPS since March 2023 when I put fresh batteries in it. It never had this problem until changing to the newly recommended NUT for UNRAID v6.12.x

Do you think I should try a different Backend Switch?
image.png.da08369c43979e72a95581920e12dee8.png

 

If you never had problems before changing then I'd recommend the backend: legacy (2.7.4 stable). Some UPS don't play well with the newer backends, and this is the one the older plugin has also used. Note that you will need to reboot your system for the backend change to become effective.

 

It should then say: "nut-2.7.4.20200318-x86_64-1" for "Network UPS Tools Backend". You will then stay on that backend permanently and updates will only affect the other parts of the plugin (but not the UPS drivers).

 

Edited by Rysz
  • Like 1
Link to comment

Is something wrong in my configuration or why is the load of my Eaton 3S 850 DIN UPS always 4%? No matter if something load intensive is running on my Unraid server or not. Unfortunately, the UPS is not really smart and I have to manually specify VA with 850 and W with 510, but he would calculate everything so.

At least that was the thought. But brings nothing, as long as the load is always at 4%.

Link to comment
2 minutes ago, sasbro97 said:

Is something wrong in my configuration or why is the load of my Eaton 3S 850 DIN UPS always 4%? No matter if something load intensive is running on my Unraid server or not. Unfortunately, the UPS is not really smart and I have to manually specify VA with 850 and W with 510, but he would calculate everything so.

At least that was the thought. But brings nothing, as long as the load is always at 4%.

 

Can you post a screenshot of the variable table (NUT Details) please, hard to tell what's wrong.

Link to comment
43 minutes ago, Rysz said:

 

Can you post a screenshot of the variable table (NUT Details) please, hard to tell what's wrong.

Of course.

image.thumb.png.5df26fe2451d6e1d3779aa9fbc7b4435.png

 

image.thumb.png.472d166b162b4d32fb426c4350c8d8d9.png

 

Here the ups.conf

 

[ups]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
product = "Eaton 3S"
serial = "Blank"
vendor = "EATON"
bus = "001"

 

Edited by sasbro97
Forgot something
Link to comment
35 minutes ago, sasbro97 said:

Of course.

image.thumb.png.5df26fe2451d6e1d3779aa9fbc7b4435.png

 

image.thumb.png.472d166b162b4d32fb426c4350c8d8d9.png

 

Table looks OK, general compatibility seems good with all the really important variables reported.

NUT itself uses the variables reported from the UPS, but the plugin can calculate some for the GUI.

However that only works for variables which are zero or entirely missing, so not much we can do there.

 

On the upside this is only an optical problem, load variables are not required for NUT itself to function.

So you'll still have the safe shutdown and all other functions of NUT working without the load variable.

 

Did you ever attempt if it changes anything using just:
 

[ups]
driver = "usbhid-ups"
port = "auto"

 

Edited by Rysz
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.