Blog History

February 6, 2019

FreePBX apcupsd Cyberpower

In my previous blog post, I was able to get a APC UPS to link up to FreePBX successfully. Although not officially supported, I got Cyberpower to work as well. We normally buy APC for this purpose, but we had a spare Cyberpower laying around. Initially, I got a COMMLOST status: 

apcaccess status
APC      : 001,018,0456
DATE     : 2019-02-06 13:41:46 -0700
HOSTNAME : _______
VERSION  : 3.14.14 (31 May 2016) redhat
UPSNAME  : Cyberpower UPS
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2019-02-06 13:41:06 -0700
STATUS   : COMMLOST
MBATTCHG : 5 Percent
MINTIMEL : 2 Minutes
MAXTIME  : 120 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000100
END APC  : 2019-02-06 13:41:46 -0700
Broadcast message from root@______(Wed Feb  6 13:42:16 2019): Warning communications lost with UPS Cyberpower UPS

After toggling the enable button in the GUI, it came back and reported correctly. Monitored for 5 minutes and it stayed online. Good news. 

apcaccess status
APC      : 001,032,0763
DATE     : 2019-02-06 13:48:47 -0700
HOSTNAME : ________
VERSION  : 3.14.14 (31 May 2016) redhat
UPSNAME  : Cyberpower UPS
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2019-02-06 13:47:52 -0700
MODEL    : UPS OR700
STATUS   : ONLINE
LINEV    : 124.0 Volts
LOADPCT  : 15.0 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 59.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 2 Minutes
MAXTIME  : 120 Seconds
OUTPUTV  : 123.0 Volts
DWAKE    : -1 Seconds
LOTRANS  : 90.0 Volts
HITRANS  : 140.0 Volts
ALARMDEL : 30 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : ??
STATFLAG : 0x05000008
SERIALNO : 000000000000
NOMINV   : 120 Volts
NOMPOWER : 400 Watts
END APC  : 2019-02-06 13:48:49 -0700

Some info from https://wiki.freepbx.org/display/FPG/System+Admin+-+UPS+Server:
On Battery Delay Time
The time, in seconds, from when a power failure is detected until the system reacts to it with an "on battery" event.
Battery Minimum Level
If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to the Battery Minimum Level set here, the system will initiate a shutdown.
Minimum Runtime Remaining
If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to Minimum Runtime Remaining set here, the system will initiate a shutdown.
Timeout
If during a power failure, the UPS has run on batteries for longer than this setting, the system will initiate a shutdown. A value of 0 disables this timer.

I set the Timeout to 2 minutes just to be safe since I'm not sure if the Remaining Runtime will be reported correctly since it's an unsupported brand. It's a production machine for a client so I can't do any testing. Better have it shut down sooner than needed than have a corrupted database.

No comments:

Post a Comment