0

I just received an APC Back-UPS and wanted to have email notification during a power outage and a system shutdown before the battery dies. I have simulated a power outage by disconnecting the main power line but I do not receive an email because it is showing that power is back before the email is sent out, even though the power is still disconnected. Any idea why apcupsd is stating that power is back every 3-4 seconds even though it isn't?

Thanks in advance!

#tail apcupsd.events
2016-10-01 03:28:42 -0700  Power failure.
2016-10-01 03:28:45 -0700  Power is back. UPS running on mains.
2016-10-01 03:28:50 -0700  Power failure.
2016-10-01 03:28:55 -0700  Power is back. UPS running on mains.
2016-10-01 03:28:55 -0700  Power failure.
2016-10-01 03:29:00 -0700  Power is back. UPS running on mains.
2016-10-01 03:29:00 -0700  Power failure.
2016-10-01 03:29:04 -0700  Power is back. UPS running on mains.
2016-10-01 03:29:19 -0700  Power failure.
2016-10-01 03:29:19 -0700  Power is back. UPS running on mains.

# apcaccess status
APC      : 001,036,0896
DATE     : 2016-10-02 09:22:09 -0700
HOSTNAME : web01-fd
VERSION  : 3.14.12 (29 March 2014) redhat
UPSNAME  : homeups1
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-10-01 02:54:19 -0700
MODEL    : Back-UPS ES 750G
STATUS   : ONLINE
LINEV    : 122.0 Volts
LOADPCT  : 9.0 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 63.6 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 5 Minutes
MAXTIME  : 0 Seconds
SENSE    : Low
LOTRANS  : 0.0 Volts
HITRANS  : 0.0 Volts
ALARMDEL : 30 Seconds
BATTV    : 13.8 Volts
LASTXFER : Low line voltage
NUMXFERS : 39
XONBATT  : 2016-10-01 03:29:19 -0700
TONBATT  : 0 Seconds
CUMONBATT: 183 Seconds
XOFFBATT : 2016-10-01 03:29:19 -0700
SELFTEST : ??
STATFLAG : 0x05000008
SERIALNO : 4B1625P18558
BATTDATE : 1980-00-00
NOMINV   : 0 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 908.W4 .D USB FW:W4
END APC  : 2016-10-02 09:22:45 -0700
JT Fair
  • 1
  • 3
  • `apcupsd` can dump full status of the UPS so you can see the voltages at least. Most APC UPSes are supplied with predefined low and high critical voltages that can cause swithching to the batteries. W/o full status no further analysis can be done. – Kondybas Oct 01 '16 at 11:32
  • Sorry I should have included that to begin with. Edited to include status output. – JT Fair Oct 02 '16 at 16:28
  • Show your config too. – Kondybas Oct 02 '16 at 18:41

2 Answers2

1

You have to change LOTRANS and HITRANS parameters to some more reasonable values. Their meaning is simple: if wall voltage is in the range LOTRANS-HITRANS volts UPS tries to use autotransformator to keep output 130V and goes to the batteries otherwise.

By default LOTRANS and HITRANS are set to the 85V and 135V respectively. You have set them both to zeroes. UPS see that wall voltage is out of the range 0-0 volts, and therefore goes to batteries. Next step UPS see that wall voltage is ok and turn back to normal operation. Next step wall voltage is out of the range and so forth.

Kondybas
  • 6,964
  • 2
  • 20
  • 24
0

Thanks Kondybas for posting that solution.

The default configs had those parameters commented out. I have set them to 85 and 135 respectively as you recommended and I am now receiving emails when I pull power.

vim apcupsd.conf
  LOTRANSFER 85
  HITRANSFER 135
tail -f /var/log/apcupsd.events
  2016-10-03 13:35:46 -0700  Power failure.
  2016-10-03 13:35:52 -0700  Running on UPS batteries.
  2016-10-03 13:36:38 -0700  Mains returned. No longer on UPS batteries.
  2016-10-03 13:36:38 -0700  Power is back. UPS running on mains.
JT Fair
  • 1
  • 3