Why does NUT on a Pi report two different battery charge amounts for an APC UPS?
This using NUT 2.7.4 on a Raspberry Pi4 running Buster connected via USB to an APC Back-UPS BX750MI-MS.
I originally set this up last January when I bought the UPS. Both the UPS and NUT have been working as expected since then - until the other night.
I have NUT report the UPS status (battery.charge and input.voltage) daily and it always shows 100% charge with about 230 input volts. I occasionally get a "replace battery" notification from NUT, but I figured those were spurious since the battery is less than a year old and the UPS performs as expected during a power outage.
The other night there was a power outage which caused the UPS to immediately shut down with a dozen rapid beeps and then nothing. When the power resumed the UPS would not charge.
APC customer support had me reset the UPS which resumed battery charging. After that I ran a deep battery test (passed) which brought the battery charge down to 19%. 12 hours later the battery is still at 35%
pi@raspsky:~ $ upsc apcups | grep battery.charge:
battery.charge: 35
If I disconnect the USB cable I get this message via NOTIFYCMD:
Communications with UPS apcups@localhost lost
When I plug it back in, I get:
Communications with UPS apcups@localhost established - battery.charge: 95
(The battery charge is supplied by the NOTIFYCMD script.)
And, then, if I immediately check the battery:
pi@raspsky:~ $ upsc apcups | grep battery.charge:
battery.charge: 35
It's back to 35%.
So, what's going on here? Why does the UPS report 95% immediately up resumption of communication with NUT and then 35% seconds later?
Which one is correct?