<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font size="4">I have a APC ups:</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">device.mfr: American Power Conversion<br>
device.model: Back-UPS XS 700U </font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">I use:</font></p>
<p><font size="4">driver = usbhid-ups<br>
port = auto<br>
vendorid = 051d</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">And I set a few values:</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">offdelay = 300<br>
ondelay = 70<br>
lowbatt = 33</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">This all works fine.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">However I noticed that often these values would
get reset:</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">initial value: ups.delay.shutdown: 300</font></p>
<p><font size="4">Later value: ups.delay.shutdown: 20</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">Since this happened a lot, I added a cronjob to
daily check it. It triggers about every 8-10 days.</font></p>
<p><font size="4">I can reset these with:</font></p>
<p><font size="4"># systemctl restart nut-driver@qnapups</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">and everything is fine.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">But from logs:</font></p>
<p><font size="4">Nov 16 17:38:49 zbox systemd[1]: Started
<a class="moz-txt-link-abbreviated" href="mailto:nut-driver@qnapups.service">nut-driver@qnapups.service</a> - Network UPS Tools - device driver
for NUT device 'qnapups'.<br>
Nov 16 17:39:05 zbox usbhid-ups[1526738]: sock_connect: keeping
default synchronous mode<br>
Nov 22 19:15:20 zbox usbhid-ups[1526738]: ups_status_set: seems
that UPS [qnapups] is in OL+DISCHRG state now. Is it calibrating
or do you perhaps want to set 'onlinedischarge' option? Some UPS
models (e.g. CyberPower UT series) emit OL+DISCHRG when offline.<br>
Nov 23 21:05:22 zbox usbhid-ups[1526738]:
nut_libusb_get_interrupt: No such device (it may have been
disconnected)<br>
Hint: Some lines were ellipsized, use -l to show in full.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">at 9:00 on the 24th my cronjob noticed the values
had reset. So</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">Just after </font><font size="4">Nov 22 19:15:20
(ie 9:00 on 23rd) ...the values were still OK</font></p>
<p><font size="4">Just after </font><font size="4">Nov 23 21:05:22
(ie 9:00 on 24th) ... the values changed.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">My personal theory is that the USB powered device
in the APC box "crashed" and rebooted, resetting some values on
the way.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">Now I don't think that NUT can do a whole lot
about this .... probably my simplest fix is to trigger the </font><font
size="4">"systemctl restart" when I spot the change.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">But it does suggest to me , it would be useful if
I could trigger some actions ( </font><font size="4">e.g.
systemctl restart </font><font size="4"> ) when NUT detects
some error conditions:</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"> 1: the </font><font size="4">OL+DISCHRG ... ?</font></p>
<p><font size="4"> 2: the (temporary) loss of the USB device</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">--</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">Graeme</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
</body>
</html>