[Nut-upsdev] DeviceKit-power

Arnaud Quette aquette.dev at gmail.com
Tue Dec 29 10:38:52 UTC 2009


first, please keep the traffic on the list.
other may be interested in this topic...

2009/12/28 Марк Коренберг <socketpair at gmail.com>:
> Great Thanks. Next question:
> 1. It will be nice if NUT daemon will export non-usb-hid upses to
> DBUS. Does NUT daemon will do that in future? Maybe now?
> 2. If not, what is algorythm of implementation such feature. Suppose I
> have UPS driver sources (from nut daemon) and basic dbus skill. What I
> need to read.

look at what I've done for HAL: the things are mostly the same (using
DBus, but with another path).
the idea is to keep only the driver(s), and replace the dstate layer
(which uses unix sockets to communicate with upsd) by a DBus channel:
http://svn.debian.org/wsvn/nut/trunk/drivers/dstate-hal.c
http://svn.debian.org/wsvn/nut/trunk/drivers/dstate-hal.h

the common core of the driver also need some work:
http://svn.debian.org/wsvn/nut/trunk/drivers/main-hal.c
http://svn.debian.org/wsvn/nut/trunk/drivers/main-hal.h

Finally, there was also the glue between HAL and these "addons":
http://svn.debian.org/wsvn/nut/trunk/scripts/hal/ups-nut-device.fdi.in

I've not checked recently, but the solution is around udev

Finally, the DK-p interface is described here:
http://hal.freedesktop.org/docs/DeviceKit-power/Device.html

> "WOW-UPS 1000 u" is the last recently appeared model in my category
> (have generic outlets, suitable for any technics). So just dropping
> users with their bad-engeneered UPSES is bad idea....

don't get us wrong: we do our best to support everybody out there.
but there are good choices for supporting NUT, and other choices.
the same (and even more strict, since limited to USB/HID only) goes
for UPower (the new name of DeviceKit-power). And I can tell you that
you won't be dropped for a "bad" UPS there, but flamebatted until
death.
now, if a device has an engineering problem that we (NUT Team) can't
overcome, there is not much to do.
we're not wizards, sadly!

The above information should help you in progressing toward UPower.
IMHO, refreshing the nut-hal-drivers should be sufficient to bridge on UPower.
if you manage to do something, I'll reconsider the dropping of this HAL support.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

> Also, I Have
> RS-232 UPSes (not powercom) with changeable batteries, and thay are
> online now.
>  What to do?
>
>
>
> 2009/12/28 Arnaud Quette <aquette.dev at gmail.com>:
>> 2009/12/28 Arjen de Korte:
>>> Citeren Марк Коренберг:
>>>
>>>> My UPS Powercom WOW-1000U does greatly work with NUT, but not
>>>> auto-cofigurable...
>>>
>>> It requires the user to specify some model specific variables that can't be
>>> auto detected since the underlying serial protocol doesn't support that. So
>>> in essence what you're asking, can't be done (which you found out already).
>>>
>>>> This UPS is not usb-hid ups, and works well with this settings in NUT:
>>>>
>>>> [powercom]
>>>>    desc = "powercom"
>>>>    driver = powercom
>>>>    port =
>>>> "/dev/serial/by-id/usb-POWERCOM_CO.__LTD._USB_to_Serial-if00-port0"
>>>>    type = IMP
>>>>
>>>> lsusb -v fragment attached.
>>>>
>>>> Unlike other UPSes, gnome-power-manager does not see this device
>>>> (after installing nut-hal-drivers in Ubuntu), and /dev/ttyUSB0 having
>>>> group "dialout" (not "nut"). I'm not guru of devkit/hal/udev
>>>> "rules.d" rules and other stuff, so, can you patch original
>>>> device-kit-power rules?
>>>
>>> Unless you can find someone willing to integrate the existing USB to serial
>>> implentation in the 'powercom' driver, the only thing HAL can (and
>>> apparently will) do is adding a USB to serial device node on your system.
>>> Given the remark above, I don't think it is worthwile to spend the time on
>>> that.
>>
>> just stating the obvious: the previous (and preliminary) HAL support
>> in NUT will soon be declared obsolete.
>> This was "limited" to USB UPS only
>> The new way is to either have a USB/HID compliant UPS, which can
>> automagically work with DeviceKit-power (UPower) and GPM, or NUT ; or
>> otherwise to use NUT.
>>
>> I've no plan to port my nut-hal-drivers work to UPower, and there
>> doesn't seem to be much interest out there to do so.
>>
>> For the auto configuration in NUT, I will post some news soon on the
>> NUT Control Center progress.
>> This app (and its set of tools) will greatly improve the configuration
>> mess in NUT.
>>
>> As a side note, making NUT UPower compatible is roughly limited to
>> exposing data on DBus (org.freedesktop.DeviceKit.Power.Device or
>> org.freedesktop.UPower.Device).
>>
>>>> Or, please answer what to read and where i should make changes. I can
>>>> send you a patch, if this device will work on my PC.
>>>>
>>>>
>>>> To NUT maintainer. Please add descriptions of  Powercom WOW-UPSes
>>>> ("WOW-500 U", "WOW-700 U", "WOW-850 U", "WOW-1000 U") to
>>>> /usr/share/nut/driver.list
>>>> "Powercom" "WOW-xxx U" "" "powercom".
>>>
>>> I will do that. Note that there is a newer generation of PowerCOM devices
>>> that is about to hit the market that uses the HID PDC protocol and therefor
>>> is supported through the 'usbhid-ups' driver (only development version so
>>> far).
>>
>> and DeviceKit-power / UPower (so GPM) too...
>> though you might need to update the matching file.
>>
>>>> Also, all WOW-UPSes work with type=IMP and does not work without
>>>> specifying type.
>>>
>>> QED...
>>
>> thanks Arjen for your actions there.
>>
>> cheers,
>> Arnaud
>> --
>> Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
>> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
>> Debian Developer - http://www.debian.org
>> Free Software Developer - http://arnaud.quette.free.fr/
>>
>
>
>
> --
> Segmentation fault
>



More information about the Nut-upsdev mailing list