<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,
<div>I'm absolute new with nut, and I'm using a UPS a first time.</div>
<div>I'm running Manjato LXQT with a APC-Smartups-1500 connected to ttyS0. Installed NUT from the Arch-Linux AUR.</div>
<div>So starting and stopping the ups software is done via systemd.</div>
<div> </div>
<div>My configuration is working so far. I can check values with upsc and I'm getting mails, when the power line ist disconnected and reconneted.</div>
<div>Shutting down the machine works if I do this via console with 'upsmon -c fsd'.</div>
<div>But no automatic shutdown :(</div>
<div> </div>
<div>If I try to set battery.runtime.low > 300 I get an error. See below.</div>
<div> </div>
<div> </div>
<div><strong># upsd -V</strong></div>
<div>Network UPS Tools upsd 2.7.4</div>
<div> </div>
<div><strong># upsrw -s battery.runtime.low=301 -u admin -p aXXX apcsmartups</strong></div>
<div>Unexpected response from upsd: ERR INVALID-VALUE</div>
<div> </div>
<div><strong># upsrw -s battery.runtime.low=301 -u admin -p aXXX apcsmartups</strong></div>
<div>OK</div>
<div> </div>
<div><strong># upsc apcsmartups</strong></div>
<div>battery.alarm.threshold: 0<br/>
battery.charge: 073.0<br/>
battery.charge.restart: 00<br/>
battery.date: 19/25/10<br/>
battery.packs: 000<br/>
battery.runtime: 11400<br/>
battery.runtime.low: 300<br/>
battery.voltage: 25.24<br/>
battery.voltage.nominal: 024<br/>
device.mfr: APC<br/>
device.model: Smart-UPS 1500<br/>
device.serial: AS0940230792<br/>
device.type: ups<br/>
driver.name: apcsmart<br/>
driver.parameter.pollinterval: 2<br/>
driver.parameter.port: /dev/ttyS0<br/>
driver.parameter.synchronous: no<br/>
driver.version: 2.7.4<br/>
driver.version.internal: 3.1<br/>
input.frequency: 50.00<br/>
input.quality: 00<br/>
input.sensitivity: H<br/>
input.transfer.high: 253<br/>
input.transfer.low: 208<br/>
input.transfer.reason: unacceptable utility voltage rate of change<br/>
input.voltage: 000.0<br/>
input.voltage.maximum: 000.0<br/>
input.voltage.minimum: 000.0<br/>
output.voltage: 231.0<br/>
output.voltage.nominal: 230<br/>
ups.delay.shutdown: 090<br/>
ups.delay.start: 000<br/>
ups.firmware: 653.18.I<br/>
ups.id: UPS_IDEN<br/>
ups.load: 000.0<br/>
ups.mfr: APC<br/>
ups.mfr.date: 09/30/09<br/>
ups.model: Smart-UPS 1500<br/>
ups.serial: AS0940230792<br/>
ups.status: OB<br/>
ups.temperature: 022.5<br/>
ups.test.interval: 1209600<br/>
ups.test.result: NO</div>
</div>
<div> </div>
<div>
<div> </div>
<div>So I tried to change ups.conf like this:</div>
<div>[apcsmartups]<br/>
driver = apcsmart<br/>
port = /dev/ttyS0<br/>
desc = "APC-SmartUPS 1500 @ Falcon"<br/>
ignorelb<br/>
override.battery.charge.low = -1<br/>
override.battery.runtime.low = 11000</div>
<div> </div>
<div>My question here is: Can I set values greater then 300 in ups.conf ist those values are not allowed with upsrw?</div>
<div>It seems that no shtudown is initiated. No Mail, no log entry, nothing. Why?</div>
<div> </div>
<div>Henning</div>
<div> </div>
<div> </div>
<div>By the way. The link to search within the list responds 404.</div>
<div>http://www.networkupstools.org/lists/</div>
<div> </div>
...</div>
<div> </div>
<div> </div>
<div>Here comes the rest of my config ...</div>
<div>
<div> </div>
<div>nut.conf<br/>
========<br/>
MODE=none</div>
<div><br/>
upsd.users:<br/>
===========<br/>
[admin]<br/>
actions = SET<br/>
instcmds = ALL<br/>
password = aXXX</div>
<div>[upsmon]<br/>
password = uXXX<br/>
upsmon master</div>
<div><br/>
upsmon.conf<br/>
===========<br/>
RUN_AS_USER nut<br/>
MINSUPPLIES 1<br/>
SHUTDOWNCMD "/sbin/shutdown -h +0"<br/>
NOTIFYCMD /usr/bin/upssched<br/>
POLLFREQ 5<br/>
POLLFREQALERT 5<br/>
HOSTSYNC 15<br/>
DEADTIME 15<br/>
POWERDOWNFLAG /etc/killpower<br/>
RBWARNTIME 43200<br/>
NOCOMMWARNTIME 300<br/>
FINALDELAY 5<br/>
NOTIFYMSG ONLINE "UPS %s on line power"<br/>
NOTIFYMSG ONBATT "UPS %s on battery"<br/>
NOTIFYMSG LOWBATT "UPS %s battery is low"<br/>
NOTIFYMSG FSD "UPS %s: forced shutdown in progress"<br/>
NOTIFYMSG COMMOK "Communications with UPS %s established"<br/>
NOTIFYMSG COMMBAD "Communications with UPS %s lost"<br/>
NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"<br/>
NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"<br/>
NOTIFYMSG NOCOMM "UPS %s is unavailable"<br/>
NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"<br/>
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC<br/>
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC<br/>
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC<br/>
NOTIFYFLAG FSD SYSLOG+WALL+EXEC<br/>
NOTIFYFLAG COMMOK SYSLOG+EXEC<br/>
NOTIFYFLAG COMMBAD SYSLOG+EXEC<br/>
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC<br/>
NOTIFYFLAG REPLBATT SYSLOG+EXEC<br/>
NOTIFYFLAG NOCOMM SYSLOG+EXEC<br/>
NOTIFYFLAG NOPARENT SYSLOG+EXEC<br/>
MONITOR apcsmartups 1 upsmon uXXX master<br/>
SHUTDOWNCMD poweroff</div>
<div><br/>
upssched.conf<br/>
=============<br/>
CMDSCRIPT /usr/local/bin/upssched.sh<br/>
PIPEFN /var/lib/nut/upssched/upssched.pipe<br/>
LOCKFN /var/lib/nut/upssched/upssched.lock<br/>
AT ONLINE * CANCEL-TIMER onbatt online<br/>
AT ONBATT * START-TIMER onbatt 60<br/>
AT LOWBATT * EXECUTE lowbatt<br/>
AT FSD * EXECUTE fsd<br/>
AT COMMOK * CANCEL-TIMER commbad commok<br/>
AT COMMBAD * START-TIMER commbad 30<br/>
AT NOCOMM * START-TIMER combad 30<br/>
AT SHUTDOWN * EXECUTE shutdown<br/>
AT REPLBATT * EXECUTE replbatt<br/>
AT NOPARENT * EXECUTE noparent</div>
<div><br/>
upssched.sh<br/>
========<br/>
#!/bin/bash<br/>
PARM1=$1<br/>
OFN="/tmp/upssched-mail.txt"<br/>
MAILTO="xxxdxxx.de"<br/>
DATUM=`date +"%F %T"`<br/>
HOST=`hostname`<br/>
STAT=`upsc apcsmartups ups.status`<br/>
RUNTIME=`upsc apcsmartups battery.runtime`<br/>
BATT=`upsc apcsmartups battery.charge`</div>
<div>function shutdwn () {<br/>
sleep 30<br/>
upsmon -c fsd<br/>
}</div>
<div>case $NOTIFYTYPE in<br/>
ONBATT|onbatt)<br/>
echo -e "UPS runs on Battery for more then 1 minute now!" >$OFN<br/>
;;<br/>
ONLINE|online)<br/>
echo -e "UPS is back on Line Power." >$OFN<br/>
;;<br/>
COMMBAD|combad)<br/>
echo -e "Communication with UPS lost!" >$OFN<br/>
;;<br/>
COMMOK|commok)<br/>
echo -e "Communication with UPS re-established." >$OFN<br/>
;;<br/>
SHUTDOWN|shutdown)<br/>
echo -e "Shutdown due to UPS Event initiated!" >$OFN<br/>
shutdwn<br/>
;;<br/>
FSD|fsd)<br/>
echo -e "Forced Shutdown due to UPS Event initiated!!!" >$OFN<br/>
shutdwn<br/>
;;<br/>
LOWBATT|lowbatt)<br/>
echo -e "UPS battery low, awaiting shutdown!" >$OFN<br/>
;;<br/>
REPLBATT|replbatt)<br/>
echo -e "UPS battery needs to be replaced!" >$OFN<br/>
;;<br/>
NOCOMM|nocomm)<br/>
echo -e "UPS cannot be reached!" >$OFN<br/>
;;<br/>
NOPARENT|noparent)<br/>
echo -e "UPS parent process died - shutdown impossible!" >$OFN<br/>
;;<br/>
*)<br/>
echo "wrong parameter $NOTIFYTYPE" >$OFN;;<br/>
esac</div>
<div>echo -e "\nBattery Charge: $BATT%\nUPS Status: $STAT\nUPS Runtime: $RUNTIME seconds\n" >>$OFN<br/>
mail -s "$UPSNAME@$HOST $DATUM $PARM1" $MAILTO <$OFN<br/>
exit 0</div>
</div>
<div> </div></div></body></html>