I have APCUPSD installed on a computer with 2 physical serial ports. The UPS is an APC SUA1000 with a serial port. I have the APC smart serial cable connected to COM1, and COM2 going to another computer.
ls -l /dev/ttyS*
reports ttyS0 all of the way up to ttyS31. I have tried literally every one of those ports to no avail.
/etc/default/apcupsd
# Defaults for apcupsd initscript
# Apcupsd-devel internal configuration
APCACCESS=/sbin/apcaccess
ISCONFIGURED=yes
UPSCABLE=smart
UPSTYPE=smartups
UPSMODE=disable
DEVICE=/dev/ttyS1
ACCESS=false
ANNOY=240
PROCFS=1
LOGGING=1
BATTERYLEVEL=15
SENSITIVITY=M
WAKEUP=60
LOTRANSFER=100
HITRANSFER=130
RETURNCHARGE=10
BEEPSTATE=L
UPSNAME=TechRm
/var/log/apcupsd.events:
2018-01-14 12:47:38 -0600 apcupsd error shutdown completed
2018-01-14 12:48:00 -0600 apcupsd 3.14.12 (29 March 2014) debian startup succeeded
2018-01-14 12:48:11 -0600 apcupsd FATAL ERROR in smartsetup.c at line 155
PANIC! Cannot communicate with UPS via serial port.
Please make sure the port specified on the DEVICE directive is correct,
and that your cable specification on the UPSCABLE directive is correct.
2018-01-14 12:48:11 -0600 apcupsd error shutdown completed
2018-01-14 12:48:27 -0600 apcupsd 3.14.12 (29 March 2014) debian startup succeeded
2018-01-14 12:48:38 -0600 apcupsd FATAL ERROR in smartsetup.c at line 155
PANIC! Cannot communicate with UPS via serial port.
Please make sure the port specified on the DEVICE directive is correct,
and that your cable specification on the UPSCABLE directive is correct.
2018-01-14 12:48:38 -0600 apcupsd error shutdown completed
/etc/apcupsd.conf:
UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/ttyS2
POLLTIME 10
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 6
BATTERYLEVEL 15
MINUTES 3
TIMEOUT 0
ANNOY 120
ANNOYDELAY 0
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 5
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0
BATTDATE 01/12/18
SENSITIVITY M
WAKEUP 60
LOTRANSFER 100
HITRANSFER 130
RETURNCHARGE 10
BEEPSTATE L
LOWBATT 0
OUTPUTVOLTS 120
SELFTEST 336
Full configuration file (with comments) on Pastebin
Running apcaccess
also fails with a 'connection refused' error. Yes, I have edited my /etc/hosts
file to correct the localhost... thing.
I'm stumped. Can anyone help please?
OS: Ubuntu Server 16.04.3 i386.