Extra battery properties

Arnaud Quette aquette.dev at gmail.com
Thu Jul 5 06:57:04 PDT 2007


2007/7/5, Richard Hughes <hughsient at gmail.com>:
> On Thu, 2007-07-05 at 15:40 +0200, Arnaud Quette wrote:
> > Hi Richard,
> >
> > 2007/7/3, Richard Hughes <hughsient at gmail.com>:
> > > Guys,
> > >
> > > For the OLPC battery, we can extract more properties from the battery.
> > > Which of these make sense to expose in HAL? None is a valid answer :-)
> > >
> > > battery.temperature
> > > battery.is_dead
> > > battery.is_overheat
> > >
> > > Comments please,
> >
> > UPSes (through NUT - Network UPS Tools) also exposes these:
> > - battery.temperature => battery.temperature
> > - battery.is_dead => ups.status contains RB (Replace Battery)

I should have added a header:
HAL name | NUT name (and value)

> this should be part of the battery.* namespace - it's to do with the
> cell, not the UPS hardware, right?

right, but the fact is that the NUT ups.status var is the only
mandatory one, and the minimum required for client applications to be
monitored. So the central point...

> Also, having string values with attributes is a bad thing as it forces
> userspace to parse the data. It's better imo to expose boolean values
> that can be trivially parsed.

as for the other NUT to HAL mapping, the conversion will obviously be
done by NUT addons.
so, having "ups.status=... RB ..." in NUT will be translated to
"battery.is_dead=true" in HAL (false  otherwise).

> > - battery.is_overheat => nothing standardized
> >
> > NUT also exposes various other temperature (depending upon the exact device):
> > - ups.temperature
>
> I think we need a capability termperature_sensor now.

right.

btw, have you finally tested NUT 2.2.0 and its HAL addons with your MGE unit?

Arnaud
-- 
Free Software Developer - http://arnaud.quette.free.fr/
Debian Developer - http://people.debian.org/~aquette/
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Ubuntu Media Center (UMC) Project Leader - https://launchpad.net/~umc-team


More information about the hal mailing list