<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Unfortunately, the SUCCESS response is just saying that upsrw was able to send that request to upsd (i.e. the username/password were correct). As you saw, the real proof is in what you read back from upsc.
</pre>
</blockquote>
Ah, gotcha.<br>
</p>
<p>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Have you tried any other values? 3600 is hex 0xe10, and 16 is 0x10, so it is quite possible the UPS is using an 8-bit field to store battery.runtime.low. I'm guessing the maximum is going to be 255.
</pre>
</blockquote>
I am not sure I follow. Would you mind unpacking this for me?<br>
When I initially issued 'upsrw' this is what was returned. What
does the value '300' indicate, if not seconds; and attempting to
change it to '3600' sets it two '16'. Is this what you mean when
you're referring to a '8-bit field'?</p>
<p>upsrw CST150UC<br>
[battery.runtime.low]<br>
Remaining battery runtime when UPS switches to LB
(seconds)<br>
Type: STRING<br>
Maximum length: 10<br>
Value: 300<br>
</p>
<div class="moz-cite-prefix">In my research I found that editing
'ups.conf' may allow to change the 'battery.runtime.low' as well,
but I haven't tested it yet. I figured using the supported UPS
variables may be the way to go first.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">mcedit /etc/nut/ups.conf<br>
<br>
[cyberpower]<br>
driver = usbhid-ups<br>
port = auto<br>
desc = "ups"<br>
offdelay = 20<br>
ondelay = 0<br>
ignorelb<br>
override.battery.runtime.low = 20<br>
override.battery.runtime.low = 40<br>
pollinterval = 15<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> Thank you, Charles</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 4/24/24 04:19, Charles Lepple wrote:<br>
</div>
<blockquote type="cite" cite="mid:4F83A4C8-A6D0-4D68-A6D7-31829C2DD6F2@gmail.com">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Apr 23, 2024, at 3:51 PM, tim.o via Nut-upsuser <a class="moz-txt-link-rfc2396E" href="mailto:nut-upsuser@alioth-lists.debian.net"><nut-upsuser@alioth-lists.debian.net></a> wrote:
The value changed to battery.runtime.low: 16, instead of 3600. I don't understand why, because executing the command resulted in SUCCESS.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Unfortunately, the SUCCESS response is just saying that upsrw was able to send that request to upsd (i.e. the username/password were correct). As you saw, the real proof is in what you read back from upsc.
Have you tried any other values? 3600 is hex 0xe10, and 16 is 0x10, so it is quite possible the UPS is using an 8-bit field to store battery.runtime.low. I'm guessing the maximum is going to be 255.
This is not entirely surprising - we have a GitHub issue label specific to CPS for issues with their USB HID protocol implementation.
</pre>
</blockquote>
</body>
</html>