<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div id="AppleMailSignature" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div dir="ltr">Thank you for that, very much appreciate your help. I’ll have another go when I’m over at Nan’s house! Do you know what else I could try to solve the issue of no e-mails being sent? I know my e-mail settings were correct as it all worked previously.
 This is all rather odd! Hopefully I can get the e-mails being sent and ensure NUT starts automatically after a reboot. I feel like I’m getting closer!</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Charles, when you say I’ll need to enable upsmon-monitor... could you tell me the script to go about that? Sorry for my lack of knowledge in all this! </div>
<div dir="ltr"><br>
On 7 May 2019, at 3:27 am, Charles Lepple <<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">On May 6, 2019, at 2:57 PM, Stuart D. Gathman wrote:<br class="">
<div>
<blockquote type="cite" class=""><br class="Apple-interchange-newline">
<div class="">
<div class="">On Mon, 6 May 2019, Gareth Davies wrote:<br class="">
<br class="">
<blockquote type="cite" class="">Just to say, I stopped the driver and started it again and the errors went<br class="">
away! However, I turned off power to the UPS but I wasn’t receiving any<br class="">
e-mails :( also when I rebooted the RPi the driver/service didn’t start back<br class="">
up automatically... <br class="">
I wonder if you have any thoughts on the above?<br class="">
</blockquote>
<br class="">
Those are issues with understanding your distro.  For the latter, if you are using systemd, and your systemd service is called<br class="">
nut-server.service (as it is in Fedora), you would enable it at boot<br class="">
with "systemctl enable nut-server".  Systemd automatically starts<br class="">
prerequistites first, so on Fedora at least, starting nut-server first<br class="">
starts nut-driver.  You probably also need to start nut-monitor, as<br class="">
that is the usual place you would configure sending notifications.<br class="">
<br class="">
Sorry, I don't have details on Debian.<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">Stuart, thanks for jumping in. The systemd services are named the same in Debian.</div>
<div class=""><br class="">
</div>
<div class="">Gareth, you should get something like the following:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">$ systemctl|grep nut-</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">  nut-driver.service      loaded active running   Network UPS Tools - power device driver controller                                                    </span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">● nut-monitor.service     loaded failed failed    Network UPS Tools - power device monitor and shutdown controller                                      </span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">  nut-server.service      loaded active running   Network UPS Tools - power devices information server                                                  </span></div>
</div>
<div class=""><span class="" style="font-variant-ligatures:no-common-ligatures"><br class="">
</span></div>
<div class="">In your case, you will want nut-monitor to be running as well - it starts upsmon. (This was taken from a partially-configured system.)</div>
<div class=""><br class="">
</div>
<div class="">Debian 9 (stretch) is what we are looking for when referring to the distro. Armed with that information, we can look up the latest NUT version for that distro at
<a href="http://packages.debian.org/nut-server" class="">packages.debian.org/nut-server</a>, but it's always good to verify that your own system is up-to-date:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">$ dpkg -l "nut-*"</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">Desired=Unknown/Install/Remove/Purge/Hold</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">||/ Name                      Version           Architecture      Description</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">+++-=========================-=================-=================-=======================================================</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">un  nut-cgi                   <none>            <none>            (no description available)</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">ii  nut-client                2.7.4-5           amd64             network UPS tools - clients</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
un  nut-ipmi                  <none>            <none>            (no description available)</div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">un  nut-monitor               <none>            <none>            (no description available)</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">ii  nut-server                2.7.4-5           amd64             network UPS tools - core system</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">un  nut-snmp                  <none>            <none>            (no description available)</span></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; font-family:Monaco; background-color:rgb(255,255,255)">
<span class="" style="font-variant-ligatures:no-common-ligatures">un  nut-xml                   <none>            <none>            (no description available)</span></div>
</div>
<div class=""><span class="" style="font-variant-ligatures:no-common-ligatures"><br class="">
</span></div>
<div class=""><br class="">
</div>
<div class="">Not sure if you saw Roger's message (he sent it directly to the list, and it doesn't look like you are subscribed): <a href="https://alioth-lists.debian.net/pipermail/nut-upsuser/2019-May/011373.html" class="">https://alioth-lists.debian.net/pipermail/nut-upsuser/2019-May/011373.html</a> His
 guide covers a lot of the setup process, including a script to email about power status changes. Personally, once the services start at boot, I would be satisfied with just notifying on COMMBAD and NOCOMM events (between the two, that should cover USB-related
 errors), but in the end it's up to you to trade off between complexity of the initial setup, and reliability in the long term.</div>
</div>
</blockquote>
</body>
</html>