<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thanks, yes from macports.<br><br>Sent from my iPhone </div><div><br>On 05 Jun 2015, at 04:21, Charles Lepple <<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><br><div><div>On Jun 4, 2015, at 10:41 AM, Simone Severini <<a href="mailto:severini.simone@gmail.com">severini.simone@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">Thanks for your help!<div>In red below.</div><div>Cheers</div><div>simone<br><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 2:45 PM, Charles Lepple<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><span class="">On Jun 3, 2015, at 11:45 AM, Simone Severini <<a href="mailto:severini.simone@gmail.com" target="_blank">severini.simone@gmail.com</a>> wrote:<br></span><div><span class=""><br><blockquote type="cite"><div dir="ltr">Hi everybody!<div>It has been a journey but I almost manage to make my UPS properly communicate.</div><div><br></div><div>This is the config:</div><div><br></div><div>UPS Mecer/Mustek 2000 VA connected via USB with blazer_usb driver. </div><div>MASTER Raspberry PI-1 </div><div>SLAVE Raspberry PI-2 </div><div>SLAVE iMac OSX 10.10.3 </div><div><br></div><div>I can get access to the UPS from any of the three devices successfully.</div><div><br></div><div>Problems:</div><div>1. When I launch <font color="#000080" face="Courier New, Courier, monospace"><span style="line-height: 1;">/usr/local/ups/sbin/upsmon -c </span><span style="line-height: 13px;">fed</span><span style="line-height: 1;"> </span></font>for testing I see Rasp-2 Slave going down, Rasp-1 going down, iMac completely ignoring and not receiving any broadcast message on the terminal then brutally killed as the UPS auto shutdown.</div></div></blockquote></span><div dir="ltr"><div><br></div><div>If you search for 'upsmon' in /var/log/system.log on the iMac, does it appear to be logged in to upsd on the master?</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><font color="#ff0000">Jun  4 16:34:23 Simone.Home upsmon[1081]: writepid: fopen /opt/local/var/run/upsmon.pid: Permission denied</font></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><font color="#ff0000">Jun  4 16:34:24 Simone.Home upsmon[1081]: Login on UPS [<a href="mailto:ME-2000@192.168.1.69">ME-2000@192.168.1.69</a>] failed - got [ERR ACCESS-DENIED] </font></div></div></div></div></div></blockquote><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">So there is one problem. How can I change permission on upsilon.pid.</font></div></div></div></div></div></div></blockquote><div><br></div><div>The driver writes the PID file when it starts, and it drops privileges to a system username specified at ./configure time. So you would need to allow that user to write to /opt/local/var/run/ (or better yet, a NUT-specific subdirectory like /opt/local/var/run/nut).</div><br><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div><font color="#ff0000"> The access denied is it due to wrong username/password?</font></div></div></div></div></div></div></blockquote><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div> </div><div>Yes. Bear in mind that these are NUT users defined in etc/upsd.users, not system usernames.</div><div><br></div></div></div></div></div></div><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><div dir="ltr"><div>My Mac has a local UPS, so I haven't looked into whether upsmon properly reconnects after sleep.</div><div><br></div></div><span class=""><blockquote type="cite"><div dir="ltr">2. When I have done a live test, the Master Rasp never intercepted any FLAG from UPS and UPS just died but halting just RASP-1 properly (connected via cable). iMac ignored the whole procedure.</div></blockquote><div><br></div></span><div>You didn't mention which version of NUT you are using, but for recent versions, both the blazer_usb and nutdrv_qx drivers can be configured to generate their own LB signal based on runtime or percent charge. See the documentation for 'ignorelb' in ups.conf.</div><span class=""><br></span></div></blockquote><div><font color="#ff0000">Thanks. I'm running <span style="font-family: Menlo; font-size: 11px;">Network UPS Tools upsmon 2.6.5-Unversioned directory</span> </font></div></div></div></div></div></div></blockquote><div><br></div><div>From MacPorts?</div><br></div><br></div></blockquote></body></html>