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
1.99k stars 349 forks source link

[HCL] Tecnoware UPS EXA PLUS 1500 supported by BLAZER_USB #2074

Open ginlik1996 opened 1 year ago

ginlik1996 commented 1 year ago

Tecnoware UPS EXA PLUS 1500

https://www.tecnoware.com/it-IT/Dettaglio/Famiglia/186 https://www.tecnoware.com/Downloads/EXA_PLUS/Manual_EXA_PLUS_1000-1500_ITA.pdf

UPSC:

battery.charge: 100
battery.runtime: 2143
battery.voltage: 28.00
battery.voltage.high: 26.00
battery.voltage.low: 20.80
battery.voltage.nominal: 24.0
device.mfr:
device.model: 1200VA
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: blazer_usb
driver.parameter.default.battery.voltage.high: 26.00
driver.parameter.default.battery.voltage.low: 20.80
driver.parameter.default.battery.voltage.nominal: 24.00
driver.parameter.pollinterval: 2
driver.parameter.port: 005
driver.parameter.runtimecal: 300,100,600,50
driver.parameter.synchronous: auto
driver.state: quiet
driver.version: 2.8.0.1
driver.version.internal: 0.17
driver.version.usb: libusb-1.0.26 (API: 0x1000108)
input.current.nominal: 5.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 233.0
input.voltage.fault: 0.5
input.voltage.nominal: 230
output.voltage: 230.5
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware:
ups.load: 14
ups.mfr:
ups.model: 1200VA
ups.productid: 5161
ups.status: OL
ups.temperature: 28.0
ups.type: offline / line interactive
ups.vendorid: 0665

UPSCMD:

Instant commands supported on UPS [Tecnoware]:

beeper.toggle - Toggle the UPS beeper
driver.killpower - Description unavailable
driver.reload - Description unavailable
driver.reload-or-error - Description unavailable
driver.reload-or-exit - Description unavailable
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
ginlik1996 commented 1 year ago

Just to update everyone, the UPS was disconnecting after some hour, and i had to reboot the server to fix it. Since then i added the following (same settings needed for CyberPower UPS) and now is working fine.

ups.conf

pollonly = "enabled"

upsd.conf

MAXAGE 30

upsmon.conf

DEADTIME 30

I also added the following to get the "Runtime Left" working.

ups.conf

default.battery.voltage.high = 26.00
default.battery.voltage.low = 20.80
default.battery.voltage.nominal = 24.00
runtimecal = 300,100,600,50
griland-code commented 1 year ago

Hi, I'm exeperiencing issues to configure this kind of UPS. take in consideration that on the same host I have successfully configured another APC UPS on another USB port (051d:0002) with the driver usbhid-ups. Below all the details. I don't know if I'm doing something wrong. May I kindly ask you a little support on that?

Looking forward to your feedback, best regards

OS VERSION - Virtualized - USB passthrough by bus 0665:5161

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"

/var/log/syslog

Oct  7 19:31:38  upsmon[2464]: Poll UPS [B1-TW-EP1500@192.168.X.X] failed - Driver not connected
Oct  7 19:31:38  upsmon[2464]: UPS B1-TW-EP1500@192.168.X.X is unavailable

ups.conf

[B1-TW-EP1500]
    driver = "blazer_usb"
    port   = auto
    pollinterval = 15
    desc = "TECNOWARE UPS EXAPLUS 1500"
    langid_fix = "0x409"

upsmon.conf

MONITOR B1-TW-EP1500@192.168.X.X 1 upsmon XXXXXXXXXXXX master

lsusb - output

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lsusb -v -s 002:003 - output

Bus 002 Device 003: 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           3 HID UPS
  iProduct                1 HID UPS
  iSerial                 5
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    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
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          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               5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     777
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval             255
Device Status:     0x0000
  (Bus Powered)

/usr/lib/nut/blazer_usb -a B1-TW-EP1500 -DD - output

Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4)
   0.000000 debug level is '2'
   0.001710 language ID workaround enabled (using '0x409')
   0.072966 Checking device (1D6B/0003) (003/001)
   0.116486 - VendorID: 1d6b
   0.116611 - ProductID: 0003
   0.116659 - Manufacturer: unknown
   0.116772 - Product: unknown
   0.116851 - Serial Number: unknown
   0.116903 - Bus: 003
   0.116998 - Device release number: 0504
   0.117031 Trying to match device
   0.117109 Device does not match - skipping
   0.119244 Checking device (0665/5161) (002/003)
   0.128839 - VendorID: 0665
   0.128871 - ProductID: 5161
   0.128881 - Manufacturer: HID UPS
   0.128890 - Product: HID UPS
   0.128898 - Serial Number:
   0.128907 - Bus: 002
   0.128916 - Device release number: 0002
   0.128941 Trying to match device
   0.128958 Device matches
   0.129898 First supported language ID: 0x409 (please report to the NUT maintainer!)
   0.129947 Trying megatec protocol...
   0.517305 blazer_status: short reply
   0.517374 Status read 1 failed
   0.905304 blazer_status: short reply
   0.905390 Status read 2 failed
   1.297278 blazer_status: short reply
   1.297346 Status read 3 failed
   1.297357 Trying mustek protocol...
   1.689275 blazer_status: short reply
   1.689350 Status read 1 failed
   2.081345 blazer_status: short reply
   2.081424 Status read 2 failed
   2.469249 blazer_status: short reply
   2.469316 Status read 3 failed
   2.469327 Trying megatec/old protocol...
   2.861314 blazer_status: short reply
   2.861380 Status read 1 failed
   3.249314 blazer_status: short reply
   3.249390 Status read 2 failed
   3.641241 blazer_status: short reply
   3.641315 Status read 3 failed
   3.641327 Trying zinto protocol...
   4.033284 blazer_status: short reply
   4.033355 Status read 1 failed
   4.421353 blazer_status: short reply
   4.421444 Status read 2 failed
   4.809320 blazer_status: short reply
   4.809382 Status read 3 failed
   4.809392 No supported UPS detected
griland-code commented 1 year ago

hi @jimklimov, thank you for follow up! Ahead of your commit and issue reported, what should I do? download the new version of NUT? or you are preparing a new release? take in consideration that this are the version of NUT sw installed:

any advice will be appreciated! looking forward to your feedback, best regards

jimklimov commented 12 months ago

Hi, one idea to try would be nutdrv_qx driver as it tries to incorporate several older ones (including blazer) that talk similar protocols.

The short read might be related to an issue that could fixed recently (during work on PR for armac subdriver IIRC), different vendors took different liberties with the protocol implementations. For checking if it is fixed and if it indeed is the problem you face, you'd currently need to build the current NUT sources (see https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests) and run the driver from build workspace to probe if it sees the device; you don't have to "corrupt" the existing installation until you confirm the replacement is better.

DjMayone commented 5 months ago

Just to update everyone, the UPS was disconnecting after some hour, and i had to reboot the server to fix it.

Since then i added the following (same settings needed for CyberPower UPS) and now is working fine.

ups.conf


pollonly = "enabled"

upsd.conf


MAXAGE 30

upsmon.conf


DEADTIME 30

I also added the following to get the "Runtime Left" working.

ups.conf


default.battery.voltage.high = 26.00

default.battery.voltage.low = 20.80

default.battery.voltage.nominal = 24.00

runtimecal = 300,100,600,50

Do you also have this parameters for Era Plus 2000? I would like to set up runtimecal but I don't know how... thank you!