<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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 style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$ systemctl|grep nut-</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  nut-driver.service      loaded active running   Network UPS Tools - power device driver controller                                                    </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">● nut-monitor.service     loaded failed failed    Network UPS Tools - power device monitor and shutdown controller                                      </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  nut-server.service      loaded active running   Network UPS Tools - power devices information server                                                  </span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><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 style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$ dpkg -l "nut-*"</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Desired=Unknown/Install/Remove/Purge/Hold</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">||/ Name                      Version           Architecture      Description</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+++-=========================-=================-=================-=======================================================</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">un  nut-cgi                   <none>            <none>            (no description available)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ii  nut-client                2.7.4-5           amd64             network UPS tools - clients</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class="">un  nut-ipmi                  <none>            <none>            (no description available)</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">un  nut-monitor               <none>            <none>            (no description available)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ii  nut-server                2.7.4-5           amd64             network UPS tools - core system</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">un  nut-snmp                  <none>            <none>            (no description available)</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">un  nut-xml                   <none>            <none>            (no description available)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><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></body></html>