#1040177 apcupsd: No data from SmartUPS v/s 650 and broken code in ApcSmartUpsDriver::get_capabilities

Package:
apcupsd
Source:
apcupsd
Description:
APC UPS Power Management (daemon)
Submitter:
Ondrej Zary
Date:
2023-07-02 20:15:04 UTC
Severity:
normal
#1040177#5
Date:
2023-07-02 20:13:54 UTC
From:
To:
Dear Maintainer,
there are old bugs in apcupsd preventing it from getting almost any data from SmartUPS v/s 650:
# apcaccess
APC      : 001,018,0451
DATE     : 2023-07-02 19:43:10 +0200
HOSTNAME : router
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : router
CABLE    : Custom Cable Smart
DRIVER   : APC Smart UPS (any)
UPSMODE  : Stand Alone
STARTTIME: 2023-07-02 19:35:08 +0200
STATUS   : ONLINE
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000008
END APC  : 2023-07-02 19:43:41 +0200

It used to work long ago. I already posted patches here but upstream does not care:
https://sourceforge.net/p/apcupsd/mailman/apcupsd-users/thread/202007312117.55508.linux@zary.sk/#msg37074883

Can they be applied to the Debian package?

After patches applied:
# apcaccess
APC      : 001,025,0603
DATE     : 2023-07-02 21:50:53 +0200
HOSTNAME : router
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : router
CABLE    : Custom Cable Smart
DRIVER   : APC Smart UPS (any)
UPSMODE  : Stand Alone
STARTTIME: 2023-07-02 21:50:47 +0200
MODEL    : Smart-UPS v/s 650
STATUS   : ONLINE
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000008
REG1     : 0x00
REG2     : 0x00
REG3     : 0x00
FIRMWARE : 62.J.I
END APC  : 2023-07-02 21:51:21 +0200