Skip to content

Proper solution for UPSes without unique serials #1273

@melyux

Description

@melyux

I've been struggling to get NUT working with two CyberPower UPSes that have no serials. As such, the ups.conf has no way to tell them apart now that usbhid-ups ignores the port = setting. I only discovered this silent ignoring of my nice differentiated symlinks when I did a lsof and found both driver instances accessing (and failing) the same UPS.

The usual solution to USB devices that are not uniquely distinguishable is to use udev rules to distinguish them in some way using their physical ports and setting a symlink to a specific port (e.g. /dev/ups_1, /dev/ups_2, etc.), which is the solution many use to great success in other cases. However, NUT seems to almost go out of its way to prevent this since the port setting is ignored. As such, I can only connect to one UPS per machine. If I try more, the two running drivers end up trying to connect to the same UPS and nothing works.

The master branch now allows setting the device = setting, but this isn't good enough since device number changes after reboots. A good solution would be if NUT can use something that's settable by udev, like the device name or the device symlink (aka "port"), since udev has the power to distinguish devices permanently. There have been many, many people over the years who have had this problem. Is there any way out of this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    CyberPower (CPS)USBUSB-duplicate-devicesTrack bugs and issues about monitoring several devices that seem identical to NUT or libusbservice/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions