https://redmine.auroville.org.in/https://redmine.auroville.org.in/favicon.ico2022-09-01T19:04:54ZRedmineGIS - Support #14407: UPS received and connectedhttps://redmine.auroville.org.in/issues/14407?journal_id=1129642022-09-01T19:04:54ZPhilippe May
<ul></ul><p>See NUT (Network UPS Tools) <a class="external" href="https://networkupstools.org/">https://networkupstools.org/</a></p>
<p><a class="external" href="https://docs.technotim.live/posts/NUT-server-guide/">https://docs.technotim.live/posts/NUT-server-guide/</a></p>
<pre>
apt install nut
</pre>
<pre>
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"
</pre>
<p>Copy that in <code>/etc/nut/ups.conf</code>.</p>
<pre>
systemctl restart nut-monitor.service
</pre>
<p>In <code>/etc/nut/nut.conf</code>: mode set to <code>standalone</code></p>
<p>Plugged in USB <code>001:002</code>:</p>
<pre>
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
</pre> GIS - Support #14407: UPS received and connectedhttps://redmine.auroville.org.in/issues/14407?journal_id=1130242022-09-03T13:54:00ZPhilippe May
<ul></ul><p>Had to reboot. Afterwards:</p>
<pre>
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
</pre> GIS - Support #14407: UPS received and connectedhttps://redmine.auroville.org.in/issues/14407?journal_id=1131242022-09-07T13:13:16ZPhilippe May
<ul></ul><p>Renamed <code>nutdev1</code> to <code>ups</code> in the config files.</p> GIS - Support #14407: UPS received and connectedhttps://redmine.auroville.org.in/issues/14407?journal_id=1131252022-09-07T15:00:14ZPhilippe May
<ul></ul><p>Now that nut seems to be OK, i looked up to see how to monitor - eg. with graphs etc. Found <a class="external" href="https://collectd.org/wiki/index.php/Plugin:NUT">https://collectd.org/wiki/index.php/Plugin:NUT</a> . But <a class="external" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009666">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009666</a> tells that the Debian stable (bullseye) version of <code>collectd</code> hos not support for nut, but it is back in <code>bookworm</code>.</p>
<p>Decided to upgrade the dom0 to bookworm (testing).</p> GIS - Support #14407: UPS received and connectedhttps://redmine.auroville.org.in/issues/14407?journal_id=1131302022-09-07T19:24:18ZPhilippe May
<ul></ul><p>dom0 upgraded to bookworm, but there's no nut plugin in the collectd package.</p>
<p>Got a previous version and copied manually the nut.so file in <code>/usr/lib/collectd/</code>. Restarted collectd and data seems to be accumulating in <code>/var/lib/collectd/rrd/dream.csr.av/nut-ups</code> .</p>
<p>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.</p>