Friday, June 19, 2026

On Testing Things Completely

I'm sure that many of the few readers of this blog use uninterruptible power supplies (UPS) to keep their computers or Internet connectivity equipment running at the very least when the lights go out. If you're at all like me, maybe you use them to keep all sorts of things running through times of power loss. Used units that frequently only need a new set of batteries to work like new again are plentiful and cheap. Sometimes they're even free for the asking.

Many times, I have no need of whatever communication capabilities a particular model may offer. (In this same vein, I turn off or physically remove the warning beepers from most of the UPSes I have.)

This particular post involves a UPS that I set up for use with a security camera system. There, communication to tell the computer that it's time to shut down seemed like a very good idea. Now, the right way to do this would probably be to use a halfway modern UPS whose communication capabilities are somewhat decent. Of course I didn't do that. I pulled an old APC Back-UPS 300 (maybe a 350) out of storage that just so happened to have the optional serial port on the back panel. If you've been doing IT stuff for a while, you probably know the exact thing I'm talking about. If not, here's a picture of several models from this product family.

American Power Conversion really got their money's worth out of this design. They sold these from sometime in the late 1980s clear up into the early 2000s with few changes. The internal design may be slightly older than that, as the cases went through some revision over the years. (Changes I've noticed include differences in battery compartments, the types of batteries used, and in some rare cases, a red filtered neon indicator lamp in the power switch as opposed to the more common green LED.)

Fancier models had a serial port at the back to signal a computer and UPS monitoring software of the day of a few different conditions. There's very little to it. Calling this any kind of a communication protocol is a very generous description. Various serial lines are used by the UPS to indicate when it's online, when it's on battery and when the battery is low. That's it. There's no battery percentage, temperature or battery failure indication information to be found. Still, it's better than nothing and in the environment where I wanted to use said UPS, anything fancier might be too heavy.

The inverter is nothing to write home about in these either. It's only a touch nicer than a plain old squarewave. Most computers won't care (though those with more advanced active power factor correction hardware in their power supplies may shut off when the incoming waveform changes). Purely resistive loads won't care. Motors will oftentimes sound strange, labor, run at an incorrect speed or overheat. Things with resistive or capacitive dropper power supplies will usually burn up almost instantly.

What I will say for these particular UPSes is that they're dead simple and pretty much unfailingly reliable even after decades of use. However, all these can do in the face of a power problem is switch to their battery and inverter. Still, that's more than good enough for a lot of applications. 

I'm getting a bit far away from the subject. Let's try to get back to that. I hooked this UPS up to the computer in question and configured the long-slumbering apcupsd software to talk with it. I believe the cable intended for use with these is the APC 940-0020 (and any of its various A, B, C or whatever letter revisions), which I do have but would need to find. Rather than raise my blood pressure and engage in excursions of profanity, I used a rescued 940-0095 "simple signaling" cable because I knew right where it was, in my kitchen junk cabinet. (Doesn't everyone keep UPS signaling cables in their kitchen junk cabinet?)

I pulled the plug to test things, saw apcupsd successfully report that the UPS was on battery, and that it returned to an on-line status when the plug was reconnected. Satisfied, I called this project completed and figured it was all good.

In recent times (relative to the date of this post, here in June 2026), major storms came through this area and played havoc with the power lines. My power was out for several hours, far beyond the runtime of almost any UPS you'd care to name. After the lights came back on, I was quite surprised to find out that the computer protected by this UPS had not been shut down successfully. At first I thought that maybe the battery wasn't strong enough to keep things going, or that the UPS' low battery warning came along with too little runtime remaining for the computer to complete all of its shutdown related tasks. By default, the low battery warning comes along with two minutes of estimated runtime are believed to be left.

This can be increased. There's a bank of DIP switches at the back of these UPSes and one of them (sometimes unlabeled, and having no effect on those without serial ports) changes the low battery warning from two to five minutes. I toggled this switch and then I did what I should have done. I tested the UPS to the point of low battery.

What I found was that when the UPS sang the song of the dying battery, apcupsd was none the wiser about what was going on! To make a long story a little shorter, after looking into this further, it seems that the 940-0095 cable has no way to tell monitoring software of a low battery condition! (Before I swear to that, I do want to test the 940-0095 cable with a UPS model it would have originally shipped with. Watch this blog for updates on that exciting subject in future.) All it can do is tell the computer and monitoring software that the UPS is running on battery. Or, at least that it's all it did when attached to the Back-UPS in question.

So I went looking for a replacement 940-0020 cable, since it is often the case whenever I go looking for something I know I have, I won't ever find it. Usually, I'll find whatever I couldn't find the last time I went looking for something. This makes me mad, raises my blood pressure and probably shortens my lifetime just a little bit more each time it happens. I've learned that it's oftentimes the smart thing to go and buy another of whatever it is I'm looking for if it isn't expensive.

Trouble is, Schneider Electric has thrown pretty much everything about APC's older products down the memory hole and I didn't know exactly what cable I needed. (They've also joined in the craptacular practice of software by subscription. That's a rant for another day.) What few things have somehow escaped are pretty disjointed. When I finally found a manual, it gave no details on what kind of cable to use. Fortunately, after several web searches that weren't helped by how many products APC has reused model numbers for, I did find the right information on the APC/Schneider web site. A 940-0020 was indeed what I'd want, and (again as of this writing), some were available for sale. I decided to try looking for mine anyway. I figured it couldn't be too far from the last place I'd used it, even if that was ten years ago. (Note to those in the viewing audience: don't ever lose that optimism.)

To my complete amazement, I was actually able to find the 940-0020B cable that I have. I didn't even raise my blood pressure or invent any new swear words along the way. I did end up shoveling through assorted trash vortexes without success, and just as I was about to admit defeat, I cast a glance toward a table in the next room.

There it was. My 940-0020 cable.

Cable in hand, I hurtled back to the computer and quickly swapped it out. Imagine my surprise when the UPS suddenly powered down upon connecting it to the USB serial port adapter! Apparently that's another place where the 940-0095 and '20 differ. apcupsd had been configured for use with the '95 cable and seemingly that will cause a sudden powerdown if you switch it out for the '20.

I'd already given the UPS battery rather more exercise than I really wanted to, but at this point, what's one more cycle? I pulled the plug and waited. Sure enough, just as the low battery beep started, this time the computer shut down like it was supposed to.

Almost.

Yes, it almost worked. The computer was properly shut down. Just before the operating system turns power off to the computer via ACPI, apcupsd is supposed to command the UPS to turn off. As we already know from the adventure above, the simple signaling protocol can handle doing this.

For some as yet unexplored reason, that doesn't happen. I don't know if the computer is shutting down too quickly, if apcupsd never gets a chance to assert the shutdown line or if it can even do so. There are apparently limits on what apcupsd can do with the serial port under a Windows operating system. I'll have to do some research on that. That can happen another time.

For now, I'll leave you with the morals of this story. First, test your UPS configuration to the point of shutdown (or simulate such if you can, to save wear on the batteries) so you can be sure it will do what you need it to do. Second, just because APC bills two cables with different part numbers as "simple signaling" cables doesn't mean they implement said signaling in the same way. I'm not actually sure why the '95 cable omits the low battery warning line, unless it's handled in another way by the UPS it came with. If the '95 cable truly cannot communicate that low battery shutdown time has arrived, it seems kind of useless.

To that end, the '95 cable I have was rescued from and seemingly bundled with a Back-UPS Pro. The Back-UPS Pro is a curious thing. I'm not sure why APC shipped it with a "simple signaling" cable. The Pro actually communicates using a subset of the APC "smart" protocol and therefore works perfectly well with the 940-0024 "smart signaling" cable. There's actually a proper microcontroller within, along with capabilities the Back-UPS lacks, such as voltage regulation without having to use the battery and inverter. You don't get everything the Smart-UPS can do, of course. All but the largest Back-UPS Pro units have the modified sinewave inverter of the basic Back-UPS line. (The larger models in metal cases have a note on the back panel saying their output is nonsinusoidal, but that's not true! I've had an oscilloscope hooked up to several of the metal cased 1000 VA+ models with 24 volt battery systems and they are all true sinewave inverters.)

Finally, I have read in a few places that the common 940-0024 cable is both of a smart and simple signaling cable in one. Based on experimentation, I don't believe this is true.
 

Tuesday, April 28, 2026

I haven't written anything here in forever!

It's been nearly two years since I have posted anything here. I don't really have anything exciting to share with you today. That's OK. I don't think there are very many (if any!) people reading this.

If by some chance you are a person who is reading this, maybe you'd care to leave a comment? Suggest something that I ought to write about? 

Thursday, September 26, 2024

No, the Ad Blocker Stays On

Web sites whose operators think that my use of an adblocker is in any way negotiable are absolutely adorable. (In case you're unsure, the use of "adorable" is extreme sarcasm.) It's not.

Hassle me too much, by which I mean "at all", and guess what? If getting very heavy handed with element blocking won't do it...see ya!

There's a special place in Hell for web pages with automatic video playback, and doubly so when the video starts following you down the page. Just don't ever. (I bring this up because on my Groanbooks, Manifest v3 killed the add-on I was using to put a stop to the automatic playback.)

The Scourge of "Got It" Buttons

 Any time a programmer or UI designer thinks they'll put in a dialog box with a button that says "got it", an enormous mallet should emerge from the top of their monitor and smite them.

Monday, August 19, 2024

If you're not a student driver, or don't have one in your family (and probably even if they aren't actually driving at the moment)...take that sticker off of your vehicle.

Saturday, July 13, 2024

Finding Misleading Advertising

If you've looked at the title of this blog entry and said to yourself something like "why would anyone ever want to do that?" ... this isn't the blog entry for you. Rather than subjecting yourself to something you aren't interested in and then feeling terribly compelled to tell me all about it...do me a favor and just don't. Go find something else that's more in line with your interests.

Still here?

It's summer time here in the northern hemisphere and the Seedy Advertisers of the Web(tm) are out in full force with wireless cameras in case someone steals your stuff, portable "air conditioners" to help you keep cool and "power misers" if you need to run your central air conditioning anyway and happen to find yourself blindsided by your next utility bill. I would hope that everyone reading this realizes all of these products are of dubious repute to varying degrees. (In case you're unaware: the little cameras are junk, those portable "air conditioners" are nothing of the sort and the power misers are the worst offenders, being nothing less than a complete scam. Any other products you'll see being advertised in this way are also dubious. If you must buy any of them, at least try to find out what the actual product is, and buy it from somewhere more reputable so you don't overpay.)

In addition to their dubious utility, these products all have one thing in common: they're all advertised with breathless ad copy that goes on for pages and pages. (Some might say it's the kind of thing I'd write, but I have standards.) I've wasted some time reading the sensational garbage on these pages, and soon noticed that just about all of them have the following phrase in common:

"Don’t get stuck with some ancient prototype!"

I don't know if these advertisers are all part of the same organization or if they have just ripped that line off from one another to the point where the true author has been lost to time. (If you really want to know, I'd guess it's the latter.) Intended to induce a sense of urgency, the real meaning here is "don't even think -- just buy this product at a grossly inflated price from us or someone we have an affiliation with".

I decided for no very good reason at all to run this phrase through a web search. I was not disappointed at all by the results. Page after page of scammy "advertorials", often with highly questionable grammar, abound for all manner of products that are likely subpar at best and unlikely to work for the claimed purpose at all.

Extra reading: out of all the products mentioned in this posting, the only one that could actually work is the portable "air conditioner". However, it's nothing of the sort. It's little more than an evaporative cooler, often also known as a "swamp cooler". These are used to great effect in parts of the world where humidity is low and the temperature high. In those places, the evaporative action of the water as air is moved over it really does produce a cooling effect. For a large system, this effect can be substantial. If you live in a place where it is both of hot and humid, no evaporative cooler can help you. You'll just be adding humidity to the air and making the problem worse.

With regard to "power misers", while it is true that highly inductive (or capacitive) loads can distort the AC waveform, residential utility customers are not assessed a fee for doing so and your electric meter's accuracy is not impacted by this taking place. Nor is your electrical utility "benefiting" in any way from this. Some commercial and industrial utility customers may be assessed a fee for operating low power factor loads and causing this distortion, though many install large capacitor or inductor banks to offset the source of the distortion.

Even if you did need to worry about this taking place, a small capacitor placed across the hot and neutral lines feeding an outlet in your home is not going to accomplish anything. Many of these devices are nothing more than a small LED fed by a circuit known as a capacitive dropper. Ironically, this means that they might actually introduce the very distortion they claim to prevent. Safety is another concern: the power line is a nasty place and these devices are unlikely to have been vetted by any reputable electrical safety agency.

Monday, April 29, 2024

Will Youtube ever fix this bug?


For quite some time now, I've noticed that the user profile icons and video thumbnails eventually get mixed up in Youtube studio.

As with so many other Youtube bugs, I don't hold out much hope that it'll ever be fixed. At least it seems to be mostly cosmetic. (You'll also notice that it's not reliably broken. One of the video thumbnails in the screen capture is correct, while the other isn't.)

On Testing Things Completely

I'm sure that many of the few readers of this blog use uninterruptible power supplies (UPS) to keep their computers or Internet connecti...