[Nut-upsuser] Multi UPS on Debian

Arjen de Korte nut+users at de-korte.org
Mon Apr 4 08:58:12 UTC 2011


Citeren Márk Csaba <markcs op gwyll.eu>:

> [eaton_1]
>        driver = blazer_usb
>         port   = "002"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "003"
>
> [eaton_2]
>         driver = blazer_usb
>         port   = "002"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "004"
>
> [eaton_3]
>         driver = blazer_usb
>         port   = "003"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "004"

The eaton_2 and eaton_3 devices are not uniquely identifiable. The  
only thing that differentiates them in ups.conf is the port, but this  
is not used in the device matching (it will change on reconnecting the  
device, so it can't be used). Basically both the eaton_2 and eaton_3  
driver will attempt to connect to the same device (which will lead to  
a storm of connects and disconnects).

> Maybe i’ve miss something, but i can’t figure it out. Could someone  
> point me to the right way?

The recommended way to do use multiple USB devices, is to match the  
serial number of the UPS. This will make sure that if you plug the  
devices in a different port, the upsnames don't change. Check if the  
serial number is reported by the devices if you run the driver with  
the -DD option:

     /path/to/blazer_usb -DD -u root -a <upsname>

If it is, use that instead. Note that many generic USB to serial  
converters don't have unique serial numbers. In that case, your only  
option is to make sure they are on different busses and match those.  
If that isn't possible either, you can't control them from the same  
host.

Best regards, Arjen

PS  Unless needed, you shouldn't use the vendorid, productid and  
subdriver in ups.conf. Less is better here, since the additional  
matching that is required if you do is a waste of effort (matching  
regular expressions is expensive).
-- 
Please keep list traffic on the list (off-list replies will be rejected)




More information about the Nut-upsuser mailing list