BK650M2-CH 使用unraid自带的apcupsd好像会出问题。通过apc论坛查询具体原因的情况如下:
(https://community.se.com/t5/APC-UPS-for-Home-and-Office-Forum/BK650M2-CH-使用apcupsd故障原因-不正常的必看/td-p/296742)
然后安装nut插件,刚刚开始还可以正常使用,但是不定时的会掉线,还不能自动恢复,日志提示如下:
usbhid-ups[18349]: nut_libusb_get_report: Input/Output Error.
...
usbhid-ups[18835]: device->Product is NULL so it is not possible to determine whether to activate max_report_size workaround
usbhid-ups[18835]: device->Product is NULL so it is not possible to determine whether to activate max_report_size workaround
usbhid-ups[18835]: device->Product is NULL so it is not possible to determine whether to activate max_report_size workaround
...
需要手动插拔网线才能重新连接上。
后来看到论坛里有网友提到定时(如每30分钟)执行如下脚本暂时解决问题:
#!/bin/bash
# Test communication with UPS
if upscmd -l ups > /dev/nul; then
echo The UPS is connected.
else
echo Error: Communication with the UPS has failed!
# Get USB path for the UPS
APC=$( lsusb | grep "American Power Conversion" | perl -nE "/\D+(\d+)\D+(\d+).+/; print qq(\$1/\$2)")
# Test for a USB conection
if [ -z "$APC" ]; then
echo Error: No USB UPS detected!
else
echo Resetting the USB connection...
# Reset the USB connection
if usbreset $APC; then
echo USB reset completed successfully.
else
echo Error: USB reset failed!
fi
fi
fi
不知道群里的各位小伙伴有没有更加好的解决方法?