Re: [Nut-upsuser] Multi UPS on Debian

2011-08-03 Thread chad
arjen, 

 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:

i have a similar situation with three ups's also.  two of them are the same, yet
on different bus's and then a third on the same bus.  the third gives a serial
number and the other two do not.

i'm trying to match the serial number to try and get around the driver seeing
them as only one and then getting the errors in the logs and the data stale
readings.

could you provide what the preferred method is for putting the serial number in
ups.conf?

lsusb -v -

Bus 003 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power
Supply
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize0 8
  idVendor   0x051d American Power Conversion
  idProduct  0x0002 Uninterruptible Power Supply
  bcdDevice1.06
  iManufacturer   3 American Power Conversion
  iProduct1 Back-UPS RS 1500 FW:8.g9 .D USB FW:g9 
  iSerial 2 JB0531034179


ups.conf - 

[sam]
driver = usbhid-ups
port = auto
serial = 2 JB0531034179

# upsdrvctl start sam
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
No matching HID UPS found
Driver failed to start (exit status=1)

version - 2.4.3-1ubuntu5

thank you
chad



___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Multi UPS on Debian

2011-08-03 Thread Charles Lepple

On Aug 3, 2011, at 11:27 AM, chad wrote:


 iSerial 2 JB0531034179


When lsusb prints an attribute starting with i (usually a string  
index), it prints the raw index value, followed by the string itself.




ups.conf -

[sam]
   driver = usbhid-ups
   port = auto
   serial = 2 JB0531034179


In your case, you would use:

serial = JB0531034179


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Multi UPS on Debian

2011-04-04 Thread Arnaud Quette
Hi Márk,

2011/4/4 Márk Csaba mar...@gwyll.eu

   Hello,

 i have a server which supposed to control three Eaton UPS connected by USB
 cables. Each UPS is Eaton NV 2000H. (eaton_1, eaton_2, eaton_3)
 The connection is fine with each UPS, if it is configured alone.
 If i configure two or all three, the connections broke up.

 After nut started, tried to start upsdrv manually (eaton_1.
 The log:

 Apr  4 00:43:46 mail blazer_usb[10799]: Startup successful
 Apr  4 00:43:47 mail upsd[10752]: Connected to UPS [eaton_2]:
 blazer_usb-eaton_2
 Apr  4 00:43:50 mail upsmon[10760]: Communications with UPS
 eaton_2@localhost established
 Apr  4 00:43:50 mail upsmon[10760]: Poll UPS [eaton_3@localhost] failed -
 Driver not connected
 Apr  4 00:43:55 mail upsmon[10760]: Poll UPS [eaton_3@localhost] failed -
 Driver not connected
 Apr  4 00:43:56 mail blazer_usb[10799]: Got disconnected by another driver:
 Device or resource busy
 Apr  4 00:43:56 mail kernel: [83482.924512] usb 4-2: usbfs: process 10799
 (blazer_usb) did not claim interface 0 before use
 Apr  4 00:44:00 mail blazer_usb[10804]: Startup successful
 Apr  4 00:44:00 mail upsd[10752]: Connected to UPS [eaton_3]:
 blazer_usb-eaton_3
 Apr  4 00:44:00 mail upsmon[10760]: Poll UPS [eaton_2@localhost] failed -
 Driver not connected
 Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS
 eaton_2@localhost lost
 Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS
 eaton_3@localhost established
 Apr  4 00:44:05 mail upsmon[10760]: Poll UPS [eaton_2@localhost] failed -
 Driver not connected
 Apr  4 00:44:10 mail blazer_usb[10804]: Got disconnected by another driver:
 Device or resource busy
 Apr  4 00:44:10 mail kernel: [83496.177686] usb 4-2: usbfs: process 10804
 (blazer_usb) did not claim interface 0 before use
 ups.conf:
 maxstartdelay = 70
 norating
 novendor
 subdriver = cypress
 [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
 upsmon.conf contains the appropriate MONITOR lines.

 lsusb:
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial
 Bus 004 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 The log with all UPS’s configured:
 Apr  4 00:52:51 mail blazer_usb[11305]: Startup successful
 Apr  4 00:52:55 mail blazer_usb[11307]: Startup successful
 Apr  4 00:52:55 mail blazer_usb[11307]: Communications with UPS lost:
 status read failed!
 Apr  4 00:52:57 mail blazer_usb[11307]: Got disconnected by another driver:
 Device or resource busy
 Apr  4 00:52:57 mail kernel: [84023.476349] usb 4-2: usbfs: process 11307
 (blazer_usb) did not claim interface 0 before use
 Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.x.y port 3493
 Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.xy.yx port 3493
 Apr  4 00:53:06 mail upsd[11314]: listening on 127.0.0.1 port 3493
 Apr  4 00:53:06 mail upsd[11314]: Connected to UPS [eaton_1]:
 blazer_usb-eaton_1
 Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_2]
 (blazer_usb-eaton_2): No such file or directory
 Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_3]
 (blazer_usb-eaton_3): No such file or directory
 Apr  4 00:53:06 mail upsd[11315]: Startup successful
 Apr  4 00:53:06 mail upsmon[11317]: Startup successful
 Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS
 [eaton_1]
 Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS
 [eaton_2]
 Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_2@localhost] failed -
 Driver not connected
 Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS
 eaton_2@localhost lost
 Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS
 [eaton_3]
 Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_3@localhost] failed -
 Driver not connected
 Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS
 eaton_3@localhost lost
 Apr  4 00:53:11 mail upsd[11315]: mainloop: Interrupted system call
 Apr  4 00:53:11 mail upsd[11315]: Signal 15: exiting
 Apr  4 00:53:11 mail upsmon[11319]: Signal 15: exiting
 Apr  4 00:53:11 mail upsmon[11317]: upsmon parent: read
 Apr  4 00:53:13 mail blazer_usb[11305]: Signal 15: exiting
 Maybe i’ve 

Re: [Nut-upsuser] Multi UPS on Debian

2011-04-04 Thread Arjen de Korte

Citeren Márk Csaba mar...@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)


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Multi UPS on Debian

2011-04-04 Thread Márk Csaba

Hello Arjen,

as Armaud mentioned too, i'll have to change the bus-es. The UPS doesn't
give a serial.
I removed the unnecessary lines as you suggested.

Thanks for the reply and for the help!

cheers,
Csaba


- Eredeti üzenet - 
From: Arjen de Korte

Sent: Monday, April 04, 2011 10:58 AM
To: nut-upsuser@lists.alioth.debian.org
Subject: Re: [Nut-upsuser] Multi UPS on Debian

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)


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser 



___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] Multi UPS on Debian

2011-04-03 Thread Márk Csaba
Hello,

i have a server which supposed to control three Eaton UPS connected by USB 
cables. Each UPS is Eaton NV 2000H. (eaton_1, eaton_2, eaton_3)
The connection is fine with each UPS, if it is configured alone. 
If i configure two or all three, the connections broke up.

After nut started, tried to start upsdrv manually (eaton_1. 
The log:

Apr  4 00:43:46 mail blazer_usb[10799]: Startup successful
Apr  4 00:43:47 mail upsd[10752]: Connected to UPS [eaton_2]: blazer_usb-eaton_2
Apr  4 00:43:50 mail upsmon[10760]: Communications with UPS eaton_2@localhost 
established
Apr  4 00:43:50 mail upsmon[10760]: Poll UPS [eaton_3@localhost] failed - 
Driver not connected
Apr  4 00:43:55 mail upsmon[10760]: Poll UPS [eaton_3@localhost] failed - 
Driver not connected
Apr  4 00:43:56 mail blazer_usb[10799]: Got disconnected by another driver: 
Device or resource busy
Apr  4 00:43:56 mail kernel: [83482.924512] usb 4-2: usbfs: process 10799 
(blazer_usb) did not claim interface 0 before use
Apr  4 00:44:00 mail blazer_usb[10804]: Startup successful
Apr  4 00:44:00 mail upsd[10752]: Connected to UPS [eaton_3]: blazer_usb-eaton_3
Apr  4 00:44:00 mail upsmon[10760]: Poll UPS [eaton_2@localhost] failed - 
Driver not connected
Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS eaton_2@localhost 
lost
Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS eaton_3@localhost 
established
Apr  4 00:44:05 mail upsmon[10760]: Poll UPS [eaton_2@localhost] failed - 
Driver not connected
Apr  4 00:44:10 mail blazer_usb[10804]: Got disconnected by another driver: 
Device or resource busy
Apr  4 00:44:10 mail kernel: [83496.177686] usb 4-2: usbfs: process 10804 
(blazer_usb) did not claim interface 0 before use

ups.conf:
maxstartdelay = 70
norating
novendor
subdriver = cypress

[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

upsmon.conf contains the appropriate MONITOR lines.

lsusb:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 004 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The log with all UPS’s configured:
Apr  4 00:52:51 mail blazer_usb[11305]: Startup successful
Apr  4 00:52:55 mail blazer_usb[11307]: Startup successful
Apr  4 00:52:55 mail blazer_usb[11307]: Communications with UPS lost: status 
read failed!
Apr  4 00:52:57 mail blazer_usb[11307]: Got disconnected by another driver: 
Device or resource busy
Apr  4 00:52:57 mail kernel: [84023.476349] usb 4-2: usbfs: process 11307 
(blazer_usb) did not claim interface 0 before use
Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.x.y port 3493
Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.xy.yx port 3493
Apr  4 00:53:06 mail upsd[11314]: listening on 127.0.0.1 port 3493
Apr  4 00:53:06 mail upsd[11314]: Connected to UPS [eaton_1]: blazer_usb-eaton_1
Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_2] 
(blazer_usb-eaton_2): No such file or directory
Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_3] 
(blazer_usb-eaton_3): No such file or directory
Apr  4 00:53:06 mail upsd[11315]: Startup successful
Apr  4 00:53:06 mail upsmon[11317]: Startup successful
Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS [eaton_1]
Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS [eaton_2]
Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_2@localhost] failed - 
Driver not connected
Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS eaton_2@localhost 
lost
Apr  4 00:53:06 mail upsd[11315]: User admin@127.0.0.1 logged into UPS [eaton_3]
Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_3@localhost] failed - 
Driver not connected
Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS eaton_3@localhost 
lost
Apr  4 00:53:11 mail upsd[11315]: mainloop: Interrupted system call
Apr  4 00:53:11 mail upsd[11315]: Signal 15: exiting
Apr  4 00:53:11 mail upsmon[11319]: Signal 15: exiting
Apr  4 00:53:11 mail upsmon[11317]: upsmon parent: read
Apr  4 00:53:13 mail blazer_usb[11305]: Signal 15: exiting

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

Thanks in advance,