The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,721 other followers

Some notes on apcupsd, a SUA3000XLI and a SUA48XLBP battery pack

Posted by jpluimers on 2016/08/22

I’ve had a SUA3000XLI for years using the USB cable and default Windows support as PowerChute Personal Edition would fail to recognise it and abort installation (so I could not use APC drivers as described on youtube).

A while ago, Liander – the energy distribution company – wanted to replace both the gas and electricity meters to become “smart” during day time. The server configuration load was heavy enough for Windows to indicate the UPS would last about 30 minutes. At night that’s not much of a problem but during 1 hour replacement day-time it would be a problem.

So I bought a SUA48XLBP battery pack (and a SUA039 cable as the cable wasn’t long enough to keep an inch or so air space between UPS and battery pack) so the battery would last about 3 times as long.

Windows would still show it would last about 30 minutes. Strange. So I started looking around and it appeared the SUA3000XLI needed calibration which requires PowerChute. Since PowerChute won’t work, I was almost back at square 1. Almost, as I know knew it required calibration.

In the past I had come across apcupcd but that was a long time ago when it supported a limited set of operating systems and a limited set of features so I never installed it.

But when searching how to calibrate the without using PowerChute, it quickly appeared that the apctest part of apcupsd can do just that: soft calibrate the UPS/battery combo. There are some steps and prerequisites (the most important ones are to turn off the apcupsd and provide enough load and 100% battery charge at start).

Spoiler: the combined UPS/battery-pack now lasts for almost 2 hours which is long enough.

Installing apcupsd

I’m describing this from a Windows perspective and it’s dead easy:

  1. download the latest release
  2. run the installer
  3. allow the driver to be installed
    1. indicate it’s OK to install an unsigned driver
    2. now Windows won’t recognise the UPS any more, but in a few steps the apcupsd and helper program will
  4. update the configuration file (no changes needed when it’s a USB connected one)
  5. wait for the service to start
  6. wait for the apctray helper program to start
  7. look in the “system tray” for apctray helper program icon 
  8. optionally configure your system to auto-start apctray after logon

The USB connection to the UPS delivers slightly less options than using a serial cable

Using a serial cable instead of a USB one

Few PCs have COM ports any more, so most people will use USB to serial conversion cable instead. Virtually all of these have either of these chipsets (lists are not exhaustive but give an OK indication):

  • Prolific PL-2303HXA and PL-2303X, PL2303SA, PL2303TA, PL2303TB, PL2303HXD, PL2303EA, PL2303RA and PL2305
  • FTDI FT232BM, FT245BM, FT2232C, FT2232D, FT245R, FT232H, FT231X and FT230X
  • Silabs CP2101, CP2102, CP2103, CP2104, CP2105, CP2108, CP2109, CP2110, CP2112, CP2114, CP2130 and CP2614

Some of these have versions not supported on newer (Windows 8 and higher) versions any more, or can be counterfeit chips some documented for instance:

Then there are KeySpan adapters which are too different to even start using: Hacking the Keyspan USB Serial Adaptor

If you really want to go the USB-to-Serial cable way, use these 5 Steps for Selecting the Right USB to Serial adapter or experiences from Does anyone know of a USB > RS232 adapter that DOESN’T suck under Win7/64? – Ars Technica OpenForum

Since my stock of USB-to-serial cables all are Prolific 2301 based, so for now I just gave up and used an old Windows 2003/XP/7 era VM to do the configuration.

In the future, I might want to use an open source driver like libFTDI » FTDI USB driver with bitbang mode (which works on Windows, Linux, BSD and OS X)

The serial cables I had

Table below partially based on Cables/part numbers….. | Smart-UPS & Symmetra LX / RM

None of the cables that fitted would work. Probably because I used the USB cable first (I disconnected it before testing the serial cables). To be continued…

Uninstalling the native Windows UPS support

This is the same as Microsoft Windows XP – Remove an Uninterruptible Power Supply (UPS) device:

  1. Open Power Options in Control Panel.
  2. On the UPS tab, click Select.
  3. In the UPS Selection dialog box, under Select manufacturer, click None.
  4. Shut down the computer and remove the UPS device.

Using apcupsd

APC Smart UPS settings over a USB cable

APC Smart UPS settings over a USB cable

The apctray helper program shows you all the settings (see the graph on the right).

With apcccess, you can get the same settings in text format:

APC      : 001,043,1008
DATE     : 2016-06-19 09:03:16 +0100
HOSTNAME : msmxp
VERSION  : 3.14.14 (31 May 2016) mingw
UPSNAME  : msmxp
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-06-18 16:29:27 +0100
MODEL    : Smart-UPS 3000 XL
STATUS   : ONLINE
LINEV    : 226.0 Volts
LOADPCT  : 25.3 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 113.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 226.0 Volts
SENSE    : High
DWAKE    : -1 Seconds
DSHUTD   : 180 Seconds
LOTRANS  : 208.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 15.0 Percent
ITEMP    : 23.4 C
ALARMDEL : 30 Seconds
BATTV    : 54.5 Volts
LINEFREQ : 50.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 14 days
STATFLAG : 0x05000008
MANDATE  : 2007-08-03
SERIALNO : JS0731016248
BATTDATE : 2007-08-03
NOMOUTV  : 230 Volts
NOMBATTV : 48.0 Volts
FIRMWARE : 691.17.I USB FW:7.3
END APC  : 2016-06-19 09:03:36 +0100

There are still a few things I need to find out

The manual initiation of both a test and calibration from apctest seem to have issues:

  • “Perform self-test” results in “TEST DID NOT COMPLETE”
  • “Perform battery calibration” does not complete
  • There is no EXTBATTS listed in the above setting but I think the SUA48XLBP should be identified as such

A few links that should help me to get going:

I also need to checkout how to do network configuration. In the past this was called master/slave configuration, but now it’s called NIS Server/Client. But that doesn’t support ESXi.

These are all things the standard Windows APC UPS support cannot do so I’m already glad I installed apcupsd: at least the TIMELEFT value is now correct and I have pointers solving/setting up other things.

–jeroen

Notes to self:

One Response to “Some notes on apcupsd, a SUA3000XLI and a SUA48XLBP battery pack”

  1. […] I tried updating my downloads for my APC7920 and APC7921 PDUs. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: