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:

download the latest release

run the installer

allow the driver to be installed

indicate it’s OK to install an unsigned driver

now Windows won’t recognise the UPS any more, but in a few steps the apcupsd and helper program will

update the configuration file (no changes needed when it’s a USB connected one)

wait for the service to start

wait for the apctray helper program to start

look in the “system tray” for apctray helper program icon 

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:

PL2303 Windows Driver Download (WayBack machine doesn’t always show the archived page): NOTE:Windows 8/8.1/10 are NOT supported in PL-2303HXA and PL-2303X EOL chip versions

GUC232A Windows 8/8.1 Compatibility (Prolific 2303 based; they hate the WayBack machine, but they say “If the 8th/9th digit of the serial number (ex. Z3DA-099BP-4304) is between A1~A9, AA~AZ, B1~B9 or BA~BK it is not supported in Windows 8/8.1. Please use a “BL” or newer version of the GUC232A.”)



Counterfeit…

There are Counterfeit Prolific 2303 adapters that will show a OPEN COM PORT FAILED when checking the chip version (see image on the right) and show a yellow mark in the device manager. Older versions of the Prolific drivers (3.3.2.105 or earlier) might work on those: I just threw the cable away. Others create their own adapters to ensure original chips.

A Sewell USB To Serial Adapter P1102 detects fine but is an older chip:



This Sewell adapter uses an older chip

FTDI went even further in their drivers: they just kill fake chips or inject fake data, see

Watch That Windows Update: FTDI Drivers Are Killing Fake Chips | Hackaday

FTDI Drivers Break Fake Chips, Again | Hackaday

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

940-0017A – DB9 M to DB25 F Universal Serial Adapter

940-0020B – UPS Communications Cable Simple Signalling

940-0024C – UPS Communications Cable Smart Signalling

940-1524D – UPS Communications Cable Smart Signalling (I think it’s the same as the 940-0024C but longer)

940-0144A – APC PDU Serial Cable 940-0144/A DB9 to RJ12. They belong to my AP7920 and AP7921 Switched Rack PDUs (with inputs IEC-320 C14 and C20 and outputs IEC-320 C13), but can also be used with for instance these Metered Smart Power Distribution Unit SKUs: SPD5K, SPD5KCB, SPD5KCBL, SPD10K, SPD10KCB, SPD10KCBL, SPD20K, SPD20KCB, SPD20KCBL.

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:

Open Power Options in Control Panel.

On the UPS tab, click Select.

In the UPS Selection dialog box, under Select manufacturer, click None.

Shut down the computer and remove the UPS device.

Using apcupsd

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:

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:

Users – Cant calibrate or test a APC smartups 1500

APC Back-UPS XS 1500 (model: BX1500G) newbie questions… | Back-UPS & Surge Protectors

Re: [Apcupsd-users] Cant calibrate or test a APC smartups 1500

Re: [Apcupsd-users] EXTBATTS eeprom value problem

SUA3000XLI + SUA48XLBP + Share-UPS | Smart-UPS & Symmetra LX / RM

Users – Configuring external battery packs: The setting is available via  a terminal program or apctest’s termnal mode, at least if you have a serially connected UPS.

AN!Cluster Tutorial 2 – AN!Wiki: Configuring Apcupsd For Two UPSes

[Apcupsd-users] How to run servers with redundant PSUs on 2 UPS’ with apcupsd?

Manually Resetting an APC Smart-UPS Battery Constant After New Battery Replacement | CoNetrix

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.

NIS Server/Client Configuration Using the Net Driver

No Joke IT: Shut down ESXi 5.1 guest VMs and the host (free edition) via SSH – the easy way!

sixdimensionalarray/esxidown: A shell script to shutdown VMware ESXi host servers

2011-09-13 – Graceful shutdown of an ESXi 5.0 server with a USB-connected APC UPS | Biggsy’s Blog

2011-10-15 – Graceful shutdown of an ESXi 5.0 server with a USB-connected APC UPS – Part 2 | Biggsy’s Blog

2012-12-19 – Graceful shutdown of an ESXi 5.0 server with a USB-connected APC UPS – Revisited | Biggsy’s Blog

Setting up an APC UPS in ESXi

NUT based (Network UPS Tools – Welcome, which supports more UPS types and apcupsd):

electrical power – VMware ESXi shutdown triggered by APC UPS connected via USB – Server Fault: NUT (Network UPS Tools) master running in the VM, and native ESXi NUT slave running on the ESXi host.

[Bash] ESXi NUT shutdown scripts – Pastebin.com

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:

Repeat this for a model SUA1500I which has a regular USB-B socket so you can use a normal USB B-to-A cable, not the proprietary APC USB RJ45 cable.

Note the serial cables still *are* proprietary which means a Smart-UPS will often switch off when you use a regular serial cable.

apcusbd has documentation on the layout of these cables.

Filed under: APC Smart-UPS, apcupsd, ESXi5, ESXi5.1, ESXi5.5, ESXi6, Power User, UPS, Virtualization, VMware, VMware ESXi, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows XP

Show more