<div dir="ltr">yes, you are right. I tried the what you asked and got it working.<div><br></div><div>I overlooked the "know problems" section, but I think it is not clear enough. I would never realize from the manual that to keep my ups from waking up without mains I should use ondelay=0, and stayoff would make it recycle the power.  </div><div><br></div><div>If there were a section on the manual with something like this: if you are having problem when restarting the UPS try to change ondelay = 0,or test the stayoff flag.</div><div><br></div><div>I can write something for the special case of using a TS Shara nobreak, if you wish. </div><div><br></div><div>Thanks</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-02 1:34 GMT-03:00 Daniele Pezzini <span dir="ltr"><<a href="mailto:hyouko@gmail.com" target="_blank">hyouko@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2018-02-28 21:11 GMT+01:00 Jairo Rotava <<a href="mailto:jairo.rotava@gmail.com">jairo.rotava@gmail.com</a>>:<br>
> Hello,<br>
><br>
> I think that on this file nutdrv_qx_megatec.c the definition for<br>
> shutdown.stayoff may be wrong. In the file the definition is "S%sR0000\r"m<br>
> while on the megatec protocol description (<br>
> <a href="http://networkupstools.org/protocols/megatec.html" rel="noreferrer" target="_blank">http://networkupstools.org/<wbr>protocols/megatec.html</a>) the command is just<br>
> "S%s\r".<br>
<br>
</span>hmm.. no.<br>
In plain megatec protocol there's no such a thing as 'shutdown and<br>
stay off' -- the closest thing you can do is call 'SnRm' with an<br>
incredibly high value for the time to wait before turning on the<br>
device (i.e. 'SnR9999', using the allowed maximum), while the 'Sn'<br>
command is meant to tell the device to immediately turn on the load<br>
when power returns.<br>
Only some devices support the non-standard 'SnR0000' command and hold<br>
off the load indefinitely (and it's also stated in nutdrv_qx's<br>
manpage, 'Known problems' section).<br>
<span class=""><br>
> When I changed it my system was abe to at least stay off, and stopped making<br>
> an instant power recycling.<br>
<br>
</span>Try the following things and let's see what happens:<br>
- 'offdelay=30', 'ondelay=0' (the driver will send 'S.5' to the device),<br>
- 'offdelay=120', 'ondelay=0' (the driver will send 'S02' to the device),<br>
- 'offdelay=30', 'ondelay=180' (the driver will send 'S.5R0003' to the device),<br>
- 'offdelay=120', 'ondelay=180' (the driver will send 'S02R0003' to the device),<br>
- 'offdelay=30', 'stayoff' flag (the driver will send 'S.5R0000' to the device),<br>
- 'offdelay=120', 'stayoff' flag (the driver will send 'S02R0000' to<br>
the device).<br>
<br>
><br>
> Jairo<br>
</blockquote></div><br></div>