Tag: ups

  • Proxmox VE + 海康威视 R1 共享 UPS

    买了个便宜的UPS,想把PVE主机和海康的R1都挂在下边,所以简单折腾一把。

    本来是担心有点麻烦,结果发现海康的UPS已经用了 NUT,那就简单粗暴来了。

    R1 上

    echo "LISTEN 0.0.0.0 3493" >> /etc/nut/upsd.conf
    killall upsd

    过一会儿,upsd会自己重启

    cat /etc/nut/upsd.users 读账号密码

    PVE

    apt install nut-client

    执行

    root@pve6:~# upsc -l 192.168.11.111
    Init SSL without certificate database
    HikUPS
    root@pve6:~# upsc HikUPS@192.168.11.111
    Init SSL without certificate database
    battery.charge: 100
    battery.voltage: 13.50
    battery.voltage.high: 13.00
    battery.voltage.low: 10.40
    battery.voltage.nominal: 12.0
    device.type: ups
    driver.name: nutdrv_qx
    driver.parameter.bus: 001
    driver.parameter.pollfreq: 30
    driver.parameter.pollinterval: 2
    driver.parameter.port: auto
    driver.parameter.product: USB to Serial
    driver.parameter.productid: 5161
    driver.parameter.synchronous: auto
    driver.parameter.vendor: INNO TECH
    driver.parameter.vendorid: 0665
    driver.version: 2.8.0
    driver.version.data: Voltronic-QS 0.07
    driver.version.internal: 0.32
    driver.version.usb: libusb-1.0.26 (API: 0x1000109)
    input.voltage: 224.4
    input.voltage.fault: 224.4
    output.current.nominal: 2.0
    output.frequency: 50.1
    output.frequency.nominal: 50
    output.voltage: 224.4
    output.voltage.nominal: 220
    ups.beeper.status: disabled
    ups.delay.shutdown: 30
    ups.delay.start: 180
    ups.firmware.aux: PM-V
    ups.load: 0
    ups.productid: 5161
    ups.status: OL
    ups.type: offline / line interactive
    ups.vendorid: 0665

    修改配置 /etc/nut/upsmon.conf

    MONITOR HikUPS@192.168.11.111 1 hikups Aa123456 master

    密码是写死的

    /etc/nut/nut.conf

    MODE=netclient

    重启

    systemctl restart nut-client