Closed boideltier closed 2 years ago
Can you somehow ensure that the USB device is properly handed into your container?
The USB device was not properly handed to the container! First of all, it very confusingly showed up as hiddev0
in /dev/usb/
. I was able to verify it being the UPS with lsusb
:
Bus 002 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
I was able to fix it by adding a line to the docker-compose file:
devices:
- /dev/usb/hiddev0:/dev/usb/hiddev0
After that, it logged apcupsd[1]: NIS server startup succeeded
and the apcaccess
logged:
APC : 001,036,0877
DATE : 2022-04-26 19:59:03 +0000
HOSTNAME : ecf1b1511e48
VERSION : 3.14.14 (31 May 2016) unknown
UPSNAME : ecf1b1511e48
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2022-04-26 19:59:02 +0000
MODEL : Back-UPS BX1200MI
STATUS : ONLINE
LINEV : 237.0 Volts
LOADPCT : 9.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 41.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 10 Minutes
MAXTIME : 0 Seconds
SENSE : Low
LOTRANS : 140.0 Volts
HITRANS : 300.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.5 Volts
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : OK
STATFLAG : 0x05000008
SERIALNO : 9B2103A21903
BATTDATE : 2001-01-01
NOMINV : 230 Volts
NOMBATTV : 12.0 Volts
NOMPOWER : 650 Watts
FIRMWARE : 294201G -302201G
END APC : 2022-04-26 20:05:27 +0000
Thanks!
Very nice. Thank you for your detailed solution! I put you into a new FAQ section of the wiki so your solution will help more people in the future! :)
The default
apcupsd.conf
for this container specifies aUPSTYPE net
. A custom config withUPSTYPE usb
is needed for an UPS connected via USB according to the USB configuration in APCUPSD's documentation.But trying to use the apcupsd.conf file
and mapping it onto the container with
results in a COMMLOST error using
apcaccess
:with the log also not showing
NIS server startup succeeded
.Using the apcupsd.conf as
at least results in a successful
NIS server startup succeeded
, followed by a loss of communications:A working USB option apcupsd.conf file would be highly appreciated.