[Nut-upsuser] Multiple ups/Belkin 1500VA no serial number

Alex Peyser a.peyser at umiami.edu
Fri Jun 6 01:32:00 UTC 2008


Thanks Arjen,

I hadn't previously looked into libusb, but is there a reason why the filename 
member of usb_device is't matched on?  On linux, they may not be unique or 
deterministic in theory --- but in practice they are, particularly for 
servers where you're not constantly plugging in and out devices.

Am I missing something in the logic, or do I just have an unusual case?

I've written up a patch that works for me -- it pulls out the filename from 
the usb_device, and matches it with a file= parameter for ups.conf. I'd guess 
that a better long-term solution would be to have upsdrv listen to hal for 
ups's that are connecting -- but that would obviously be a lot more work, and 
it requires mucking up the server with hal stuff.

Regards,
Alex Peyser

On Thursday 05 June 2008 08:01:32 am 
nut-upsuser-request at lists.alioth.debian.org wrote:

> Message: 1
> Date: Wed, 4 Jun 2008 19:22:56 -0400
> From: Alex Peyser <a.peyser at umiami.edu>
> Subject: [Nut-upsuser] Multiple ups/Belkin 1500VA no serial number
> To: nut-upsuser at lists.alioth.debian.org
> Message-ID: <200806041922.59758.a.peyser at umiami.edu>
> Content-Type: text/plain; charset="us-ascii"
>
> I'm setting up a cluster with multiple ups's using nut 2.2. The ups's are
> Belkin 1500 (ID 050d:0751) which don't appear to report a serial number. Is
> there any other way I can setup ups.conf with multiple of these ups over
> usb on Linux?
>
> If I just setup the vendor and product id's, every definition in ups.conf
> appears to match the first one, and therefore all of them but the first one
> fails. Is there some undocumented matcher I can use to distinguish them, or
> some flag to tell the ups to simple skip ups that have already been
> matched?
>
> Regards,
> Alex Peyser
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 189 bytes
> Desc: This is a digitally signed message part.
> Url :
> http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20080604/8
>597976d/attachment-0001.pgp
>
> ------------------------------
>
> Message: 2
> Date: Thu, 5 Jun 2008 08:45:11 +0200 (CEST)
> From: "Arjen de Korte" <nut+users at de-korte.org>
> Subject: Re: [Nut-upsuser] Multiple ups/Belkin 1500VA no serial number
> To: "Alex Peyser" <a.peyser at umiami.edu>
> Cc: nut-upsuser at lists.alioth.debian.org
> Message-ID:
> 	<1161.193.67.155.121.1212648311.squirrel at mail.de-korte.org>
> Content-Type: text/plain;charset=iso-8859-1
>
> > I'm setting up a cluster with multiple ups's using nut 2.2. The ups's are
> > Belkin 1500 (ID 050d:0751) which don't appear to report a serial number.
> > Is there any other way I can setup ups.conf with multiple of these ups
> > over usb on Linux?
> >
> > If I just setup the vendor and product id's, every definition in ups.conf
> > appears to match the first one, and therefore all of them but the first
> > one  fails. Is there some undocumented matcher I can use to distinguish
> > them, or some flag to tell the ups to simple skip ups that have already
> > been matched?
>
> The 'libusb' library doesn't provide the physical port number these
> devices are connected to, so if you can't tell them apart through the
> regular expressions, this isn't possible. Which in your case means, that
> each UPS must have its own USB *root* device, as the only difference will
> be the USB bus they're connected to. You can't monitor two devices that
> are looking identical from the same USB bus.
>
> Best regards, Arjen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: nut-file.patch
Type: text/x-diff
Size: 6940 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20080605/10e539b2/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20080605/10e539b2/attachment.pgp 


More information about the Nut-upsuser mailing list