<div dir="ltr">Hello, all... a followup to my question. After lots of poking, prodding, research, teeth gnashing and hair tearing, I have a working solution.<div><br></div><div>The gist:</div><div>I set up nut pretty much by the documentation, then changed it to avoid the native shutdown sequence and use a custom one that apparently works fine with the AVR550U.</div><div><br></div><div>Here are the details:</div><div><br></div><div><ul><li>nut.conf</li><ul><li>MODE=standalone</li></ul><li>ups.conf</li><ul><li>maxretry = 3<br>[ups]<br> driver=usbhid-ups<br> port = auto<br> desc = "TrippLite AVR550U"<br></li></ul><li>upsd.conf</li><ul><li>LISTEN 127.0.0.1 3493<br></li></ul><li>upsd.users</li><ul><li>[upsmon]<br> password = pass<br> upsmon master<br> actions = SET<br> actions = FSD<br> instcmds = ALL<br></li></ul><li>upsmon.conf</li><ul><li>RUN_AS_USER xxxx<br>MONITOR ups@localhost 1 upsmon pass master<br>MINSUPPLIES 1<br># This makes the built-in shutdown a no-op<br>SHUTDOWNCMD "echo \"Shutdown\" | wall"<br># Converts notification (of ONBATT) to scheduled events<br>NOTIFYCMD /sbin/upssched<br>POLLFREQ 5<br>POLLFREQALERT 5<br>HOSTSYNC 15<br>DEADTIME 15<br># Does not matter for our setup but required for upsmon to run<br>POWERDOWNFLAG /etc/killpower<br># Removes all of the default 'wall' output from UPS events,<br># adds a EXEC event that actually performs the shutdown<br>NOTIFYFLAG ONLINE SYSLOG<br>NOTIFYFLAG ONBATT SYSLOG+EXEC<br>NOTIFYFLAG LOWBATT SYSLOG<br>NOTIFYFLAG FSD SYSLOG<br>NOTIFYFLAG COMMOK SYSLOG<br>NOTIFYFLAG COMMBAD SYSLOG<br>NOTIFYFLAG SHUTDOWN SYSLOG<br>NOTIFYFLAG REPLBATT SYSLOG<br>NOTIFYFLAG NOCOMM SYSLOG<br>NOTIFYFLAG NOPARENT SYSLOG<br>RBWARNTIME 43200<br>NOCOMMWARNTIME 300<br>FINALDELAY 5<br></li></ul><li>upssched.conf</li><ul><li># Names actual shell script which runs<br>CMDSCRIPT /etc/nut/forceshutdown.sh<br>PIPEFN /etc/nut/upssched/upssched.pipe<br>LOCKFN /etc/nut/upssched/upssched.lock<br># Handlers to start or cancel timer based on battery signals<br># Note that 'onbatt' is a command line parm for shutdown<br># script, but is not actually observed in the script<br>AT ONBATT * START-TIMER onbatt 5<br>AT ONLINE * CANCEL-TIMER onbatt<br></li></ul><li>forceshutdown.sh -- my custom script, doesn't case...esac the parameters since it's dedicated to shutting down</li><ul><li>#! /bin/sh<br>/bin/upscmd -u upsmon -p pass ups@localhost load.off.delay 30<br>sudo /sbin/shutdown -h +0<br></li></ul><li>users & permissions on files/folders to suit everything</li><li>PC is set up to boot on power</li></ul><div><br></div></div><div>Works great! Maybe not in the spirit of nut, especially since we're essentially using the mains power to turn on/off the whole system.</div><div><br></div><div>I'll be happy to answer questions if anyone has them. At some point I'd also like to learn more about nut and add more support for the AVR550U to help with the "restart on power" aspect that triggered this whole conversation. But, at the moment I'm overwhelmed with getting this project done.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 20, 2019 at 4:12 PM Charles Lepple <<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[please use reply-all to include the list]<br>
<br>
On May 20, 2019, at 5:30 PM, Steven Bixby wrote:<br>
> <br>
> I have a TrippLite AVR550U that my company uses several individual Linux boxes in one large system, all running Ubuntu 18.04LTS, and all will be using the package version of nut - 2.7.4. In my scenario, our usage case is for the PCs to all shut down, followed by the individual UPSes, when mains power is removed from the whole system. (This isn't a typical setup for UPS, but it's what we designed for our needs.)<br>
> <br>
> I have a basic "standalone" setup running OK - I can pull the plug, the PC shuts down, followed by the UPS, and everything is great. Except... When reapplying the mains power, the UPS isn't starting the load back up. I have to force it to start from the panel button, which is a requirement.<br>
> <br>
> Linux isn't my native environment; one of the PCs in our system does run Windows, and using TrippLite's PowerAlert software, I can configure the UPS to auto restart on power -- and it works very well. So, I *know* there's something that can be sent to the UPS to configure for auto-start.<br>
> <br>
> Alas, in three days of struggles with everything, I still haven't found the answer to this problem. Hopefully it's just a configuration parameter I've missed. Or if nothing else, I can adjust the nut source to push the command(s) - if I can figure it out. I'm about to try to use Wireshark+USBCap on Windows to trace what's going to the TrippLite when this setting is changed -- I've just had very little luck with WS/USBCap in the past, just too much information to sort through.<br>
<br>
Does the output from "upsc" look similar to this? <a href="http://new.networkupstools.org/ddl/Tripp_Lite/AVR750U.html" rel="noreferrer" target="_blank">http://new.networkupstools.org/ddl/Tripp_Lite/AVR750U.html</a><br>
<br>
I don't think we have a listing of valid NUT instant commands for the model mentioned in that variable dump (or the AVR550U, for that matter), but both variables and commands could help debug this problem. <a href="https://networkupstools.org/stable-hcl.html#footnotes" rel="noreferrer" target="_blank">https://networkupstools.org/stable-hcl.html#footnotes</a><br>
<br>
If the delay settings look reasonable, and "upscmd name-of-ups shutdown.return" doesn't do the trick, we will need to do some more digging.<br>
<br>
I'm wondering if it is this issue seen on a BCPERS450: <a href="https://alioth-lists.debian.net/pipermail/nut-upsuser/2018-January/011020.html" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/pipermail/nut-upsuser/2018-January/011020.html</a><br>
<br>
Probably a bit easier to read the thread here: <a href="https://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg10430.html" rel="noreferrer" target="_blank">https://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg10430.html</a><br>
<br>
It's been a little while since I used Wireshark to capture USB on Windows, but let me know if there's something I can help with.</blockquote></div>