-----Original Message----- From: Arun Khan Sent: 16/02/2013, 01:45 To: GNU/Linux Users Group, Mumbai, India Subject: Re: [ILUG-BOM] How to detect a power failure?
On Fri, Feb 15, 2013 at 7:57 PM, Binand Sethumadhavan <[email protected]> wrote: > I am thinking of something like a mobile charger that would plug in a > regular 3-pin plug at one end and a computer at the other, and some > software/sensor combo that would read the (DC) voltage at the computer end. > If there is no voltage, there is no power in the mains and ergo - we are in > the middle of a power outage, so take action. Know of something along these > lines? > > (idea is to detect power failures, while powered by a "dumb" UPS unit - one > that cannot communicate with the a computer. Any other > solutions/suggestions?). > Good idea. You could use one of those AC Mains to USB adapter/charger; which I think gives out 5V on the USB power line. A USB cable into the computer USB port should be a good starting. -- Arun Khan -- This usb idea is good. A usb powered device can be used where power comes externally for on/off and the system gives signal to detect that device is down. A cheap 200 rupees usb lan can be opened and modified. Every few minutes, the output of ifconfig can be grepped to detect the presence of eth(n). Battery power detect option is only in laptops. -- http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

