<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template"><font size="2" face="Verdana">Hi
Roger,<br>
<br>
/sbin/upssched is the standard binary that installs with the
Debian NUT package. From my understanding, /sbin/upssched then
calls CMDSCRIPT (in my case, /etc/nut/upssched-cmd) passing some
parameters to that script. Here is my /etc/nut/upssched-cmd:<br>
</font>
<blockquote><font size="2"><tt>#!/bin/bash</tt></font><br>
<font size="2"><tt>#</tt></font><br>
<font size="2"><tt># This script should be called by upssched
via the CMDSCRIPT directive.</tt></font><br>
<font size="2"><tt>#</tt></font><br>
<font size="2"><tt># Here is a quick example to show how to
handle a bunch of possible</tt></font><br>
<font size="2"><tt># timer names with the help of the case
structure.</tt></font><br>
<font size="2"><tt>#</tt></font><br>
<font size="2"><tt># This script may be replaced with another
program without harm.</tt></font><br>
<font size="2"><tt>#</tt></font><br>
<font size="2"><tt># The first argument passed to your CMDSCRIPT
is the name of the timer</tt></font><br>
<font size="2"><tt># from your AT lines.</tt></font><br>
<font size="2"><tt>OPTION="$1"</tt></font><br>
<font size="2"><tt>SCRIPT="$0"</tt></font><br>
<br>
<font size="2"><tt>logger -t $SCRIPT "Script called with arg
$OPTION"</tt></font><br>
<br>
<font size="2"><tt>case $OPTION in</tt></font><br>
<font size="2"><tt> lowbatt)</tt></font><br>
<font size="2"><tt> MSG="NUT upssched \"lowbatt\"
sequence start: UPS Low Battery; Begin shutting down
clients"</tt></font><br>
<font size="2"><tt> echo "$SCRIPT: $MSG"</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "$MSG"</tt></font><br>
<font size="2"><tt> /etc/nut/scripts/shutdown-control
&</tt></font><br>
<font size="2"><tt> MSG="NUT upssched \"lowbatt\"
sequence initiated"</tt></font><br>
<font size="2"><tt> echo "$SCRIPT: $MSG"</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "$MSG"</tt></font><br>
<font size="2"><tt> ;;</tt></font><br>
<font size="2"><tt> onbatt)</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "UPS on battery"</tt></font><br>
<font size="2"><tt> ;;</tt></font><br>
<font size="2"><tt> online)</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "UPS power restored
and back online"</tt></font><br>
<font size="2"><tt> ;;</tt></font><br>
<font size="2"><tt> upsgone)</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "The UPS has been
gone for awhile"</tt></font><br>
<font size="2"><tt> ;;</tt></font><br>
<font size="2"><tt> *)</tt></font><br>
<font size="2"><tt> logger -t $SCRIPT "Unrecognized arg:
$OPTION"</tt></font><br>
<font size="2"><tt> ;;</tt></font><br>
<font size="2"><tt>esac</tt></font><br>
<br>
<font size="2"><tt>exit 0</tt></font><br>
</blockquote>
<font size="2" face="Verdana"><br>
The shutdown-control script shuts down multiple Windows desktops
and NAS devices when the "lowbatt" state is triggered by NUT.<br>
<br>
But if I understand the question correctly, I think we're
getting ahead of ourselves.<br>
<br>
The driver is giving this incorrect response (simulated for
illustration purposes - not actual):<br>
</font><font size="2"><tt>$ upsc myups1</tt><tt><br>
</tt><tt>Init SSL without certificate database</tt><tt><br>
</tt><tt>battery.charge: 1</tt><tt><br>
</tt><tt>...</tt></font><font size="2" face="Verdana"><br>
<br>
I don't think there's any turning back unless I can get the NUT
upsmon to retry or wait for a second POLLFREQ interval. Let me
know your thoughts and appreciate the help.<br>
<br>
Thanks,<br>
-MikeD<br>
</font></div>
<br>
<div id="smartTemplate4-quoteHeader">
<hr>
<font size="2" face="Consolas">
<b>Date:</b> Saturday, May 25, 2019, at 09:52:13 AM PDT (GMT/UMT
-0700)<br>
<b>From:</b> Roger Price <a class="moz-txt-link-rfc2396E" href="mailto:roger@rogerprice.org"><roger@rogerprice.org></a><br>
<b>To:</b> Nut Users <a class="moz-txt-link-rfc2396E" href="mailto:nut-upsuser@alioth-lists.debian.net"><nut-upsuser@alioth-lists.debian.net></a><br>
<b>Subject:</b> Re: [Nut-upsuser] Low Battery False Alarms<br>
</font>
<br>
</div>
<div class="replaced-blockquote"
cite="mid:alpine.LSU.2.20.1905251849000.43054@titan" type="cite">On
Sat, 25 May 2019, Mike Dillinger wrote:
<br>
<br>
<blockquote type="cite">I have a CyberPower 1350VA and it's around
2 to 3 years old. I'm seeing random occurrences of low battery
false alarm indicators with a battery supply of 1%. I would
assume this means the unit needs replacement, but in the
meantime, is there any way I can ask upsmon to verify with two
consecutive POLLFREQ intervals? Meaning, try again one more
time.
<br>
</blockquote>
<br>
What does your /sbin/upssched look like? Do you EXECUTE a further
script on AT LOWBATT?
<br>
<br>
Roger<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Nut-upsuser mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nut-upsuser@alioth-lists.debian.net">Nut-upsuser@alioth-lists.debian.net</a>
<a class="moz-txt-link-freetext" href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a></pre>
</div>
<br>
</body>
</html>