Table of Contents

UPS Eaton Ellipse ECO 650 VA

USB-B socket

# lsusb
Bus 001 Device 008: ID 0463:ffff MGE UPS Systems UPS
apt install nut-server nut-cgi

USBHID-UPS(8):

SUPPORTED HARDWARE

usbhid-ups brings USB/HID UPS monitoring to NUT on all platforms supporting USB through libusb. It should detect any UPS that uses the HID Power Device Class, but the amount of data will vary depending on the manufacturer and model.

At the present time, usbhid-ups supports:
the newer Eaton USB models,
all MGE USB models,

port= is ignored

This could be a device filesystem path like /dev/usb/hiddev0 but current use of libusb API precludes knowing and matching by such identifiers. They may also be inherently unreliable (dependent on re-plugging and enumeration order). At this time the actual value is ignored, but syntactically some port configuration must still be there.

unpriv. LXC with Proxmox

Bind USB BUS 1. Cannot bind single device because device number is floating. Allow to access only UPS character device 189:5

on PVE host

/etc/pve/lxc/312.conf
lxc.cgroup2.devices.allow: c 189:5 rwm # MGE UPS Systems UPS
lxc.mount.entry: /dev/bus/usb/001 dev/bus/usb/001 none bind,optional,create=dir,mode=664 # USB BUS 1
/etc/udev/rules.d/71-nut.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", MODE="0664", OWNER="100000", GROUP="111003"
udevadm control --reload-rules && udevadm trigger --attr-match=subsystem=usb

Verify if permission are changed:

# ls -l /dev/bus/usb/001
total 0
crw-rw-r-- 1 root   root   189,  0 Dec 17 08:03 001
crw-rw-r-- 1 root   root   189,  2 Dec 17 08:04 003
crw-rw-r-- 1 root   root   189,  3 Dec 17 08:03 004
crw-rw-r-- 1 100000 111003 189, 10 Dec 17 08:03 011

ON NUT's LXC

Inside LXC NUT container:

groupadd -g 11003 lxc_usb_nut_shares
usermod -aG lxc_usb_nut_shares root

To prevent error:

libusb1: Could not open any HID devices: insufficient permissions on everything

give NUT access to USB device:

usermod -aG lxc_usb_nut_shares nut

NOTE: /lib/nut/usbhid-ups drivers switches to gid nut (112) and uid nut (103) after start.

usbhid-ups

Test:

# nut-scanner 
 
Scanning USB bus.
No start IP, skipping NUT bus (old connect method)
[nutdev1]
	driver = "usbhid-ups"
	port = "auto"
	vendorid = "0463"
	productid = "FFFF"
	product = "Ellipse PRO"
	serial = "G123456789"
	vendor = "EATON"
	bus = "001"
/etc/nut/ups.conf
maxretry = 3
 
[eaton]
    desc = "Eaton Ellipse ECO 650 VA"
    driver = "usbhid-ups"
    port = "auto"
    vendorid = "0463"
    productid = "FFFF"
    product = "Ellipse PRO"
    serial = "G123456789"
    vendor = "EATON"
    bus = "001"
/etc/nut/nut.conf
MODE=netserver
/etc/nut/upsd.conf
LISTEN * 3494

upsd.users.5

/etc/nut/upsd.users
[admin]
password = hardpass
actions = SET
actions = FSD
instcmds = ALL
 
[upsmon]
password = hardpass
upsmon primary
 
[ha]
password = hardpass
/etc/nut/upsmon.conf
MONITOR eaton@localhost 1 upsmon hardpass primary
systemctl restart nut-server
# upsc eaton
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 20
battery.runtime: 2840
battery.type: PbAc
...