Solved APCUPSD problems

fullauto2012

Active Member

Reaction score: 26
Messages: 171

Installed FreeBSD 10.1 and am currently trying to get a UPS running.

root@Washington:/usr/local/etc/apcupsd # uname -Kmi
Code:
amd64 GENERIC 1001000

root@Washington:/usr/local/etc/apcupsd # cat apcupsd.conf
Code:
## apcupsd.conf v1.1 ##
UPSNAME APC01
UPSTYPE usb
DEVICE /dev/ugen0
LOCKFILE /var/spool/lock
UPSCLASS standalone
UPSMODE disable

root@Washington:/usr/local/etc/apcupsd # apcaccess status
Code:
APC      : 001,018,0449
DATE     : 2015-10-31 15:20:44 -0400
HOSTNAME : Washington
VERSION  : 3.14.13 (02 February 2015) freebsd
UPSNAME  : APC01
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2015-10-31 15:20:12 -0400
STATUS   : COMMLOST
MBATTCHG : 10 Percent
MINTIMEL : 5 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000100
END APC  : 2015-10-31 15:20:44 -0400
After about 60 seconds I get:
Code:
Broadcast Message from tim.falardeau@Washington
        (no tty) at 15:21 EDT...

Communications with UPS lost.
And when I shut down the service and run apctest I get:

root@Washington:/usr/local/etc/apcupsd # apctest
Code:
2015-10-31 15:23:53 apctest 3.14.13 (02 February 2015) freebsd
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
apctest FATAL ERROR in apctest.c at line 321
Unable to open UPS device.
  If apcupsd or apctest is already running,
  please stop it and run this program again.
apctest error termination completed
Anyone willing to tell me what I'm doing wrong?
I've been searching Google for days.
Kinda at my wits end.
 
OP
OP
fullauto2012

fullauto2012

Active Member

Reaction score: 26
Messages: 171

GREAT !

I got in. However none of the test seem to work beside the power off test, which I cannot run until I am BIS (Butt In Seat) tomorrow...
Any other wisdom? This is my first use of apsupsd.

Also, I was wondering if you could clarify something. In order to use the Master/Slave config it said I must use NIS. But, they are unclear about it...
Am I understanding it right by thinking that apsupsd has a built in NIS server/client that will run when configured properly?
 

wblock@

Beastie Himself
Developer

Reaction score: 3,652
Messages: 13,850

apctest only works when apcupsd is not running. Otherwise, it might depend on the model of UPS.

Yes, master/slave is built in.
 
OP
OP
fullauto2012

fullauto2012

Active Member

Reaction score: 26
Messages: 171

I did service apcupsd stop before I ran apctest.
keeps reporting
Code:
I don't know how to run a self test on your UPS
or your UPS does not support self test.
...when I try to execute the self test as well as any others beside the power-down test.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,652
Messages: 13,850

Still waiting to hear which model of UPS this is...

Here is an abbreviated version of my apcupsd.conf:
Code:
UPSNAME example
UPSCABLE usb
UPSTYPE usb
Everything else is left as defaults.
 
OP
OP
fullauto2012

fullauto2012

Active Member

Reaction score: 26
Messages: 171

Here is my output:

root@Jefferson:/usr/local/etc/apcupsd # apcaccess status
Code:
APC      : 001,027,0704
DATE     : 2015-11-01 21:05:17 -0500
HOSTNAME : Jefferson
VERSION  : 3.14.13 (02 February 2015) freebsd
UPSNAME  : APC01
CABLE    : Ethernet Link
DRIVER   : NETWORK UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2015-11-01 21:05:17 -0500
MASTERUPD: 2015-11-01 21:05:17 -0500
MASTER   : 192.168.1.10:3551
MODEL    : Smart-UPS C 1000
STATUS   : ONLINE SLAVE
BCHARGE  : 100.0 Percent
TIMELEFT : 57.0 Minutes
MBATTCHG : 15 Percent
MINTIMEL : 7 Minutes
MAXTIME  : 0 Seconds
BATTV    : 27.3 Volts
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000408
SERIALNO : 3S1530X09017
NOMBATTV : 24.0 Volts
FIRMWARE : UPS 10.0 / ID=1005
END APC  : 2015-11-01 21:05:23 -0500
Everything is working well now. I'll find out if everything is REALLY working tomorrow when I pull the plug!

It seems the model I have does not perform apctest except the Power-Down Test...

Again... Thank you for the help.
This is why I choose FreeBSD.
The community is tops.
 
Last edited by a moderator:

wblock@

Beastie Himself
Developer

Reaction score: 3,652
Messages: 13,850

It's odd that it would not do the test, although that is the newer type. There was a whole thing where APC decided they wanted to make their control protocol secret and proprietary. People were advised to avoid those (SMT?) UPSes. Then I think APC gave up and released some specs on their new protocol. It's possible they are not as well supported as the older units. Mine is a Smart-UPS 1500, still my favorite UPS.
 
Top