Jump to content

关于 BK650M2-CH 使用问题


Recommended Posts

BK650M2-CH 使用unraid自带的apcupsd好像会出问题。通过apc论坛查询具体原因的情况如下:

Quote

 

1、满电时候apcaccess 显示STATUS为ONBATT ,也就是电池供电(不触发shutdown才奇怪。
然后nut的工具显示ups.status为 OL DISCHRG,也就是ONLINE DISCHARGING,当然NUT能正常工作了。

2、查阅代码发现apcupsd只支持CAL TRIM BOOST ONLINE ONBATT OVERLOAD LOWBATT REPLACEBATT NOBATT SLAVE SLAVEDOWN 这些状态,而且是非黑即白的status,压根不支持BK650M2-CH DISCHARGING状态。而nut的status可以支持多个状态。

Linux 下使用时 用nut-server代替 apcupsd。

 

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

 

 

不知道群里的各位小伙伴有没有更加好的解决方法?

Link to comment
  • 2 weeks later...
On 9/6/2022 at 10:52 AM, francishe said:

unriad对几款apc电源支持不好。我采用折中办法,虚拟机上有黑裙,通过它的ups配合nut支持很好,断电后2分钟unraid自动关机,电源信息也都显示正常。

请问怎么实现黑裙通知unraid关机?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...