The problem I was having was that the ups is in dumb mode when it first starts up. In this mode, it doesn’t recognize most commands. So, the first step in a script is to put the ups in smart mode. This is done by sending a Y. Next, I want to shut the ups off, but I want to put a little delay in to give the computer itself enough time to shut down. The shutdown command is run by sending two Ks with a delay of at least 1.5s between the Ks.

I can also add a line to say how long of a delay to use. To set this, I have to determine about how long it takes for the computer to shut down. The command for this is p. The default is 20 seconds. The delay is set by the eeprom. To change this, I used kermit and issued the following:

p-

This cycles the p through it’s commands. It showed 600, so the delay is now set to ten minutes. I added a line to my test script to immediately shut down the computer. The shutdown worked fine, but after ten minutes, the ups was still on. I’m trying it again, but changing the shutdown time back to 20 seconds.

This basically shut the ups off as soon as the computer shut down. If there were any hangups in the shutdown, this would probably shut the computer off before they were resolved. But I think that’s ok. This script is mainly for when the machines need to be shutdown immediately.