LINUX.ORG.RU
решено ФорумAdmin

Подключение UPS Ippon Innova G2 1000 к NUT

 ,


0

1

В продолжении https://www.linux.org.ru/forum/admin/13554424

Есть ИБП Ippon Innova G2 1000 с VID:PID 06da:ffff. Да, странные VID:PID 06da ffff.

Также есть NUT версии 2.7.2-4ubuntu1.2 и Ubuntu 16.04.3 LTS

alexey@alexey-laptop:~$ uname -a
Linux alexey-laptop 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
alexey@alexey-laptop:~$ lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial

alexey@alexey-laptop:~$ ls -la /dev/usb/

итого 0
drwxr-xr-x  2 root root     80 фев 14 18:52 .
drwxr-xr-x 22 root root   4580 фев 14 18:54 ..
crw-------  1 root root 180, 1 фев 14 18:51 hiddev1
crw-------  1 root root 180, 2 фев 14 18:52 hiddev2

alexey@alexey-laptop:~$ lsusb

Bus 002 Device 004: ID 1199:9011 Sierra Wireless, Inc. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e052 Foxconn / Hon Hai 
Bus 001 Device 003: ID 04f2:b2fc Chicony Electronics Co., Ltd 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 06da:ffff Phoenixtec Power Co., Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

alexey@alexey-laptop:~$ sudo lsusb -v -d 06da:ffff

Bus 003 Device 002: ID 06da:ffff Phoenixtec Power Co., Ltd 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x06da Phoenixtec Power Co., Ltd
  idProduct          0xffff 
  bcdDevice            1.29
  iManufacturer           1 PPC
  iProduct                2 HID UPS
  iSerial                 4 NG21KBKX1DCX00011   
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    1436
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              20
Device Status:     0x0000
  (Bus Powered)

После подключения UPS к ноутбуку, dmesg:


[   43.208153] usb 3-4: new full-speed USB device number 2 using xhci_hcd
[   43.338851] usb 3-4: New USB device found, idVendor=06da, idProduct=ffff
[   43.338855] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[   43.338857] usb 3-4: Product: HID UPS
[   43.338858] usb 3-4: Manufacturer: PPC
[   43.338860] usb 3-4: SerialNumber: NG21KBKX1DCX00011   
[   43.339038] usb 3-4: ep 0x81 - rounding interval to 128 microframes, ep desc says 160 microframes
[   43.348742] hidraw: raw HID events driver (C) Jiri Kosina
[   43.359926] usbcore: registered new interface driver usbhid
[   43.359929] usbhid: USB HID core driver
[   43.377026] hid-generic 0003:06DA:FFFF.0001: hiddev0,hidraw0: USB HID v1.11 Device [PPC HID UPS] on usb-0000:00:14.0-4/input0

Пытался использовать драйвер blazer_usb с таким конфигом /etc/ups/ups.conf:

[ippon]
    driver = blazer_usb
    port = /dev/usb/hiddev1
    vendorid = 06da
    productid = ffff
Или
[ippon]
    driver = blazer_usb
    port = /dev/usb/hiddev2
    vendorid = 06da
    productid = ffff
Или
[ippon]
    driver = blazer_usb
    port = auto
    vendorid = 06da
    productid = ffff

То пишет
alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2)
No supported devices found. Please check your device availability with 'lsusb' and make sure you have an up-to-date version of NUT. If this does not help, try running the driver with at least 'subdriver', 'vendorid' and 'productid' options specified. Please refer to the man page for details about these options
(man 8 blazer_usb).

Driver failed to start (exit status=1)

Если добавить строчку subdriver = phoenix, т.е. конфиг /etc/ups/ups.conf приобретет вид:

 
 [ippon]
    driver = blazer_usb
    port = auto
    vendorid = 06da
    productid = ffff
    subdriver = phoenix 
То пишет:
alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Megatec/Q1 protocol USB driver 0.11 (2.7.2)
No supported UPS detected
Driver failed to start (exit status=1)

Если заменить драйвер на nutdrv_qx, то конфиг /etc/ups/ups.conf получится следующий:

 [ippon]
    driver = nutdrv_qx
    port = auto
    vendorid = 06da
    productid = ffff
После этого все равно не работает:
alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic Q* USB/Serial driver 0.06 (2.7.2)
USB communication driver 0.32 No supported devices found. Please check your device availability with 'lsusb' and make sure you have an up-to-date version of NUT. If this does not help, try running the driver with at least 'subdriver', 'vendorid' and 'productid' options specified. Please refer to the man page for details about these options
(man 8 nutdrv_qx).

Driver failed to start (exit status=1)

Если добавить строчку subdriver = phoenix, т.е. конфиг /etc/ups/ups.conf приобретет вид:

 [ippon]
    driver = nutdrv_qx
    port = auto
    vendorid = 06da
    productid = ffff
    subdriver = phoenix

И опять не работает:
alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic Q* USB/Serial driver 0.06 (2.7.2)
USB communication driver 0.32
Startup timer elapsed, continuing...
Device not supported!

Менял порт и на auto и на /dev/usb/hiddev2 и /dev/usb/hiddev1 (один из интерфейсов – аккумулятор ноутбука, а другой должен быть от ИБП).

Так вот хотелось узнать, какой драйвер NUT нужен для UPS Ippon Innova G2 1000 (нет, именно проблема скорее всего в драйвере, так как UPS новый, а кабель USB только что из коробки, где был сам ИБП).

★★★★★

Последнее исправление: Root-msk (всего исправлений: 1)
Ответ на: комментарий от legolegs

ippon это такой зонтичный бренд для всякого ноунейма. Попробуй этот драйвер: http://networkupstools.org/docs/man/bestups.html

Что-то не работает с драйвером bestups.

alexey@alexey-laptop:~$ ls -la /dev/usb/

итого 0
drwxr-xr-x  2 root root     80 фев 14 22:44 .
drwxr-xr-x 22 root root   4580 фев 14 22:44 ..
crw-------  1 root root 180, 0 фев 14 22:44 hiddev0
crw-------  1 root root 180, 1 фев 14 22:44 hiddev1

Если файл /etc/ups/ups.conf имеет такой вид:

 [ippon]
    driver = bestups
    port = auto
    vendorid = 06da
    productid = ffff

То:

alexey@alexey-laptop:~$ sudo upsdrvctl start

Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Best UPS driver 1.06 (2.7.2)

Fatal error: 'vendorid' is not a valid variable name for this driver.

Look in the man page or call this driver with -h for a list of
valid variable names and flags.

Если файл /etc/ups/ups.conf имеет такой вид:

 [ippon]
    driver = bestups
    port = auto

То:

alexey@alexey-laptop:~$ sudo upsdrvctl start

Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Best UPS driver 1.06 (2.7.2)

Unable to open auto: No such file or directory

Things to try:

 - Check 'port=' in ups.conf

 - Check owner/permissions of all parts of path

Fatal error: unusable configuration
Driver failed to start (exit status=1)

Если файл /etc/ups/ups.conf имеет такой вид:

 [ippon]
    driver = bestups
    port= /dev/usb/hiddev1

То:

alexey@alexey-laptop:~$ sudo upsdrvctl start

alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Best UPS driver 1.06 (2.7.2)
tcgetattr(/dev/usb/hiddev1): Invalid argument
Driver failed to start (exit status=1)

Если файл /etc/ups/ups.conf имеет такой вид:

 [ippon]
    driver = bestups
    port= /dev/usb/hiddev0

То:

alexey@alexey-laptop:~$ sudo upsdrvctl start

Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Best UPS driver 1.06 (2.7.2)
tcgetattr(/dev/usb/hiddev0): Invalid argument
Driver failed to start (exit status=1)

Не, конечно можно купить SNMP плату. Но она стоит 7k RUB, а сам UPS не намного дороже – 11.5k RUB. Жаба душит. Хотелось бы по USB. Или на крайний случай через RS-232. Через переходник USB-COM.

Root-msk ★★★★★
() автор топика
Последнее исправление: Root-msk (всего исправлений: 1)

Да, много написано и по делу.

Кароче, драйвер для USB - это usbhid-ups, а не blazer_usb. Вот файл /etc/ups/ups.conf

 [ipponusb]
   driver = usbhid-ups
   port = auto

И получаем:

alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
USB communication driver 0.32
Using subdriver: Liebert HID 0.3
alexey@alexey-laptop:~$ sudo service nut-server start
alexey@alexey-laptop:~$ sudo service nut-client start
alexey@alexey-laptop:~$ upsc ipponusb@localhost

Init SSL without certificate database
battery.charge: 91
battery.runtime: 5600
battery.type: PbAc
battery.voltage: 27
battery.voltage.nominal: 24
device.mfr: PPC
device.model: HID UPS
device.serial: NG21KBKX1DCX00011   
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: Liebert HID 0.3
driver.version.internal: 0.38
ups.load: 17
ups.mfr: PPC
ups.model: HID UPS
ups.productid: ffff
ups.serial: NG21KBKX1DCX00011   
ups.status: OL CHRG
ups.vendorid: 06da

alexey@alexey-laptop:~$ upscmd -l ipponusb@localhost

Instant commands supported on UPS [ipponusb]:

alexey@alexey-laptop:~$

Далее,я купил USB-COM переходник Aten UC232A-A7 у которого VID:PID 0557:2008.

alexey@alexey-laptop:~$ lsusb

Bus 002 Device 004: ID 1199:9011 Sierra Wireless, Inc. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e052 Foxconn / Hon Hai 
Bus 001 Device 003: ID 04f2:b2fc Chicony Electronics Co., Ltd 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

alexey@alexey-laptop:~$ dmesg

[   33.670479] usb 3-3: new full-speed USB device number 2 using xhci_hcd
[   33.799450] usb 3-3: New USB device found, idVendor=0557, idProduct=2008
[   33.799460] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   33.799464] usb 3-3: Product: USB-Serial Controller D
[   33.799469] usb 3-3: Manufacturer: Prolific Technology Inc. 
[   34.816308] usbcore: registered new interface driver pl2303
[   34.816324] usbserial: USB Serial support registered for pl2303
[   34.816345] pl2303 3-3:1.0: pl2303 converter detected
[   34.816959] usb 3-3: pl2303 converter now attached to ttyUSB3

alexey@alexey-laptop:~$ sudo lsusb -v -d 0557:2008

Bus 003 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0557 ATEN International Co., Ltd
  idProduct          0x2008 UC-232A Serial Port [pl2303]
  bcdDevice            3.00
  iManufacturer           1 Prolific Technology Inc. 
  iProduct                2 USB-Serial Controller D
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

И подключил UPS через переходник с драйвером blazer_ser. Вот файл /etc/ups/ups.conf

[ipponrs232]
   driver = blazer_ser
   port = /dev/ttyUSB3

alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Megatec/Q1 protocol serial driver 1.56 (2.7.2)
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf


Using 'guestimation' (low: 20.800000, high: 26.000000)!
Battery runtime will not be calculated (runtimecal not set)
alexey@alexey-laptop:~$ sudo service nut-server start
alexey@alexey-laptop:~$ sudo service nut-client start
alexey@alexey-laptop:~$ upsc ipponrs232@localhost

Init SSL without certificate database
battery.charge: 100
battery.voltage: 26.88
battery.voltage.high: 26.00
battery.voltage.low: 20.80
battery.voltage.nominal: 24.0
device.type: ups
driver.name: blazer_ser
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyUSB3
driver.version: 2.7.2
driver.version.internal: 1.56
input.current.nominal: 4.0
input.frequency: 49.9
input.frequency.nominal: 50
input.voltage: 232.7
input.voltage.fault: 232.8
input.voltage.nominal: 230
output.voltage: 229.7
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 17
ups.status: OL
ups.temperature: 25.0
ups.type: online
alexey@alexey-laptop:~$ upscmd -l ipponrs232@localhost
Instant commands supported on UPS [ipponrs232]:

beeper.toggle - Toggle the UPS beeper
load.off - Turn off the load immediately
load.on - Turn on the load immediately
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start - Start a battery test
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test
alexey@alexey-laptop:~$

Root-msk ★★★★★
() автор топика
Последнее исправление: Root-msk (всего исправлений: 1)
Ответ на: комментарий от Root-msk

А вообще странно, что стали делать USB HID по USB, но обычный по RS-232. Вот ИБП APC Smart-UPS SUA750I. VID:PID 051d:0002. При подключении USB видим:

alexey@alexey-laptop:~$ dmesg

[   28.120543] usb 3-4: new low-speed USB device number 2 using xhci_hcd
[   28.317382] usb 3-4: New USB device found, idVendor=051d, idProduct=0002
[   28.317386] usb 3-4: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[   28.317388] usb 3-4: Product: Smart-UPS 750 FW:651.13.I USB FW:7.3
[   28.317390] usb 3-4: Manufacturer: American Power Conversion
[   28.317392] usb 3-4: SerialNumber: AS0641122396
[   28.317600] usb 3-4: ep 0x81 - rounding interval to 512 microframes, ep desc says 800 microframes
[   28.331203] hidraw: raw HID events driver (C) Jiri Kosina
[   28.388860] usbcore: registered new interface driver usbhid
[   28.388863] usbhid: USB HID core driver
[   29.795234] hid-generic 0003:051D:0002.0001: hiddev0,hidraw0: USB HID v1.10 Device [American Power Conversion Smart-UPS 750 FW:651.13.I USB FW:7.3] on usb-0000:00:14.0-4/input0
alexey@alexey-laptop:~$ lsusb
Bus 002 Device 004: ID 1199:9011 Sierra Wireless, Inc. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e052 Foxconn / Hon Hai 
Bus 001 Device 003: ID 04f2:b2fc Chicony Electronics Co., Ltd 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
alexey@alexey-laptop:~$ sudo lsusb -v -d 051d:0002
Bus 003 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x051d American Power Conversion
  idProduct          0x0002 Uninterruptible Power Supply
  bcdDevice            0.06
  iManufacturer           3 American Power Conversion
  iProduct                1 Smart-UPS 750 FW:651.13.I USB FW:7.3
  iSerial                 2 AS0641122396
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration         11 1
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower               30mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    1064
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval             100
Device Status:     0x0001
  Self Powered
Файл /etc/nut/ups.conf выглядит так:
  [apcusb]
    driver = usbhid-ups
    port = auto
alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
USB communication driver 0.32
Using subdriver: APC HID 0.95
alexey@alexey-laptop:~$ sudo service nut-server start
alexey@alexey-laptop:~$ sudo service nut-client start
alexey@alexey-laptop:~$ upsc apcusb@localhost
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2018/01/01
battery.runtime: 6900
battery.runtime.low: 120
battery.temperature: 36.4
battery.type: PbAc
battery.voltage: 27.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS 750
device.serial: AS0641122396
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: low
input.transfer.high: 253
input.transfer.low: 196
input.voltage: 228.9
output.current: 0.12
output.frequency: 50.0
output.voltage: 228.9
output.voltage.nominal: 230.0
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 651.13.I
ups.firmware.aux: 7.3
ups.load: 7.1
ups.mfr: American Power Conversion
ups.mfr.date: 2006/10/04
ups.model: Smart-UPS 750
ups.productid: 0002
ups.serial: AS0641122396
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 051d
alexey@alexey-laptop:~$ upscmd -l apcusb@localhost
Instant commands supported on UPS [apcusb]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
load.on - Turn on the load immediately
load.on.delay - Turn on the load with a delay (seconds)
shutdown.reboot - Shut down the load briefly while rebooting the UPS
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test
test.panel.start - Start testing the UPS panel
test.panel.stop - Stop a UPS panel test
alexey@alexey-laptop:~$ И если APC Smart-UPS 750VA подключить по RS-232 через провод 940-0024, то выдает ту же инфу в отличии от Ippon Innova G2 1000.

Вот файл /etc/nut/ups.conf

  [apcrs232]
    driver = apcsmart
    port = /dev/ttyUSB3

То:

Root-msk ★★★★★
() автор топика
Ответ на: комментарий от Root-msk

alexey@alexey-laptop:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - APC Smart protocol driver 3.1 (2.7.2)
APC command table version 3.1
alexey@alexey-laptop:~$ sudo service nut-server start
alexey@alexey-laptop:~$ sudo service nut-client start
alexey@alexey-laptop:~$ upsc apcrs232@localhost

Init SSL without certificate database
battery.alarm.threshold: N
battery.charge: 100.0
battery.charge.restart: 00
battery.date: 01/01/18
battery.packs: 000
battery.runtime: 6900
battery.runtime.low: 120
battery.voltage: 27.27
battery.voltage.nominal: 024
device.mfr: APC
device.model: Smart-UPS 750
device.serial: AS0641122396
device.type: ups
driver.name: apcsmart
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyUSB3
driver.version: 2.7.2
driver.version.internal: 3.1
input.frequency: 50.00
input.quality: FF
input.sensitivity: L
input.transfer.high: 253
input.transfer.low: 196
input.transfer.reason: simulated power failure or UPS test
input.voltage: 228.9
input.voltage.maximum: 228.9
input.voltage.minimum: 228.9
output.voltage: 228.9
output.voltage.nominal: 230
ups.delay.shutdown: 090
ups.delay.start: 000
ups.firmware: 651.13.I
ups.id: UPS_IDEN
ups.load: 007.1
ups.mfr: APC
ups.mfr.date: 10/04/06
ups.model: Smart-UPS 750
ups.serial: AS0641122396
ups.status: OL
ups.temperature: 036.4
ups.test.interval: 1209600
ups.test.result: NO
alexey@alexey-laptop:~$ upscmd -l apcrs232@localhost
Instant commands supported on UPS [apcrs232]:

calibrate.start - Start run time calibration
calibrate.stop - Stop run time calibration
load.off - Turn off the load immediately
load.on - Turn on the load immediately
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
test.battery.start - Start a battery test
test.battery.stop - Stop the battery test
test.failure.start - Start a simulated power failure
test.panel.start - Start testing the UPS panel
alexey@alexey-laptop:~$ Если поставить apcupsd и в файле /etc/apcupsd/apcupsd.conf прописать UPSCABLE usb и UPSTYPE usb, а DEVICE оставить пустым, то:
alexey@alexey-laptop:~$ sudo apcupsd
alexey@alexey-laptop:~$ apcaccess
APC      : 001,043,1017
DATE     : 2018-02-22 22:26:12 +0300  
HOSTNAME : alexey-laptop
VERSION  : 3.14.12 (29 March 2014) debian
UPSNAME  : alexey-laptop
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2018-02-22 22:26:07 +0300  
MODEL    : Smart-UPS 750 
STATUS   : ONLINE 
LINEV    : 228.9 Volts
LOADPCT  : 7.1 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 108.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 228.9 Volts
SENSE    : Low
DWAKE    : -1 Seconds
DSHUTD   : 90 Seconds
LOTRANS  : 196.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 0.0 Percent
ITEMP    : 36.4 C
ALARMDEL : No alarm
BATTV    : 27.3 Volts
LINEFREQ : 50.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 14 days
STATFLAG : 0x05000008
MANDATE  : 2006-10-04
SERIALNO : AS0641122396
BATTDATE : 2018-01-01
NOMOUTV  : 230 Volts
NOMBATTV : 24.0 Volts
FIRMWARE : 651.13.I USB FW:7.3
END APC  : 2018-02-22 22:26:16 +0300
Если поставить apcupsd и в файле /etc/apcupsd/apcupsd.conf прописать UPSCABLE smart и UPSTYPE apcsmart, а DEVICE оставить пустым, то:
alexey@alexey-laptop:~$ sudo apcupsd
alexey@alexey-laptop:~$ apcaccess
APC      : 001,050,1138
DATE     : 2018-02-22 22:39:11 +0300  
HOSTNAME : alexey-laptop
VERSION  : 3.14.12 (29 March 2014) debian
UPSNAME  : UPS_IDEN
CABLE    : Custom Cable Smart
DRIVER   : APC Smart UPS (any)
UPSMODE  : Stand Alone
STARTTIME: 2018-02-22 22:38:59 +0300  
MODEL    : Smart-UPS 750
STATUS   : ONLINE 
LINEV    : 230.4 Volts
LOADPCT  : 9.7 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 93.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 230.4 Volts
MINLINEV : 230.4 Volts
OUTPUTV  : 230.4 Volts
SENSE    : Low
DWAKE    : 0 Seconds
DSHUTD   : 90 Seconds
DLOWBATT : 2 Minutes
LOTRANS  : 196.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 0.0 Percent
ITEMP    : 36.4 C
ALARMDEL : No alarm
BATTV    : 27.3 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x05000008
REG1     : 0x00
REG2     : 0x00
REG3     : 0x00
MANDATE  : 10/04/06
SERIALNO : AS0641122396
BATTDATE : 01/01/18
NOMOUTV  : 230 Volts
NOMBATTV : 24.0 Volts
EXTBATTS : 0
FIRMWARE : 651.13.I
END APC  : 2018-02-22 22:39:59 +0300
alexey@alexey-laptop:~$
Но самое интересное, что если в файле /etc/apcupsd/apcupsd.conf прописать UPSCABLE usb и UPSTYPE usb, а DEVICE оставить пустым, то и Ippon Innova G2 1000 тоже будет работать:
alexey@alexey-laptop:~$ sudo apcupsd
alexey@alexey-laptop:~$ apcaccess
APC      : 001,031,0743
DATE     : 2018-02-22 22:47:13 +0300  
HOSTNAME : alexey-laptop
VERSION  : 3.14.12 (29 March 2014) debian
UPSNAME  : alexey-laptop
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2018-02-22 22:47:11 +0300  
MODEL    : HID UPS
STATUS   : ONLINE 
LOADPCT  : 22.0 Percent
BCHARGE  : 79.0 Percent
TIMELEFT : 83.1 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 229.0 Volts
DWAKE    : -1 Seconds
LOTRANS  : 100.0 Volts
HITRANS  : 300.0 Volts
ALARMDEL : 30 Seconds
LINEFREQ : 49.9 Hz
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : NG21KBKX1DCX00011   
NOMPOWER : 540 Watts
END APC  : 2018-02-22 22:47:14 +0300  
alexey@alexey-laptop:~$
Странно, почему то у Ippon Innova G2 1000 USB HID какой-то урезанный.

Root-msk ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.