networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.1k stars 351 forks source link

[HCL] FSP/Fortron (Voltronic Power) Champ Tower 1K fully supported by nutdrv_qx #1872

Closed linuxgemini closed 1 year ago

linuxgemini commented 1 year ago

Hi, adding to #1691, the UPS actually uses the Voltronic Power USB format, which provides more detailed statistics with the nutdrv_qx driver; for instance the output voltage, output frequency etc.

lsusb output:

root@nanopi-box2:~# lsusb -v -d 0665:5161

Bus 005 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0665 Cypress Semiconductor
  idProduct          0x5161 USB to Serial
  bcdDevice            0.02
  iManufacturer           1 INNO TECH
  iProduct                2 USB to Serial
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 20100813
    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
      bInterfaceProtocol      0
      iInterface              4 Sample HID
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         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               1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
root@nanopi-box2:~#

upsc output:

root@nanopi-box2:~# upsc Champ1KVA
Init SSL without certificate database
battery.charge: 100
battery.energysave: no
battery.packs: 1
battery.protection: yes
battery.runtime: 22440
battery.voltage: 27.20
battery.voltage.nominal: 24.0
device.model: WPHVT1K0
device.type: ups
driver.name: nutdrv_qx
driver.parameter.bus: 005
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB to Serial
driver.parameter.productid: 5161
driver.parameter.synchronous: no
driver.parameter.vendor: INNO TECH
driver.parameter.vendorid: 0665
driver.version: 2.7.4
driver.version.data: Voltronic 0.06
driver.version.internal: 0.28
input.current.nominal: 4.0
input.frequency: 49.9
input.frequency.high: 53.0
input.frequency.low: 47.0
input.frequency.nominal: 50.0
input.phases: 1
input.transfer.high: 232
input.transfer.high.max: 244
input.transfer.high.min: 227
input.transfer.low: 208
input.transfer.low.max: 213
input.transfer.low.min: 196
input.voltage: 227.0
input.voltage.nominal: 220.0
output.current: 0.0
output.current.nominal: 4
output.frequency: 49.9
output.frequency.nominal: 50.0
output.phases: 1
output.power.maximum.percent: 0
output.power.minimum.percent: 0
output.powerfactor: 0.9
output.voltage: 219.7
output.voltage.nominal: 220.0
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: 01060.07
ups.firmware.aux: P01
ups.load: 0
ups.power.nominal: 1000
ups.productid: 5161
ups.start.auto: yes
ups.start.battery: yes
ups.status: OL
ups.temperature: 28.7
ups.type: online
ups.vendorid: 0665
root@nanopi-box2:~#

upsrw output:

root@nanopi-box2:~# upsrw Champ1KVA
[battery.energysave]
Switch off when running on battery and no/low load
Type: ENUM
Option: "no" SELECTED
Option: "yes"

[battery.packs]
Number of battery packs
Type: RANGE
Option: "1-99" SELECTED

[battery.protection]
Prevent deep discharge of battery
Type: ENUM
Option: "no"
Option: "yes" SELECTED

[input.frequency.high]
Maximum input line frequency (Hz)
Type: RANGE
Option: "53-60" SELECTED

[input.frequency.low]
Minimum input line frequency (Hz)
Type: RANGE
Option: "40-47" SELECTED

[input.transfer.high]
High voltage transfer point (V)
Type: RANGE
Option: "227-244" SELECTED

[input.transfer.low]
Low voltage transfer point (V)
Type: RANGE
Option: "196-213" SELECTED

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: RANGE
Option: "12-5940" SELECTED

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: RANGE
Option: "0-599940" SELECTED

[ups.start.auto]
UPS starts when mains is (re)applied
Type: ENUM
Option: "no"
Option: "yes" SELECTED

[ups.start.battery]
Allow to start UPS from battery
Type: ENUM
Option: "no"
Option: "yes" SELECTED

root@nanopi-box2:~#

upscmd -l output:

root@nanopi-box2:~# upscmd -l Champ1KVA
Instant commands supported on UPS [Champ1KVA]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.toggle - Toggle the UPS beeper
bypass.start - Put the UPS in bypass mode
bypass.stop - Take the UPS out of bypass mode
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
root@nanopi-box2:~#

ups.conf used:

[Champ1KVA]
    driver = "nutdrv_qx"
    port = "auto"
    vendorid = "0665"
    productid = "5161"
    product = "USB to Serial"
    vendor = "INNO TECH"
    bus = "005"
linuxgemini commented 1 year ago

Including the DDL dump (gzipped for github to accept it): WPHVT1K0nutdrv_qx2.7.401.dev.gz