<p dir="ltr">The problem with computers - they do what you tell them to, not what you might want them to.</p>
<p dir="ltr">Here your <a href="http://heartbeat.dev">heartbeat.dev</a> literally tells the emulation driver to set ups.status=OL, wait 300s, set it to OB, wait 300s, repeat.</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.</p>
<p dir="ltr">Jim</p>
<br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Mar 29, 2025, 20:26 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm using nut-2.8.2 on FreeBSD 14.2 with an Eaton 5PX2200RT<br>
<br>
Five minutes after starting nut, I get this message within my ssh session:<br>
<br>
UPS heartbeat on battery                                                       <br>
<br>
It is not clear to me why it reports that.<br>
<br>
Here is the full output of a restart:<br>
<br>
[18:12 gw01 dvl ~] % sudo service nut restart<br>
Stopping nut.<br>
Waiting for PIDS: 2553.<br>
Network UPS Tools - UPS driver controller 2.8.2<br>
fopen /var/db/nut/dummy-ups-heartbeat.pid: No such file or directory<br>
fopen /var/db/nut/usbhid-ups-ups04.pid: No such file or directory<br>
Network UPS Tools - UPS driver controller 2.8.2<br>
Network UPS Tools - Device simulation and repeater driver 0.19 (2.8.2)<br>
Network UPS Tools - Generic HID driver 0.53 (2.8.2)<br>
USB communication driver (libusb 1.0) 0.47<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:12 UTC...                                               <br>
<br>
Communications with UPS ups04 lost                                             <br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:12 UTC...                                               <br>
<br>
Communications with UPS ups04 lost                                             <br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:12 UTC...                                               <br>
<br>
Communications with UPS heartbeat lost                                         <br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:12 UTC...                                               <br>
<br>
Communications with UPS heartbeat lost                                         <br>
<br>
Using subdriver: MGE HID 1.46<br>
Starting nut.<br>
Network UPS Tools upsd 2.8.2<br>
fopen /var/db/nut/upsd.pid: No such file or directory<br>
Could not find PID file '/var/db/nut/upsd.pid' to see if previous upsd instance is already running!<br>
listening on 127.0.0.1 port 3493<br>
listening on ::1 port 3493<br>
listening on 10.55.0.1 port 3493<br>
listening on 2001:DB8::: port 3493<br>
Connected to UPS [ups04]: usbhid-ups-ups04<br>
Connected to UPS [heartbeat]: dummy-ups-heartbeat<br>
Found 2 UPS defined in ups.conf<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:12 UTC...                                               <br>
<br>
Communications with UPS ups04 established                                      <br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:13 UTC...                                               <br>
<br>
Communications with UPS heartbeat established                                  <br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:13 UTC...                                               <br>
<br>
UPS heartbeat on line power                                                    <br>
<br>
<br>
<br>
Broadcast Message from <a href="mailto:root@gw01.int.unixathome.org" target="_blank" rel="noreferrer">root@gw01.int.unixathome.org</a>                            <br>
        (no tty) at 18:17 UTC...                                               <br>
<br>
UPS heartbeat on battery                                                       <br>
<br>
[18:25 gw01 dvl ~] %<br>
<br>
<br>
Is it related by my choices here?<br>
<br>
<br>
[18:32 gw01 dvl /usr/local/etc/nut] % cat <a href="http://heartbeat.dev" rel="noreferrer noreferrer" target="_blank">heartbeat.dev</a> <br>
# <a href="http://heartbeat.dev" rel="noreferrer noreferrer" target="_blank">heartbeat.dev</a> -- 10 minute heartbeat<br>
ups.status: OL<br>
TIMER 300<br>
ups.status: OB<br>
TIMER 300<br>
<br>
<br>
[18:32 gw01 dvl /usr/local/etc/nut] % cat ups.conf<br>
maxretry = 3<br>
<br>
user = nut<br>
<br>
<br>
[heartbeat]<br>
  driver = dummy-ups<br>
  port = <a href="http://heartbeat.dev" rel="noreferrer noreferrer" target="_blank">heartbeat.dev</a><br>
  desc = Watch over NUT<br>
<br>
[ups04]<br>
  driver = usbhid-ups<br>
  port = auto<br>
  serial = P0foobar<br>
  desc = Primary UPS<br>
<br>
<br>
Oh wait, I just searched for "nut heartbeat" and found <a href="https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.html" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.html</a> where it mentions: "Remember that the are no comments in NUT .dev files."<br>
<br>
Let me delete that first line from my file and restart. Same process.<br>
<br>
Ideas please? <br>
<br>
more files, slightly modified:<br>
<br>
[18:53 gw01 dvl /usr/local/etc/nut] % sudo cat upsmon.conf<br>
# Ansible managed<br>
<br>
MONITOR ups04 1 local-monitor secrets master<br>
MONITOR heartbeat 0 upsmaster secrets2 master<br>
SHUTDOWNCMD "/sbin/shutdown -h +0"<br>
POWERDOWNFLAG /etc/killpower<br>
NOTIFYCMD /usr/local/pkg/nut/nut_email.php<br>
NOTIFYCMD /usr/local/sbin/upssched<br>
NOTIFYCMD ONLINE   SYSLOG+WALL+EXEC<br>
NOTIFYCMD ONBATT   SYSLOG+WALL+EXEC<br>
NOTIFYCMD LOWBATT  SYSLOG+WALL+EXEC<br>
NOTIFYCMD FSD      SYSLOG+WALL+EXEC<br>
NOTIFYCMD COMMOK   SYSLOG+WALL+EXEC<br>
NOTIFYCMD COMMBAD  SYSLOG+WALL+EXEC<br>
NOTIFYCMD SHUTDOWN SYSLOG+WALL+EXEC<br>
NOTIFYCMD REPLBATT SYSLOG+WALL+EXEC<br>
NOTIFYCMD NOCOMM   SYSLOG+WALL+EXEC<br>
NOTIFYCMD NOPARENT SYSLOG+WALL+EXEC<br>
DEADTIME 15<br>
FINALDELAY 60<br>
HOSTSYNC 15<br>
MINSUPPLIES 1<br>
NOCOMMWARNTIME 300<br>
POLLFREQ 5<br>
POLLFREQALERT 5<br>
RBWARNTIME 43200<br>
RUN_AS_USER nut<br>
<br>
<br>
[18:54 gw01 dvl /usr/local/etc/nut] % sudo cat upssched.conf<br>
# Ansible managed<br>
<br>
# Restart timer which completes only if the dummy-ups heart beat<br>
# has stopped. See timer values in <a href="http://heartbeat.dev" rel="noreferrer noreferrer" target="_blank">heartbeat.dev</a><br>
# oh wait, that does not exist<br>
#CMDSCRIPT /usr/local/etc/nut/upssched-cmd<br>
# Let me try this instead<br>
CMDSCRIPT /usr/local/bin/upssched-cmd<br>
<br>
PIPEFN /var/db/nut/upssched.pipe<br>
LOCKFN /var/db/nut/upssched.lock<br>
<br>
AT ONBATT heartbeat@localhost CANCEL-TIMER heartbeat-failure-timer<br>
AT ONBATT heartbeat@localhost START-TIMER  heartbeat-failure-timer 660<br>
<br>
<br>
<br>
-- <br>
  Dan Langille<br>
  <a href="mailto:dan@langille.org" target="_blank" rel="noreferrer">dan@langille.org</a><br>
<br>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote></div>