2

I am sysadmin and my company has tasked me with a project I am not quite certain how to complete.

A local museum has a small Intel NUC-like computer running Windows 10 that displays an automated presentation via projector. They have it plugged into a power circuit that is switched via a standard light switch, which they switch off when closing the museum. They have asked me to find a way to power it off gracefully when the light switch is switched off so they stop experiencing data corruption and Window's start up repair.

I have tried using a simple UPS to automatically shut down the computer when the power is turned off. However, it beeps and flashes until the battery dies, which is not ideal. I could disable the piezo buzzer and lights, but this does not prevent UPS power drain while the power is off because the inverter continues to operate.

Does anyone have any suggestions as to how I can solve this fairly inexpensively and in a way that will involve me as little as possible in the future? Is there a UPS out there that goes into hibernation or similar after powering down the computer attached to it? Keep in mind the volunteers operating this museum are not technical at all and that the power can be shut off for several days at a time.

Thanks in advance.

  • 9
    Can you maybe use task scheduler to execute a shutdown -h -t 0 at closing time? – Katherine Villyard Nov 1 '18 at 23:12
  • 1
    Consider replacing Windows machine with something like a Pi that can run Screenly or similar dedicated presentation software. MUCH more tolerant to power loss, esp. if the file system is mounted as read-only. Heck, leave it going 24/7 and just power off the projector.... – ivanivan Nov 2 '18 at 13:59
4

Even a basic communication cable between the computer and the UPS should include a way to signal the UPS to power off the inverter, usually with some delay. That signal might only work when incoming external power is already lost, so you may have missed this in your tests.

In general, it should work like this:

  • When external power is lost, UPS starts using battery power and signals this fact to the computer
  • On receiving the "on battery" signal, the UPS monitor software on the computer starts an orderly shutdown. (There is usually an adjustable time delay between the signal and starting the shutdown, so that the UPS can be used to tide over brief power interruptions without triggering the shutdown. In your case, you'll want to set this time delay quite short, or eliminate it altogether.)
  • When the shutdown is all but complete, the UPS monitoring software running on the computer will send one last signal to the UPS: "safe to power down". After this, the computer will be expected to complete its shutdown within a fixed amount of time, and then the UPS will switch off the inverter.
  • If the UPS battery runs low, it can send another signal to the computer: "battery low". On receiving this signal, the UPS monitoring software is supposed to shutdown the computer as quickly as possible. But this should be the exception, not the primary shutdown trigger.

If you attempt to "soldier on" until the UPS battery runs low, then after the power comes back, you might not have enough power in the battery for an orderly shutdown if power goes out again shortly afterwards.

After shutting down the inverter, the UPS may keep running its fan for a while to better allow the inverter to cool. This may make it harder to see when the inverter actually shuts down.

I once read a recommendation that when you're setting up an UPS for the first time, you should initially connect just the communication cable between the UPS and the computer, and use the UPS to power just a desk lamp or some other device that allows you to clearly see when UPS stops feeding power, and then configure your UPS monitoring software with the computer still being powered directly from the wall.

Then you can pull the UPS's incoming power cord and verify your set-up: the monitoring program should trigger a controlled shutdown of the computer using the timeout values you've specified, and after the computer has powered down, the desk lamp (or whatever) should turn off. There might be a delay of 1-2 minutes between the completion of the shutdown and the lamp turning off, but no more than that. When you replug the UPS's incoming power cord, the lamp should light up again (possibly after a short delay).

Once this works as expected, you can remove the desk lamp and plug the computer's power cord to the UPS. You now have verified your UPS set-up works as you intended it to.

0

On some UPS, like some APC model you can set a timeout for the low battery inside the management card.

That will allow you to:

  • Set a low battery timeout, so the signal will be sent early when the power is cut.

  • You can set in the UPS shutdown setting. Maximum Required Delay it's named on APC model. That will force the UPS to shutdown after the low battery event (+- minus 2 minutes)

So what happen is the low battery delay is modified, so it will prevent the UPS to drain before a shutdown is sent.

Remember its a best practice to do so, as when the UPS will come back online, if the battery is drained, a on/off power surge will drop again the UPS without having the time to charge.

You can even in the management card set a recharge threshold before it start again, but it's not practical in your case.

So I suggest a UPS with a management card or with management capability that do the settings you want.

  • APC management card is expensive itself... But anyway most of modern APC UPSes (BackPro, Smart) have a build in USB interface for control from PC connected to. At Windows it managed using powershut-family software. And it allow (AFAIR) to set up shutdown process with two different settings: 1) time remaining on batteries 2) time without a power. – Sergey Nov 2 '18 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.