networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.12k stars 355 forks source link

Question: USBHID-UPS with APC SMT3000RM2UC #1449

Open rcdailey opened 2 years ago

rcdailey commented 2 years ago

I'm not sure if this is the right place to ask this question, since I don't deal with NUT directly. I use it through Home Assistant's NUT server.

I'm not able to see Load Percentage using the usbhid-ups driver. Is this a limitation of my specific APC model? I have connected the USB port directly to the machine running Home Assistant.

Below is a screenshot of the current entities / data set I get from NUT. I am expecting a percentage of load somewhere, but not seeing it. This would be the same percentage load I see on the UPS small LED screen.

image

jimklimov commented 2 years ago

Can't quickly say. It could well be a limitation of your NUT driver version, especially if HA bundle still contains 2.7.4 release and not 2.8.0 or newer (not sure OTOH if any mappings changed for this, not too online now to compare sources), or if the device does not serve the data on mapping entry we check for this info (if we do), or HA does not map all of NUT info...

rcdailey commented 2 years ago

Thanks for the reply. Looks like they aren't on 2.8.0 based on this response: https://github.com/hassio-addons/addon-nut/issues/226

I don't know what it will take to get them there. But it sounds like 2.8 might be the answer. There's so many layers to this, I'm not sure what it will take to get the data I want.

I'm assuming that providing my UPS model number didn't help to at least rule out any device-specific issues, as you hinted?

rcdailey commented 2 years ago

Looks like they're wanting the Debian package to be upgraded from 2.7.4 to 2.8.0: https://packages.debian.org/search?keywords=nut

rcdailey commented 2 years ago

I went out on a limb and ran my own docker container for NUT server. I'm using this one: https://hub.docker.com/r/instantlinux/nut-upsd

This has v2.8.0. Unfortunately, I'm still only seeing the same entities. No load percentage. Can you help me determine why I can't view this for my particular APC model?

Thanks for your patience and help thus far!

rcdailey commented 2 years ago

@jimklimov Any chance to review my last few replies to see if you can help me understand why NUT isn't showing a load percentage for my UPS?

jimklimov commented 2 years ago

Not at a PC now to check the command lines, so you might have to trawl other recent issue discussions - but generally a USB driver start with higherr debug levels, and/or using a gen-usb-subdriver script from sources, should walk the device and report data fields seen from it. Then you'd have to compare sources to see if your UPS has a data point the driver does not handle, or just does not report the value you're after.

rcdailey commented 2 years ago

I'm not sure how to do that. Is the higher debug levels an option when starting NUT? I'll assume you mentioned checking recent issue discussions because you put instructions in there somewhere. Thanks for taking the time to help me out.

jimklimov commented 2 years ago

Depending on NUT version, the 2.8.0 release and newer (git master so far) support a debug_min option in config files for upsd and driver daemons. For older releases you have to get into init scripts or systemd units involved, to bump the debug by adding half a dozen -D options. Better hush it back down after troubleshooting.

EetuRasilainen commented 1 year ago

Unfortunately a newer NUT version is not going to help you here at the moment. On newer APC devices advanced information such as the current load and power consumption are exposed through both Modbus and MicroLink and not through USB-HID.

MicroLink is not supported by NUT at all (see #1426) and Modbus support is not in a good shape right now. If you really need the UPS load/power consumption and some other advanced features your best option is using apcupsd right now as they have proper Modbus support for newer APC SmartUPS devices such as yours.

rcdailey commented 1 year ago

I recall trying to use apcupsd driver in NUT and had some issues with it. IIRC it didn't work over USB or something. Been a hot minute.

jimklimov commented 1 year ago

Actually it is not as gloomy today as it was a year or two ago - several modbus drivers were contributed, just not an APC among them yet. So there are precedents to learn from :)

On Thu, Dec 22, 2022, 22:39 Dan Klaffenbach @.***> wrote:

What I was saying is: don't use NUT, use apcupsd instead (unfortunately). APC UPS support is not in a good shape in NUT right now. For all "newer" APC UPS models (a.k.a. models introduced in 2009 or later [SMT, SMC, SMX, SRT lines]) only basic reporting is available in NUT when falling back to USBHID.

APC/Schneider have published their Modbus specification online, but of course we still need a volunteer to implement this in NUT. Right now I think APC is not putting any development resources into the NUT project so I doubt that APC UPS support within NUT is going to improve anytime soon.

— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1449#issuecomment-1363374419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFBOQODFDBF2H2CTTO3WOTC7LANCNFSM5ZFGGFRQ . You are receiving this because you were mentioned.Message ID: @.***>

rcdailey commented 1 year ago

I love NUT because it integrates so nicely with Home Assistant. I have no experience with apcupsd, but I'll check it out. Hopefully it integrates nicely and is easy to set up.

jimklimov commented 1 year ago

There is a NUT apcupsd-ups driver, to retranslate... better than nothing, to integrate with NUT ecosystem.

In this year's discussions however somebody complained... I think debian(?) packaging botched it that either one or another package may be installed. But that was a distro issue, programs worked together.

Jim

On Thu, Dec 22, 2022, 23:21 Robert Dailey @.***> wrote:

I love NUT because it integrates so nicely with Home Assistant. I have no experience with apcupsd, but I'll check it out. Hopefully it integrates nicely and is easy to set up.

— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1449#issuecomment-1363400193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFC66QHVVM62PXFWTP3WOTH5XANCNFSM5ZFGGFRQ . You are receiving this because you were mentioned.Message ID: @.***>