LinuxMCE Forums
May 21, 2013, 12:43:01 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Power Down in the event of a power outage  (Read 419 times)
Techstyle
Addicted
*
Posts: 662



View Profile WWW
« on: December 19, 2011, 07:44:24 pm »

My core is currently attached to a small UPS so that when there is a power outage the core remains live.  This solved the initial issue I had which was to stop my core going down during lighning storms in summer when the power would be out of under a few seconds.  However, if the power is out for over 10 minutes then my core abruptly shutsdown and bad things can happen.

I have thought of a few ways to overcome this:
1.  Hardware - buy a UPS with a USB port that will inform the PC if there is no Power (Some APC models do this)
2.  Software - is there a way LMCE can look at an 'appliance' (MD, TV, Reciever, externally powered Z-wave dongle, etc) that should alway be 'connected' (RS232, Ethernet, USB etc) and if it isn't there then wait 5 mins and then power down? with the MD it must send a wake up over LAN first, I guess. 

How are others approaching this?
Logged

merkur2k
Addicted
*
Posts: 513


View Profile
« Reply #1 on: December 19, 2011, 08:09:26 pm »

the UPS route is going to be easiest, and the tools already exist for it.
as you mention, APC is the best choice for this, and there is a daemon for linux to monitor it and respond appropriately.
I'm sure something else could be figured out given the flexibility of lmce, but thats gonna be your best bet to get going right away.
Logged
Techstyle
Addicted
*
Posts: 662



View Profile WWW
« Reply #2 on: December 19, 2011, 10:32:23 pm »

Problem is I already have the UPS and didn't think to get the one with this feature
Logged

posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #3 on: December 20, 2011, 06:38:12 am »

Run a cron process that tries to ping a device, and shutdown the core, if the ping does not succeed
Logged

Techstyle
Addicted
*
Posts: 662



View Profile WWW
« Reply #4 on: December 20, 2011, 08:36:23 pm »

I was thinking something along those lines.

Could a 'device' be added that had 2 variables - 'time' and 'pinged device number' where the the 'device' would split the 'time' variable into 3 and ping the 'pinged device number' (device that should always be there) and if 3 pings are missed in a row the core shutsdown.

the 3 consecutive pings would be to ensure the device wasn't just not busy for one of them.  You also want to establish that the power is down for a certain period and not just at one instance.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!