Serial (COM port) to USB cable for old APC UPS

Firstly find and buy cable on aliexpress by keywords «APC Smart UPS DB9, CP2102, USB RS232, serial 9 D-Sub, cable 940-0024C, Windows 7/8/10, Mac, Linux».

After that you need install apcupsd tools.

Run command:

# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Change or create new file (by root user) /etc/udev/rules.d/local.rules:

#Bus 001 Device 002: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="10c4", ENV{ID_MODEL_ID}=="ea60", SYMLINK+="apc-usb"

Change config /etc/apcupsd/apcupsd.conf

UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/apc-usb

And fix line in file /etc/default/apcupsd on:

ISCONFIGURED=yes

Reboot system. On success you can see this (STATUS: ONLINE) for apcaccess command:

# apcaccess 
APC      : 001,048,1097
DATE     : 2023-02-20 20:15:42 +0300  
HOSTNAME : on
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : UPS_IDEN
CABLE    : Custom Cable Smart
DRIVER   : APC Smart UPS (any)
UPSMODE  : Stand Alone
STARTTIME: 2023-02-20 20:00:10 +0300  
MODEL    : Smart-UPS SC620 
STATUS   : ONLINE 
LINEV    : 240.4 Volts
LOADPCT  : 9.1 Percent
BCHARGE  : 68.0 Percent
TIMELEFT : 54.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 240.4 Volts
MINLINEV : 236.1 Volts
OUTPUTV  : 240.4 Volts
SENSE    : High
DWAKE    : 0 Seconds
DSHUTD   : 60 Seconds
DLOWBATT : 2 Minutes
LOTRANS  : 208.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 0.0 Percent
ALARMDEL : 5 Seconds
BATTV    : 13.6 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x05000008
REG1     : 0x00
REG2     : 0x00
REG3     : 0x00
MANDATE  : 03/20/07
SERIALNO : 3S0712X04316
BATTDATE : 03/20/07
NOMOUTV  : 230 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 726.1.I
END APC  : 2023-02-20 20:16:01 +0300

PS: thanks a lot for clue from Thermionix gist on github: gist.github.com.