<div dir="ltr"><div class="gmail_default" style="font-family:arial,sans-serif">Hello,</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">I am a new user of NUT and trying to wrap my ahead around a couple of things. I installed NUT 2.7.4-13 from package on RasPi 4, running Raspbian Linux 11 (bullseye). I have Cyberpower SL700U connected to it<span style="font-family:Arial,Helvetica,sans-serif">. For testing I set battery.charge.low to 90, so I wouldn't have to wait a long time. See all relevant config below.</span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">First of all, w</span><span style="font-family:Arial,Helvetica,sans-serif">hat seems to happen is that UPS gets to the low battery state and the system immediately goes into the shutdown, not letting the 30s timer specified in upssched.conf fire. Here's the syslog:</span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif">Feb 21 20:54:11 berry upsmon[1462]: UPS cyberpower@localhost battery is low<br>Feb 21 20:54:11 berry upsd[1459]: Client <a href="mailto:monserver@127.0.0.1">monserver@127.0.0.1</a> set FSD on UPS [cyberpower]<br>Feb 21 20:54:11 berry upssched[1712]: New timer: shutdowncritical (30 seconds)<br>Feb 21 20:54:19 berry upsmon[1462]: Executing automatic power-fail shutdown<br>Feb 21 20:54:19 berry upsmon[1462]: Auto logout and shutdown proceeding<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Then, I connected the UPS to wall power and reset power on RasPi. After boot-up it seemed to see low battery state (even though on wall power) and fired off the 'shutdowncritical' timer, which after 30 seconds, issued the FSD command and the system shut down again.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Feb 21 20:54:55 berry upsmon[758]: Startup successful<br>Feb 21 20:54:55 berry upsmon[759]: Init SSL without certificate database<br>Feb 21 20:54:55 berry upsd[756]: User <a href="mailto:monserver@127.0.0.1">monserver@127.0.0.1</a> logged into UPS [cyberpower]<br>Feb 21 20:54:55 berry upsmon[759]: UPS cyberpower@localhost battery is low<br>Feb 21 20:54:55 berry upssched[766]: Timer daemon started<br>Feb 21 20:54:55 berry upssched[766]: New timer: shutdowncritical (30 seconds)<br>Feb 21 20:54:56 berry upsd[756]: User <a href="mailto:monclient@192.168.11.180">monclient@192.168.11.180</a> logged into UPS [cyberpower]<br>Feb 21 20:55:25 berry upssched[766]: Event: shutdowncritical<br>Feb 21 20:55:25 berry upssched-cmd[793]: Calling upssched-cmd shutdowncritical<br>Feb 21 20:55:25 berry upsmon[759]: Signal 10: User requested FSD<br>Feb 21 20:55:25 berry upsd[756]: Client <a href="mailto:monserver@127.0.0.1">monserver@127.0.0.1</a> set FSD on UPS [cyberpower]<br>Feb 21 20:55:27 berry upssched-cmd[800]: UPS battery critically low, forced shutdown. [OL CHRG LB]:82%<br>Feb 21 20:55:31 berry upsmon[759]: Executing automatic power-fail shutdown<br>Feb 21 20:55:31 berry upsmon[759]: Auto logout and shutdown proceeding<br>Feb 21 20:55:36 berry upsd[756]: mainloop: Interrupted system call<br>Feb 21 20:55:36 berry upsd[756]: Signal 15: exiting<br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">How come it reacts to the LB state when the UPS is on wall power? I know I manually reset the power on the RasPi, but wouldn't the same happen if UPS was shut off and then regained power? Do I need to modify my upssched-cmd script to not react to LOWBATT timer unless the UPS is in OB state too? And finally, why is this sequence of log events different from the first one, where the timer didn't even fire, but the upsmon set FSD?</div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">ups.conf:</span></div><div class="gmail_default" style="font-family:arial,sans-serif">[cyberpower]<br>    driver = usbhid-ups<br>    port = auto<br>    desc = "CyberPower SL700U"<br>    vendorid = 0764<br>    productid = 0501<br>    offdelay = 60<br>    ondelay = 70<br>    ignorelb<br>    override.battery.charge.low = 90<br>    override.battery.charge.warning = 95<br>    override.battery.runtime.low = 1000<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">This is the relevant output of upsc:</span><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif">battery.charge: 100<br>battery.charge.low: 90<br>battery.charge.warning: 95<br>battery.runtime: 2470<br>battery.runtime.low: 1000<br>driver.flag.ignorelb: enabled<br><a href="http://driver.name">driver.name</a>: usbhid-ups<br>driver.parameter.offdelay: 60<br>driver.parameter.ondelay: 70<br>driver.parameter.pollfreq: 30<br>driver.parameter.pollinterval: 5<br>driver.parameter.port: auto<br>driver.parameter.productid: 0501<br>driver.parameter.synchronous: no<br>driver.parameter.vendorid: 0764<br>driver.version: 2.7.4<br>driver.version.data: CyberPower HID 0.4<br>driver.version.internal: 0.41<br>ups.beeper.status: enabled<br>ups.delay.shutdown: 60<br>ups.delay.start: 70<br>ups.load: 14<br>ups.mfr: CPS<br>ups.model: ST Series<br>ups.realpower.nominal: 375<br>ups.timer.shutdown: -60<br>ups.timer.start: -60<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">upsmon.conf excerpts:</span></div><div class="gmail_default" style="font-family:arial,sans-serif">RUN_AS_USER root<br><br>MONITOR cyberpower@localhost 1 monserver sekret master<br>MINSUPPLIES 1<br><br>SHUTDOWNCMD "/sbin/shutdown -h +0"<br>NOTIFYCMD /sbin/upssched<br>POLLFREQ 5<br>POLLFREQALERT 5<br>DEADTIME 15<br>POWERDOWNFLAG /etc/nut/killpower<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">...</span></div><div class="gmail_default" style="font-family:arial,sans-serif">RBWARNTIME 43200<br>NOCOMMWARNTIME 300<br>FINALDELAY 5<span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">upssched.conf excerpt:</div><div class="gmail_default" style="font-family:arial,sans-serif">AT LOWBATT cyberpower@localhost START-TIMER shutdowncritical 30<br>AT ONLINE cyberpower@localhost CANCEL-TIMER shutdowncritical<br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">and then upssched-cmd basically does:</div><div class="gmail_default" style="font-family:arial,sans-serif">case $1 in</div><div class="gmail_default" style="font-family:arial,sans-serif">...</div><div class="gmail_default" style="font-family:arial,sans-serif">    shutdowncritical)<br>        MSG="UPS battery critically low, forced shutdown. $CHMSG"<br>        /sbin/upsmon -c fsd<br>        ;;<br></div><div class="gmail_default" style="font-family:arial,sans-serif">...</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div></div>