<div dir="ltr">Thanks a lot Charels.<div><br></div><div>I just comment root user in usb.conf and add <span style="font-family:Monaco;font-size:13px">sudo adduser nut dialout.</span></div><div><span style="font-family:Monaco;font-size:13px">Now everything works well.</span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px">Thanks again you save me a lot of time :)</span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px">I wish all of you merry chrismas,</span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px">Janez</span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div><div><span style="font-family:Monaco;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-23 23:58 GMT+01:00 Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><blockquote type="cite"><div dir="ltr"><div>I setup apcsmart driver on port /dev/ttyUSB0 in ups.conf and check that runing user=root.</div><div><br></div></div></blockquote><div>user=root is only for testing- this may cause other permissions problems later. </div></blockquote><div><div><br></div></div></span><div>It looks like the simplest way to handle this on Debian is to add the system 'nut' user to the 'dialout' group:</div><div><br></div><div style="margin:0px;font-family:Monaco">$ sudo adduser nut dialout</div><span class=""><div><br></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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I have been meaning to collect some information on using serial UPSes with NUT via USB-to-serial converters, but you can adapt the udev rules to match your converter, and even create a symlink so that it will not change names. (If a process has /dev/ttyUSB0 open, and the USB cable is unplugged, udev will create /dev/ttyUSB1 when it is next plugged in, which will not match the configuration file)</div><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></blockquote><br></span></div><div>Just confirmed that the default udev rules for Raspbian wheezy will create some symlinks in /dev/serial/by-path and /dev/serial/by-id which should be useful.</div><div><br></div><div>I have an inexpensive USB-to-serial cable which does not have a unique serial number, so I can only use one of that model at a time, and still uniquely identify it. But this is what it produces:</div><div><br></div><div><div style="margin:0px;font-family:Monaco"><span style="color:#5330e1">$</span> ls -l /dev/serial/by-id/</div><div style="margin:0px;font-family:Monaco">total 0</div><div style="margin:0px;font-family:Monaco;color:rgb(52,187,199)"><span style="color:#000000">lrwxrwxrwx 1 root root 13 Dec 31  1969 </span>usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0<span style="color:#000000"> -> </span><span style="color:#999900;background-color:#000000">../../ttyUSB0</span></div><div><span style="color:#999900;background-color:#000000"><br></span></div></div><div>Although it is unwieldy, the pathnames under /dev/serial/by-id should always point to the correct /dev/ttyUSB? node.</div><span class="HOEnZb"><font color="#888888"><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br>

</div>
<br></font></span></div></blockquote></div><br></div>