-
-
Notifications
You must be signed in to change notification settings - Fork 351
Maintaining systemd udev HWDB for NUT
Some system-local setups go into greater detail than NUT generated udev.rules
files go, e.g. to create a named definitively named symbolic link for their UPS regardless of the USB port/device enumeration:
ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", ATTRS{serial}=="SN123456", SYMLINK+="ttyUSB-nut", GROUP="nut", MODE="0664"
NOTE: Currently most of the NUT USB drivers rely on libusb
for device enumeration and so ignore the path provided in the generally required port
configuration parameter (hence port=auto
). However for UPSes which include a serial-over-USB chip, or for serial-port UPSes connected to a USB port of the computer using a separate dongle, the path to the serial port device node does matter (hence the usefulness of symlinks).
The rule set above also matches an USB device serial number -- combined with SYMLINK
this can help definitively name several unique USB UPS devices monitored by the same system. Note however that not all vendors provide the value, or a unique one - e.g. all-zeroes or all-spaces does happen.
See also https://www.freedesktop.org/software/systemd/man/hwdb.html
See also http://who-t.blogspot.com/2019/02/adding-entries-to-udev-hwdb.html about more details on editing HWDB in a live system, and possibly more tricks to apply it.
Welcome to the Network UPS Tools (NUT) project Wiki, and feel free to contribute tricks and insights.
While there are several good entries in the menu, ones referenced most frequently in issue discussions include:
- Building NUT for in-place upgrades or non-disruptive tests and Using NIT (NUT Integration Test suite) sandbox
- Technicalities: Customizing (NUT) config files and scripts delivered by packaging
- Links to distribution packaging recipes and repository sections
- Troubleshooting
upsdrvctl
drivers not starting ("insufficient permissions on everything" or "Can't claim USB device [VVVV:PPPP]@0/0: Entity not found") possibly due to nut-driver-enumerator (NDE) services having been there before you with NUT 2.8.x - Changing NUT daemon debug verbosity
- Building NUT integration for Home Assistant
- Running NUT in an LXC container
- Troubleshooting eventual disconnections (Data stale) and CyberPower Systems (CPS) know-how
- NUT for Windows
- NUT HCL and DDL
- Code contributions, PRs, PGP and DCO
- NUT CI farm
Also keep in mind the documentation links from NUT website and the FAQ in particular.