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.92k stars 346 forks source link

APC SRV2KA support #2458

Open 0xjams opened 3 months ago

0xjams commented 3 months ago

Hi everyone:

This UPS is shown like this when I run lsusb:

Bus 002 Device 002: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC

I searched online and I found that the identifier above is used by Huawei models, so I tried to use that driver. But I was told here that it won't work.

I've also tried with a few other drivers, all of the APC-related ones on this list, but none of them have worked.

Any ideas? I don't mind if it's experimental support.

PS: It's worth noting that there's also a discussion about this in APC's forum.

hertzg commented 3 weeks ago

I managed to get my SRV1KI working only with apcupsd

UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/ttyUSB1

I would love to get it working with nut since apcupsd and nut packages on ubuntu are mutually exclusive.

jimklimov commented 3 weeks ago

@hertzg : Which NUT version? FWIW, did you try a custom build of 2.8.2 or current master with apc_modbus driver and tweaked libmodbus to have USB support? Details on wiki (travelling now, hard to link).

hertzg commented 3 weeks ago

@jimklimov I managed to get it working with apcupsd (3.14.14-3build1) not with nut. On ubuntu those packages are mutually exclusive (installing one removes the other) so I just stayed with apcuspd.

Tested with

in both cases the apcupsd.conf was

UPSCABLE smart
UPSTYPE apcsmart

on focal the xr_usb_serial_common picks it up

DEVICE /dev/ttyXRUSB1

on noble the usbserial picks it up

DEVICE /dev/ttyUSB1

I've also managed to get it working with the RS232

DEVICE /dev/ttyS1 # <--- this is my current setup with just RS232 cable

⚠️ You can not use both USB and RS232 at the same time, USB takes precedence and the RS232 port becomes unresponsive.

My device is SRV1KRI

image