[Nut-upsuser] Shutdown variables

Simon Wilson simon at simonandkate.net
Mon Dec 5 04:39:40 GMT 2022


Thanks, useful.

Started with 2 x levels of debug, and grepped for that element, I see:

Dec  5 14:25:28 emp80 nut-driver at eaton5sx[1418584]:   5.108828#011[D1]  
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input,  
ReportID: 0x02, Offset: 8, Size: 8, Value: 0
Dec  5 14:25:29 emp80 nut-driver at eaton5sx[1418584]:   6.419040#011[D2]  
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Feature,  
ReportID: 0x02, Offset: 8, Size: 8, Value: 0

So is that the UPS telling the driver that it is reporting on it, but  
with value 0? It's the same entries as on the 5S 1000 extract you  
linked.

What are the Input and Feature lines respectively?

Simon.

----- Message from Charles Lepple <clepple at gmail.com> ---------
     Date: Sun, 4 Dec 2022 21:23:06 -0500
     From: Charles Lepple <clepple at gmail.com>
Reply-To: Nut-upsuser <nut-upsuser at alioth-lists.debian.net>
  Subject: Re: [Nut-upsuser] Shutdown variables
       To: simon at simonandkate.net
       Cc: Nut-upsuser <nut-upsuser at alioth-lists.debian.net>


> On Nov 27, 2022, at 8:21 PM, Simon Wilson via Nut-upsuser wrote:
>>
>> "[replbatt] The UPS needs to have its battery replaced. Not all  
>> UPS's can indicate this."
>>
>> Can anyone advise whether the Eaton USB UPSs support that?  
>> Specifically mine is a 5SX 1750.
>
> I don't know for the 5SX line in particular, but if you have a  
> maintenance window where you can stop NUT, then start the usbhid-ups  
> driver manually with a few -D flags (was 2+ for older versions of  
> NUT), there is a HID descriptor element you can look for:
>
> UPS.PowerSummary.PresentStatus.NeedReplacement
>
> and that gets mapped to the RB flag in ups.status, and "Replace  
> battery!" in ups.alarm.
>
> If the 5SX is a superset of the 5S, then it should have this. A 5S  
> 1000 log is here:  
> https://alioth-lists.debian.net/pipermail/nut-upsuser/2016-May/010122.html
>
> Reference:
>
> https://github.com/networkupstools/nut/blob/v2.8.0/drivers/mge-hid.c#L1264  
> (assuming your UPS has a vendorid of 0x0463) maps the variable to  
> replacebatt_info -> mapped to "replacebatt" string in  
> drivers/usbhid-ups.c, then to RB:  
> https://github.com/networkupstools/nut/blob/v2.8.0/drivers/usbhid-ups.c#L1681-L1683


----- End message from Charles Lepple <clepple at gmail.com> -----



-- 
Simon Wilson
M: 0400 12 11 16




More information about the Nut-upsuser mailing list