<div dir="ltr"><div>Thinking of it, there was a change to handling of files by dummy-ups around 2.8.0 release: depending on an explicit setting or a file extension:</div><div><br></div><div>> Specify mode instead of guessing it from port value (dummy = dummy-loop, dummy-once, repeater) : -x mode=<value></div><div><br></div><div>As the man page goes, by default "*.dev"=>"dummy-once" (emulate a device snapshot, so once to the end of file and stop) and "*.seq"=>"dummy-loop" (run a device behavior sequence, so looping).</div><div><br></div><div>Jim</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Mar 31, 2025 at 2:06 PM Dan Langille via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net">nut-upsuser@alioth-lists.debian.net</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"><div class="msg851930064332550882"><u></u><div><div>On Sat, Mar 29, 2025, at 5:24 PM, Dan Langille via Nut-upsuser wrote:<br></div><blockquote type="cite" id="m_851930064332550882qt"><div><br></div><div><br></div><div>On Sat, Mar 29, 2025, at 4:40 PM, Jim Klimov wrote:<br></div><blockquote type="cite" id="m_851930064332550882qt-qt"><p dir="ltr">The problem with computers - they do what you tell them to, not what you might want them to.<br></p></blockquote></blockquote><div><br></div><div>I've never liked them. Terrible things. It's merely a fad.<br></div><div><br></div><blockquote type="cite" id="m_851930064332550882qt"><blockquote type="cite" id="m_851930064332550882qt-qt"><p dir="ltr">Here your <a href="http://heartbeat.dev" target="_blank">heartbeat.dev</a> literally tells the emulation driver to set ups.status=OL, wait 300s, set it to OB, wait 300s, repeat.<br></p><p dir="ltr">So NUT reporting that the heartbeat UPS became on-battery 5 minutes after start means these pieces are doing their job correctly and talking to each other well.<br></p><p dir="ltr">Jim<br></p></blockquote><div><br></div><div>Outside eyes are so useful. <br></div><div><br></div><div>I knew what you meant as soon as I read the second paragraph. <br></div></blockquote><div><br></div><div>After going through the original post (<a href="https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.htm" target="_blank">https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.htm</a>) again, I now understand how it's trying to achieve the goal.<br></div><div><div><br></div><div>I also managed to fix several other issues with my configuration. NOTE to readers: don't use my postedconfiguration it was wrong. For example, most of my NOTIFYCMD should have been NOTIFYFLAG (I suspect copy/paste failures).<br></div><div><br></div><div>I also corrected upsd.users and upsmon.conf which had conflicting users.<br></div><div><br></div></div><div>I later discovered that <a href="http://heartbeat.dev" target="_blank">heartbeat.dev</a> must now be heartbeat.conf - the former partially works. Details below.</div><div><br></div><div>Here is an example of restarting nut while nut_upsmon is running. Seems sensible to me.<br></div><div><br></div><div>Mar 30 20:05:58 gw01 upsd[73103]: mainloop: Interrupted system call<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:00 gw01 upsmon[76592]: Poll UPS [ups04] failed - Server disconnected<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:00 gw01 upsmon[76592]: Communications with UPS ups04 lost<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:00 gw01 upsmon[76592]: Poll UPS [heartbeat] failed - Write error: Broken pipe<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:00 gw01 upsmon[76592]: Communications with UPS heartbeat lost<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:05 gw01 upsmon[76592]: UPS [ups04]: connect failed: Connection failure: Connection refused<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:05 gw01 upsmon[76592]: UPS [heartbeat]: connect failed: Connection failure: Connection refused<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:10 gw01 upsmon[76592]: UPS [ups04]: connect failed: Connection failure: Connection refused<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:10 gw01 upsmon[76592]: UPS [heartbeat]: connect failed: Connection failure: Connection refused<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:15 gw01 upsmon[76592]: Communications with UPS ups04 established<br style="max-width:100%;height:auto"></div><div>Mar 30 20:06:15 gw01 upsmon[76592]: Communications with UPS heartbeat established<br style="max-width:100%;height:auto"></div><div>Mar 30 20:11:05 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div><br></div><div>However, I never see a switch back to line power. I've waited about 35 minutes now.<br></div><div><br></div><div>Reading further, I rediscovered: <a href="https://rogerprice.org/NUT/ConfigExamples.A5.pdf" target="_blank">https://rogerprice.org/NUT/ConfigExamples.A5.pdf</a><br></div><div><br></div><div>In there, I found: 2020-08-20 File <a href="http://heartbeat.dev" target="_blank">heartbeat.dev</a> becomes heartbeat.conf<br></div><div><br></div><div>I renamed all instances of <a href="http://heartbeat.dev" target="_blank">heartbeat.dev</a> to heartbeat.conf, and restarted both nut & upsmon.<br></div><div><br></div><div>Boom. Actual results matched expected results:<br></div><div><br></div><div>Mar 30 20:54:22 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div>Mar 30 20:59:23 gw01 upsmon[76592]: UPS heartbeat on line power<br></div><div>Mar 30 21:04:24 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div>Mar 30 21:09:29 gw01 upsmon[76592]: UPS heartbeat on line power<br></div><div>Mar 30 21:14:30 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div>Mar 30 21:19:30 gw01 upsmon[76592]: UPS heartbeat on line power<br></div><div>Mar 30 21:24:31 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div>Mar 30 21:29:37 gw01 upsmon[76592]: UPS heartbeat on line power<br></div><div>Mar 30 21:34:37 gw01 upsmon[76592]: UPS heartbeat on battery<br></div><div><br></div><div>To verify it was the device name, I stopped both daemons and made the following modifications:<br></div><div><br></div><div>* ups.conf: 'port = heartbeat.conf' -> 'port = <a href="http://heartbeat.dev" target="_blank">heartbeat.dev</a>'<br></div><div>* mv heartbeat.conf heartbeat.conf<br></div><div><br></div><div>Start nut, start ups_mon.<br></div><div><br></div><div>With that configuration, the previously mentioned behavior returned.<br></div><div><br></div><div>Reverting the changes resulted in the expected swapping between battery and line every 5 minutes.<br></div><div><br></div><div>Thank you for getting me started on the right track.</div><div><br></div><div id="m_851930064332550882sig65064480"><div>--<br></div><div> Dan Langille<br></div><div> <a href="mailto:dan@langille.org" target="_blank">dan@langille.org</a><br></div><div><br></div></div><div><br></div></div>_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</div></blockquote></div>