networkupstools / nut-ddl

Network UPS Tools Devices Dumps Library
http://networkupstools.org/ddl/index.html#_supported_devices
4 stars 16 forks source link

Add 2E PS1000L to the list of compatible devices #41

Closed jenneron closed 1 month ago

jenneron commented 5 months ago

Official page: https://2e.ua/en/products/2e-ps1000l-1000va-800w-dc-24v-2xschuko-1xc13/

It has RJ45 and USB ports, comes with UPSmart utility

UPSmart screenshots ![2](https://github.com/networkupstools/nut-ddl/assets/47537416/da2db390-c483-4f17-9d82-1ce23903d6dd) ![1](https://github.com/networkupstools/nut-ddl/assets/47537416/6eb2c4d8-1ae2-4a58-8a7b-a4aee9945705) ![3](https://github.com/networkupstools/nut-ddl/assets/47537416/fe9ffd88-b41d-40c6-9937-284141df0441)
UPSmart logs [DebugLog20240608_UART.csv](https://github.com/user-attachments/files/15749091/DebugLog20240608_UART.csv) [SPhAnalogLog20240608.csv](https://github.com/user-attachments/files/15749092/SPhAnalogLog20240608.csv) [SPhEventLog202406.csv](https://github.com/user-attachments/files/15749093/SPhEventLog202406.csv)

I use USB connection with nutdrv_qx driver, it seems to use different protocol than UPSmart (maybe I should change it?)

ups.conf ``` [2e-ps1000l] driver = "nutdrv_qx" port = "auto" vendorid = "0001" productid = "0000" product = "ATCL FOR UPS" serial = "ATCL FOR UPS" vendor = "ATCL FOR UPS" # LiFePO4 2x 12V override.battery.voltage.nominal="24" default.battery.voltage.low = "20" default.battery.voltage.high = "29.2" # 2 hours 24 minutes at 100% load (800W) # 4 hours 48 minutes at 50% load (400W) runtimecal="8640,100,17280,50" # 6.5 hours charge time chargetime="24000" idleload="10" ```
upsc output ``` $ upsc 2e-ps1000l battery.charge: 79 battery.runtime: 48969 battery.voltage: 27.3 battery.voltage.high: 29.2 battery.voltage.low: 20 battery.voltage.nominal: 24 device.type: ups driver.debug: 0 driver.flag.allow_killpower: 0 driver.name: nutdrv_qx driver.parameter.chargetime: 24000 driver.parameter.default.battery.voltage.high: 29.2 driver.parameter.default.battery.voltage.low: 20 driver.parameter.idleload: 10 driver.parameter.override.battery.voltage.nominal: 24 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.product: ATCL FOR UPS driver.parameter.productid: 0000 driver.parameter.runtimecal: 8640,100,17280,50 driver.parameter.serial: ATCL FOR UPS driver.parameter.synchronous: auto driver.parameter.vendor: ATCL FOR UPS driver.parameter.vendorid: 0001 driver.state: quiet driver.version: 2.8.2 driver.version.data: Megatec 0.07 driver.version.internal: 0.36 driver.version.usb: libusb-1.0.27 (API: 0x100010a) input.current.nominal: 3.6 input.frequency: 50.0 input.frequency.nominal: 50 input.voltage: 221.0 input.voltage.fault: 0.0 input.voltage.nominal: 220 output.voltage: 221.0 ups.beeper.status: disabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.firmware: V4.00 ups.load: 14 ups.productid: 0000 ups.status: OL ups.temperature: 26.0 ups.type: offline / line interactive ups.vendorid: 0001 ```

It would be nice to add it to the hardware compatibility list. I'm not sure if I can configure it better or if I can provide more information, please let me know if there is anything else to look into

jenneron commented 5 months ago

output of ./nut-ddl-dump.sh 2e-ps1000l

__nutdrv_qx2.8.2__01.zip

jimklimov commented 1 month ago

Hello, thanks for the report, finally got to processing it into the DDL/HCL.

Was "ATCL FOR UPS" actually reported by the UPS, or is it from nut-scanner generated starter configuration (the 0000:0001 USB ID is non-decisive, so several drivers match it)?

avg-I commented 1 week ago

@jimklimov, just in case, here is how that UPS is reported by FreeBSD usbconfig dump_device_desc utility:

ugen6.2: <ATCL FOR UPS ATCL FOR UPS> at usbus6, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (98mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x0001 
  idProduct = 0x0000 
  bcdDevice = 0x0000 
  iManufacturer = 0x0001  <ATCL FOR UPS>
  iProduct = 0x0001  <ATCL FOR UPS>
  iSerialNumber = 0x0001  <ATCL FOR UPS>
  bNumConfigurations = 0x0001

So, it seems that the strings are embedded into the USB descriptor.

jimklimov commented 1 week ago

Thanks for the update, and also for the reference to the tool. I guess I should find where lsusb is recommended in docs and add alternatives for other platforms (cfgadm comes to mind from Solaris/illumos land).

avg-I commented 1 week ago

lsusb also works on FreeBSD. It's not a part of the base system, but can be easily installed from the packages.