Tricking out Computer/UPS.

This is a discussion on Tricking out Computer/UPS. within the Home Automation forums in Other Technologies category; I've got a linux based PC that I use for home automation. It's connected to a UPS that actually had Linux based control software. So, it's configured, that upon a power failure, the linux box shuts itself down (nice and orderly). With the delays, and times involved, I'm left with about 35% of the UPS battery. The PC is set to "auto boot" when power comes back on, but the catch 22, is that the UPS still has some juice (that could take a long time to expire), so the PC never actually sees the power go off. Therefore, the ...

Go Back   Application Development Forum > Other Technologies > Home Automation

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-24-2008, 08:28 PM
J Miller
Guest
 
Default Tricking out Computer/UPS.

I've got a linux based PC that I use for home automation. It's
connected to a UPS that actually had Linux based control software.

So, it's configured, that upon a power failure, the linux box shuts
itself down (nice and orderly). With the delays, and times involved,
I'm left with about 35% of the UPS battery.

The PC is set to "auto boot" when power comes back on, but the catch 22,
is that the UPS still has some juice (that could take a long time to
expire), so the PC never actually sees the power go off.

Therefore, the PC won't boot when the power is restored. I think I
figured a way to "trick it out", but before I build anything, I thought
someone might have solved this already....

What I'm thinking is a box that plugs into the "non backed up" AC, that
also connects to a USB port on the PC. The USB will ONLY be used for
the 5 volts. If the "non backed up" AC is on, but the 5 volt USB is
off, I'd use a relay to break the power from the UPS to the PC for a few
seconds. The PC would see the loss of power, and then see it come back,
and the boot would start. I'd probably throw in a PIC so I could use
timers, etc. As I have a USB cable running to the UPS, and the UPS has
"surge only" outlets.

Another option would be to use the "surge only outlet with a timer, that
disconnects the UPS/PC power say 5 minutes after the "expected shutdown"
of the PC, and doesn't reconnect it until the "surge only" outlet again
has power.

You can contact me off list at jmiller at usandthem dot com. If there's
a better group to post this two, let me know, or feel free to repost it.
Reply With Quote
  #2  
Old 08-24-2008, 11:57 PM
Dan Lanciani
Guest
 
Default Re: Tricking out Computer/UPS.

In article <48b1fcc5$0$89389$815e3792@news.qwest.net>, reply@here (J Miller) writes:
| I've got a linux based PC that I use for home automation. It's
| connected to a UPS that actually had Linux based control software.
|
| So, it's configured, that upon a power failure, the linux box shuts
| itself down (nice and orderly). With the delays, and times involved,
| I'm left with about 35% of the UPS battery.
|
| The PC is set to "auto boot" when power comes back on, but the catch 22,
| is that the UPS still has some juice (that could take a long time to
| expire), so the PC never actually sees the power go off.

Usually you tell the UPS to shut off until power is restored as part
of your PC's shutdown process. The UPS will typically provide a delay
so the PC will have time to finish its shutdown before it loses power,
though it is possible to get the system into a clean state with r/o
file system and still be talking to the UPS.

What kind of UPS are you using? The APC SmartUPS series has some quirks
that make the above slightly tricky to implement...

Dan Lanciani
ddl@danlan.*com
Reply With Quote
  #3  
Old 08-25-2008, 10:11 AM
J Miller
Guest
 
Default Re: Tricking out Computer/UPS.

Dan Lanciani wrote:
> In article <48b1fcc5$0$89389$815e3792@news.qwest.net>, reply@here (J Miller) writes:
> | I've got a linux based PC that I use for home automation. It's
> | connected to a UPS that actually had Linux based control software.
> |
> | So, it's configured, that upon a power failure, the linux box shuts
> | itself down (nice and orderly). With the delays, and times involved,
> | I'm left with about 35% of the UPS battery.
> |
> | The PC is set to "auto boot" when power comes back on, but the catch 22,
> | is that the UPS still has some juice (that could take a long time to
> | expire), so the PC never actually sees the power go off.
>
> Usually you tell the UPS to shut off until power is restored as part
> of your PC's shutdown process. The UPS will typically provide a delay
> so the PC will have time to finish its shutdown before it loses power,
> though it is possible to get the system into a clean state with r/o
> file system and still be talking to the UPS.
>
> What kind of UPS are you using? The APC SmartUPS series has some quirks
> that make the above slightly tricky to implement...
>
> Dan Lanciani
> ddl@danlan.*com

It's Cyberpowr CP685AVR. No option to shut off the power I can find.
(it was <$100, so not "full function"...)
Reply With Quote
  #4  
Old 08-25-2008, 04:52 PM
Dan Lanciani
Guest
 
Default Re: Tricking out Computer/UPS.

In article <48b2bd82$0$33221$815e3792@news.qwest.net>, reply@here (J Miller) writes:
| Dan Lanciani wrote:
| > In article <48b1fcc5$0$89389$815e3792@news.qwest.net>, reply@here (J Miller) writes:
| > | I've got a linux based PC that I use for home automation. It's
| > | connected to a UPS that actually had Linux based control software.
| > |
| > | So, it's configured, that upon a power failure, the linux box shuts
| > | itself down (nice and orderly). With the delays, and times involved,
| > | I'm left with about 35% of the UPS battery.
| > |
| > | The PC is set to "auto boot" when power comes back on, but the catch 22,
| > | is that the UPS still has some juice (that could take a long time to
| > | expire), so the PC never actually sees the power go off.
| >
| > Usually you tell the UPS to shut off until power is restored as part
| > of your PC's shutdown process. The UPS will typically provide a delay
| > so the PC will have time to finish its shutdown before it loses power,
| > though it is possible to get the system into a clean state with r/o
| > file system and still be talking to the UPS.
| >
| > What kind of UPS are you using? The APC SmartUPS series has some quirks
| > that make the above slightly tricky to implement...
| >
| > Dan Lanciani
| > ddl@danlan.*com
| It's Cyberpowr CP685AVR. No option to shut off the power I can find.
| (it was <$100, so not "full function"...)

I'm not familiar with Cyberpower units, but Nut seems to support them so
you might want to look at its sources. It seems odd that they would bother
with serial and USB(?) ports and not provide the most basic shutdown command.
IIRC, even the pre-serial APC units had a discrete line to do it. Shutting
down as soon as possible has the added advantage of extending battery life.

Dan Lanciani
ddl@danlan.*com
Reply With Quote
  #5  
Old 08-25-2008, 06:52 PM
J Miller
Guest
 
Default Re: Tricking out Computer/UPS.

Yup... after a few phone calls, Cyperpower verified that the UPS does
support this, and acknowleged that they had a bug in their Linux
software... They couldn't even guess when it would be fixed, and one of
the folks suggested using NUT.

Downloaded it and got it built and installed. It's shutting down just
fine... BUT.. for the life of me, I cant get the command for shutting
off the UPS to work at shutdown (if I call the script by hand, it works.)

I'm on FC3, and putting a kill script (K99ups is what it's called) in rc1.d.


Dan Lanciani wrote:
> In article <48b2bd82$0$33221$815e3792@news.qwest.net>, reply@here (J Miller) writes:
> | Dan Lanciani wrote:
> | > In article <48b1fcc5$0$89389$815e3792@news.qwest.net>, reply@here (J Miller) writes:
> | > | I've got a linux based PC that I use for home automation. It's
> | > | connected to a UPS that actually had Linux based control software.
> | > |
> | > | So, it's configured, that upon a power failure, the linux box shuts
> | > | itself down (nice and orderly). With the delays, and times involved,
> | > | I'm left with about 35% of the UPS battery.
> | > |
> | > | The PC is set to "auto boot" when power comes back on, but the catch 22,
> | > | is that the UPS still has some juice (that could take a long time to
> | > | expire), so the PC never actually sees the power go off.
> | >
> | > Usually you tell the UPS to shut off until power is restored as part
> | > of your PC's shutdown process. The UPS will typically provide a delay
> | > so the PC will have time to finish its shutdown before it loses power,
> | > though it is possible to get the system into a clean state with r/o
> | > file system and still be talking to the UPS.
> | >
> | > What kind of UPS are you using? The APC SmartUPS series has some quirks
> | > that make the above slightly tricky to implement...
> | >
> | > Dan Lanciani
> | > ddl@danlan.*com
> | It's Cyberpowr CP685AVR. No option to shut off the power I can find.
> | (it was <$100, so not "full function"...)
>
> I'm not familiar with Cyberpower units, but Nut seems to support them so
> you might want to look at its sources. It seems odd that they would bother
> with serial and USB(?) ports and not provide the most basic shutdown command.
> IIRC, even the pre-serial APC units had a discrete line to do it. Shutting
> down as soon as possible has the added advantage of extending battery life.
>
> Dan Lanciani
> ddl@danlan.*com

Reply With Quote
  #6  
Old 08-25-2008, 07:29 PM
J Miller
Guest
 
Default Re: Tricking out Computer/UPS.

Ok! I got the shutdown script to work! Thanks for your help!

J Miller wrote:
> Yup... after a few phone calls, Cyperpower verified that the UPS does
> support this, and acknowleged that they had a bug in their Linux
> software... They couldn't even guess when it would be fixed, and one of
> the folks suggested using NUT.
>
> Downloaded it and got it built and installed. It's shutting down just
> fine... BUT.. for the life of me, I cant get the command for shutting
> off the UPS to work at shutdown (if I call the script by hand, it works.)
>
> I'm on FC3, and putting a kill script (K99ups is what it's called) in
> rc1.d.
>
>
> Dan Lanciani wrote:
>> In article <48b2bd82$0$33221$815e3792@news.qwest.net>, reply@here (J
>> Miller) writes:
>> | Dan Lanciani wrote:
>> | > In article <48b1fcc5$0$89389$815e3792@news.qwest.net>, reply@here
>> (J Miller) writes:
>> | > | I've got a linux based PC that I use for home automation. It's
>> | > | connected to a UPS that actually had Linux based control software.
>> | > | | > | So, it's configured, that upon a power failure, the linux
>> box shuts | > | itself down (nice and orderly). With the delays, and
>> times involved, | > | I'm left with about 35% of the UPS battery.
>> | > | | > | The PC is set to "auto boot" when power comes back on, but
>> the catch 22, | > | is that the UPS still has some juice (that could
>> take a long time to | > | expire), so the PC never actually sees the
>> power go off.
>> | > | > Usually you tell the UPS to shut off until power is restored
>> as part
>> | > of your PC's shutdown process. The UPS will typically provide a
>> delay
>> | > so the PC will have time to finish its shutdown before it loses
>> power,
>> | > though it is possible to get the system into a clean state with r/o
>> | > file system and still be talking to the UPS.
>> | > | > What kind of UPS are you using? The APC SmartUPS series has
>> some quirks
>> | > that make the above slightly tricky to implement...
>> | > | > Dan Lanciani
>> | > ddl@danlan.*com
>> | It's Cyberpowr CP685AVR. No option to shut off the power I can
>> find. | (it was <$100, so not "full function"...)
>>
>> I'm not familiar with Cyberpower units, but Nut seems to support them so
>> you might want to look at its sources. It seems odd that they would
>> bother
>> with serial and USB(?) ports and not provide the most basic shutdown
>> command.
>> IIRC, even the pre-serial APC units had a discrete line to do it.
>> Shutting
>> down as soon as possible has the added advantage of extending battery
>> life.
>>
>> Dan Lanciani
>> ddl@danlan.*com

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 11:39 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.