April 22, 201511 yr unRAID OS Version: 6.0b15 Description: UPS Status is all wrong after applying new settings How to reproduce: Open the UPS Settings page from the Settings Screen Hit Apply (Not necessary to modify any setting) Expected results: Status Line: Status: Running UPS: Online Battery Charge: 100.0% Time Left: 15.6 Minutes Nominal: 400 Watts Load: 156 Watts Load %: 39.0 Percent Actual results: Status Line: Status: Running UPS: MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STATFLAG : 0x05000000 END APC : 2015-04-23 04:51:12 +0800 Other information: The UPS Status section contains: APC : 001,017,0424 DATE : 2015-04-23 04:51:12 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-23 04:51:12 +0800 STATUS : MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STATFLAG : 0x05000000 END APC : 2015-04-23 04:51:12 +0800
April 23, 201511 yr Get to a command line and type the following: /sbin/apcaccess > status.txt This is the command used to get the UPS status. The command will save the output to a text file called status.txt. Post the status.txt file here so we can compare the output. The apc status just puts the output from this command into the webgui. There may be an issue displaying some of the text from that output.
April 23, 201511 yr I'm wondering why there is so much info missing from the full status - my CS650 produces: APC : 001,046,1110 DATE : 2015-04-24 07:17:13 +0800 HOSTNAME : director VERSION : 3.14.13 (02 February 2015) unknown UPSNAME : director CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 1970-01-01 08:00:19 +0800 MODEL : Back-UPS CS 650 STATUS : ONLINE LINEV : 244.0 Volts LOADPCT : 6.0 Percent BCHARGE : 100.0 Percent TIMELEFT : 36.4 Minutes MBATTCHG : 5 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds OUTPUTV : 230.0 Volts SENSE : Low DWAKE : 0 Seconds DSHUTD : 0 Seconds LOTRANS : 160.0 Volts HITRANS : 278.0 Volts RETPCT : 0.0 Percent ITEMP : 29.2 C ALARMDEL : 30 Seconds BATTV : 13.5 Volts LINEFREQ : 60.0 Hz LASTXFER : Low line voltage NUMXFERS : 9 XONBATT : 2015-04-24 04:00:40 +0800 TONBATT : 0 Seconds CUMONBATT: 16012 Seconds XOFFBATT : 2015-04-24 04:17:17 +0800 SELFTEST : NO STESTI : None STATFLAG : 0x05000008 MANDATE : 2009-10-24 SERIALNO : 4B0943P51970 BATTDATE : 2012-04-04 NOMOUTV : 230 Volts NOMINV : 230 Volts NOMBATTV : 12.0 Volts NOMPOWER : 400 Watts FIRMWARE : 817.v4.I USB FW:v4 END APC : 2015-04-24 07:18:03 +0800 What do you see if you type "apcaccess" at the command line? Edit: In particular, the STATUS information, reported by the UPS is blank, hence the next line (MBATTCHG) is being shown as the UPS status. Most other information which apcupsd tries to report is missing. Are you sure that your usb connection is still good? Edit 2 Ah, I see that you're also in Philippines - that makes at least three of us!
April 24, 201511 yr Author The USB connection is 100% ok. Why and how do I know? The error I posted only occurs when I update the UPS settings. simply opening the page, or even refreshing, reloading returns the correct and expected response. Only when I hit apply (presumably to update some setting, but that is not even necessary) and apcupsd is restarted (by the page) do I get the weird response Running apcaccess (or the looking at the status page normally) gives: APC : 001,046,1116 DATE : 2015-04-24 08:35:59 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware UPSNAME : MediaStore CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-23 04:51:12 +0800 MODEL : Back-UPS CS 650 STATUS : ONLINE LINEV : 220.0 Volts LOADPCT : 30.0 Percent BCHARGE : 100.0 Percent TIMELEFT : 19.0 Minutes MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds OUTPUTV : 230.0 Volts SENSE : Medium DWAKE : 0 Seconds DSHUTD : 0 Seconds LOTRANS : 180.0 Volts HITRANS : 266.0 Volts RETPCT : 0.0 Percent ITEMP : 29.2 C ALARMDEL : 30 Seconds BATTV : 13.6 Volts LINEFREQ : 60.0 Hz LASTXFER : Low line voltage NUMXFERS : 1 XONBATT : 2015-04-23 22:02:25 +0800 TONBATT : 0 Seconds CUMONBATT: 1 Seconds XOFFBATT : 2015-04-23 22:02:26 +0800 SELFTEST : NO STESTI : None STATFLAG : 0x05000008 MANDATE : 2012-08-03 SERIALNO : 3B1231X26620 BATTDATE : 2012-08-03 NOMOUTV : 230 Volts NOMINV : 230 Volts NOMBATTV : 12.0 Volts NOMPOWER : 400 Watts FIRMWARE : 817.v9.I USB FW:v9 END APC : 2015-04-24 08:36:07 +0800
April 24, 201511 yr UPS devices lack standardization, so different devices report data points differently.
April 24, 201511 yr The error I posted only occurs when I update the UPS settings. simply opening the page, or even refreshing, reloading returns the correct and expected response. Only when I hit apply (presumably to update some setting, but that is not even necessary) and apcupsd is restarted (by the page) do I get the weird response I had already tried changing one of my settings, clicking 'Apply', and then looking at the UPS Status tab. I don't experience the problem you are reporting. Have you tried removing all plugins? Are you sure that you don't have anything left over from the old apcupsd plugin
April 24, 201511 yr Author hmm. it might actually be a cache issue. I tried from another pc, and that issue didn't appear at all. Thanks. I'll mark this issue solved. EDIT: Flushing the cache didn't work so I took a better look at the plugin code. Then I figured it out. There is a race condition on my machine when apcupsd is restarted during the settings apply and the page is reloaded after the restart. Steps taken: In one SSH terminal # while true; do apcaccess; done | tee /tmp/apclog In another SSH terminal /etc/rc.d/rc.apcupsd restart Inspecting the log gave me: APC : 001,045,1053 DATE : 2015-04-24 19:41:19 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware UPSNAME : MediaStore CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-24 19:37:12 +0800 MODEL : Back-UPS CS 650 STATUS : ONLINE LINEV : 220.0 Volts LOADPCT : 34.0 Percent BCHARGE : 100.0 Percent TIMELEFT : 17.2 Minutes MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds OUTPUTV : 230.0 Volts SENSE : Medium DWAKE : 0 Seconds DSHUTD : 0 Seconds LOTRANS : 180.0 Volts HITRANS : 266.0 Volts RETPCT : 0.0 Percent ITEMP : 29.2 C ALARMDEL : 30 Seconds BATTV : 13.6 Volts LINEFREQ : 59.0 Hz LASTXFER : Low line voltage NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A SELFTEST : NO STESTI : None STATFLAG : 0x05000008 MANDATE : 2012-08-03 SERIALNO : 3B1231X26620 BATTDATE : 2012-08-03 NOMOUTV : 230 Volts NOMINV : 230 Volts NOMBATTV : 12.0 Volts NOMPOWER : 400 Watts FIRMWARE : 817.v9.I USB FW:v9 END APC : 2015-04-24 19:41:20 +0800 APC : 001,017,0424 DATE : 2015-04-24 19:41:23 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-24 19:41:23 +0800 STATUS : MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STATFLAG : 0x05000000 END APC : 2015-04-24 19:41:23 +0800 APC : 001,017,0424 DATE : 2015-04-24 19:41:23 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-24 19:41:23 +0800 STATUS : MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STATFLAG : 0x05000000 END APC : 2015-04-24 19:41:23 +0800 ..snip... APC : 001,041,0881 DATE : 2015-04-24 19:41:23 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-24 19:41:23 +0800 MODEL : STATUS : LINEV : 0.0 Volts LOADPCT : 0.0 Percent BCHARGE : 0.0 Percent TIMELEFT : 0.0 Minutes MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds OUTPUTV : 0.0 Volts SENSE : Unknown DWAKE : -1 Seconds DSHUTD : -1 Seconds LOTRANS : -1.0 Volts HITRANS : -1.0 Volts RETPCT : -1.0 Percent ITEMP : 0.0 C ALARMDEL : Always BATTV : 0.0 Volts LINEFREQ : 0.0 Hz NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STESTI : -1 STATFLAG : 0x05000000 MANDATE : SERIALNO : BATTDATE : NOMOUTV : -1 Volts NOMINV : 0 Volts NOMBATTV : 0.0 Volts NOMPOWER : 0 Watts END APC : 2015-04-24 19:41:24 +0800 APC : 001,045,1053 DATE : 2015-04-24 19:41:27 +0800 HOSTNAME : MediaStore VERSION : 3.14.13 (02 February 2015) slackware UPSNAME : MediaStore CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2015-04-24 19:41:23 +0800 MODEL : Back-UPS CS 650 STATUS : ONLINE LINEV : 220.0 Volts LOADPCT : 33.0 Percent BCHARGE : 100.0 Percent TIMELEFT : 17.6 Minutes MBATTCHG : 7 Percent MINTIMEL : 5 Minutes MAXTIME : 0 Seconds OUTPUTV : 230.0 Volts SENSE : Medium DWAKE : 0 Seconds DSHUTD : 0 Seconds LOTRANS : 180.0 Volts HITRANS : 266.0 Volts RETPCT : 0.0 Percent ITEMP : 29.2 C ALARMDEL : 30 Seconds BATTV : 13.6 Volts LINEFREQ : 59.0 Hz LASTXFER : Low line voltage NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A SELFTEST : NO STESTI : None STATFLAG : 0x05000008 MANDATE : 2012-08-03 SERIALNO : 3B1231X26620 BATTDATE : 2012-08-03 NOMOUTV : 230 Volts NOMINV : 230 Volts NOMBATTV : 12.0 Volts NOMPOWER : 400 Watts FIRMWARE : 817.v9.I USB FW:v9 END APC : 2015-04-24 19:41:27 +0800 So in my system there's about 4sec delay before apcaccess returns any meaningful stuff during which the UI will return a crazy value. When I said it seemed to be ok previously - I was accessing it over a VPN, which was a tad slow and might have allowed the apcaccess to be invoked much later on Oh well, its just a minor quibble, but it might scare new users. I think it's best to consider this a defect
Archived
This topic is now archived and is closed to further replies.