@akajester FINAL UPDATE(see below)…First let me say how fantastic your post is…never would have even tried this without this detailed how to! Nice work!
Anyway…I have my Rpi 3 b+ up and running with Raspbian and after following your proceedure I have come to a halt at the point of:
The output included the below:
Unpacking apcupsd-doc (3.14.14-2) ...
Selecting previously unselected package s-nail.
Preparing to unpack .../s-nail_14.9.11-2_armhf.deb ...
Unpacking s-nail (14.9.11-2) ...
Setting up apcupsd (3.14.14-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/apcupsd.service → /lib/systemd/system/apcupsd.service.
Setting up s-nail (14.9.11-2) ...
Setting up apcupsd-doc (3.14.14-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u1+rpi1) ...
pi@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Just to confirm the pi is connected to my APC SmartUPS 3000XL via a RS232 (9 pin) serial cable (Part No: 940-0024) which is connected to a RS232 to USB serial adaptor. The output above seems to confirm that the RS232 to USB serial adaptor is detected by the pi but that the UPS is not communicating it seems? Could this be because the serial adaptor (although detected) does not have the necessary driver installed on the pi?
If that is likely how do I ensure the driver is installed? I am a reasonably new player on these but know enough to get up and running to this point. I have searched for answers but not sure I was able to come up with relavent search terms for this problem.
Out of interest I plugged in my FTDI that I use to flash my devices (with Tasmota etc) and the below output was observed after running “lsusb” command:
pi@raspberrypi:~ $ lsusb
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
So it seems (the pi) does recognise the FTDI device also but does that also indicate the driver is in place as well? My guess is no?
To be clear…the FTDI was just plugged in to the pi USB and nothing else was connected to it.
New Update:
Look here for advice that works to setup the usb-serial device: https://www.raspberrypi.org/forums/viewtopic.php?t=146215
[91774.230653] usb 1-1.3: New USB device found, idVendor=0557, idProduct=2008, bcdDevice= 3.00
[91774.230670] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[91774.230679] usb 1-1.3: Product: USB-Serial Controller D
[91774.230689] usb 1-1.3: Manufacturer: Prolific Technology Inc.
[91774.233044] pl2303 1-1.3:1.0: pl2303 converter detected
[91774.240321] usb 1-1.3: pl2303 converter now attached to ttyUSB0
It seems USB now attached to ttyUSB0.
So I moved on to try to setup the config files but I may be on the wrong track and got loads of errors after editing the config files to use a smart cable.
So…I set the config all back to default and tried the command “sudo apcaccess”
pi@raspberrypi:~ $ sudo apcaccess
APC : 001,017,0426
DATE : 2019-11-19 16:50:40 +1000
HOSTNAME : raspberrypi
VERSION : 3.14.14 (31 May 2016) debian
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2019-11-19 16:50:13 +1000
STATUS : COMMLOST
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000100
END APC : 2019-11-19 16:50:40 +1000
It seems from the above I have the USB Driver setup and now the software is looking through the USB serial device and knows its not connected??? Maybe?
So anyone have an idea how I should configure this?
I am leaning towards it being configured as a USB cable as it is using the RS232 (9 pin) serial cable (Part No: 940-0024) which is connected to a RS232 to USB serial adaptor? In essence its a USB connected UPS right?
Does that sound feasible?
I’ll have a crack at that and report back if I make any progress.
FINAL UPDATE Well it can be done but the documentation is scattered for the full answer I believe.
First Source: APCUPSD User Manual
Also: [SOLVED] UPS setup on USB port/stty and via AP9716 Network Card ? - General Support - Unraid
Plus read the reply to that post which is just below it in the forum.
If you don’t want to buy a cable build it from this design: APCUPSD User Manual
To ensure your USB to serial converter is setup look here: https://www.raspberrypi.org/forums/viewtopic.php?t=146215
And for the full configuration advice: APCUPSD User Manual and then refer to the initial fantastic post above for bringing it all together!
My output is:
APC : 001,051,1144
DATE : 2019-11-20 17:13:14 +1000
HOSTNAME : raspberrypi
VERSION : 3.14.14 (31 May 2016) debian
UPSNAME : WellsUps
CABLE : Custom Cable Smart
DRIVER : APC Smart UPS (any)
UPSMODE : Stand Alone
STARTTIME: 2019-11-20 16:57:43 +1000
MODEL : SMART-UPS 3000 RM XL
STATUS : ONLINE
LINEV : 243.1 Volts
LOADPCT : 5.2 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 116.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
MAXLINEV : 245.7 Volts
MINLINEV : 240.5 Volts
OUTPUTV : 243.1 Volts
SENSE : High
DWAKE : 0 Seconds
DSHUTD : 20 Seconds
DLOWBATT : 2 Minutes
LOTRANS : 196.0 Volts
HITRANS : 253.0 Volts
RETPCT : 0.0 Percent
ITEMP : 34.2 C
ALARMDEL : 5 Seconds
BATTV : 55.0 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI : 336
STATFLAG : 0x05000008
DIPSW : 0x00
REG1 : 0x00
REG2 : 0x00
REG3 : 0x00
MANDATE : 09/24/05
SERIALNO : QS0539320307
BATTDATE : 09/24/05
NOMOUTV : 230 Volts
NOMBATTV : 48.0 Volts
EXTBATTS : 0
FIRMWARE : 93.14.I
END APC : 2019-11-20 17:13:51 +1000
Cheers to everyone here for being part of this wonderful community!