Project

General

Profile

Support #14407

UPS received and connected

Added by Giulio Di Anastasio over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
20/08/2022
Due date:
% Done:

0%

Close

Description

This morning we connected the UPS to the server, as once again last night there was a power cut...
Probably you will need to pass by and see if it needs to be configured in a way so that the turning off could be done properly by the UPS itself when the batteries drain out

History

#1 Updated by Philippe May over 1 year ago

See NUT (Network UPS Tools) https://networkupstools.org/

https://docs.technotim.live/posts/NUT-server-guide/

apt install nut
root@dream:/etc/nut# nut-scanner -U
SNMP library not found. SNMP search disabled.
Neon library not found. XML search disabled.
IPMI library not found. IPMI search disabled.
Scanning USB bus.
[nutdev1]
    driver = "blazer_usb" 
    port = "auto" 
    vendorid = "0665" 
    productid = "5161" 
    product = "USB to Serial" 
    vendor = "INNO TECH" 
    bus = "001" 

Copy that in /etc/nut/ups.conf.

systemctl restart nut-monitor.service

In /etc/nut/nut.conf: mode set to standalone

Plugged in USB 001:002:

root@dream:/etc/nut# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

#2 Updated by Philippe May over 1 year ago

Had to reboot. Afterwards:

root@dream:~# upsc nutdev1
Init SSL without certificate database
battery.charge: 100
battery.voltage: 27.00
battery.voltage.high: 26.00
battery.voltage.low: 20.80
battery.voltage.nominal: 24.0
device.mfr: 
device.model: WPHVT1K0
device.type: ups
driver.name: blazer_usb
driver.parameter.bus: 001
driver.parameter.pollinterval: 60
driver.parameter.port: auto
driver.parameter.product: USB to Serial
driver.parameter.productid: 5161
driver.parameter.synchronous: no
driver.parameter.vendor: INNO TECH
driver.parameter.vendorid: 0665
driver.version: 2.7.4
driver.version.internal: 0.12
input.current.nominal: 4.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 229.6
input.voltage.fault: 229.7
input.voltage.nominal: 230
output.voltage: 229.9
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: 01011.08
ups.load: 0
ups.mfr: 
ups.model: WPHVT1K0
ups.productid: 5161
ups.status: OL
ups.temperature: 31.5
ups.type: online
ups.vendorid: 0665

#3 Updated by Philippe May over 1 year ago

Renamed nutdev1 to ups in the config files.

#4 Updated by Philippe May over 1 year ago

Now that nut seems to be OK, i looked up to see how to monitor - eg. with graphs etc. Found https://collectd.org/wiki/index.php/Plugin:NUT . But https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009666 tells that the Debian stable (bullseye) version of collectd hos not support for nut, but it is back in bookworm.

Decided to upgrade the dom0 to bookworm (testing).

#5 Updated by Philippe May over 1 year ago

dom0 upgraded to bookworm, but there's no nut plugin in the collectd package.

Got a previous version and copied manually the nut.so file in /usr/lib/collectd/. Restarted collectd and data seems to be accumulating in /var/lib/collectd/rrd/dream.csr.av/nut-ups .

Tried to find a simple tool to graph rrd database on console, but could not find. Web based tools (eg. cacti) is clearly the most popular option. To be continued.

Also available in: Atom PDF