[ALUG] Wanted - simple way to check mains power is available

Chris G cl at isbd.net
Wed Jan 26 16:46:20 GMT 2011


On Wed, Jan 26, 2011 at 04:05:42PM +0000, John Woodard wrote:
> On 26 January 2011 15:51, samwise <samwise at bagshot-row.org> wrote:
> > Chris,
> >
> > Shouldn't you be able to get this info from your computer itself?
> >
> > Something like:
> >
> > cat /proc/acpi/battery/BAT0/state
> >
> > Or maybe google for acpi or acm ... ?
> >
> > The battery widgets which show you whether your battery is in use or
> > charging, must make use of this info.
> >
> > Peter
> 
> No need for such complexities, use a web cam pointing at the little
> red power light....
> I'll get my coat.....  :-)
> 
I do already have a webcam, and it's just about working.  However it's
not very clever for a programmatic check on mains power!  :-)

-- 
Chris Green



More information about the main mailing list