<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>[please use the nut-upsuser@ address rather than nut-upsuser-owner@ and be sure to use Reply-All - thanks!]</div><div><br></div><div>On Dec 23, 2014, at 1:52 PM, Janez Kremzer <<a href="mailto:janez256@gmail.com">janez256@gmail.com</a>> wrote:</div><div><br></div><div><span></span></div><blockquote type="cite"><div><div dir="ltr">Hi!<div><br></div><div>I woud like to use Raspberry Pi with NUT installed whic coud shut down NAS in the office.</div><div>NAS doesn't have comport and this is the reasion why not to use NAS directly.</div><div><br></div><div>Today i spend almost all day with reading man nut, making serial cable, and configuring....</div><div>At first was gone with progress but at the end i have not idea what goes wrong. I decided to write on this mailing list and i get a little help.</div><div><br></div><div><br></div><div><br></div><div>Enviroment:</div><div>Raspberry Pi Model B+ 512MB RAM with 8GB SD Card,</div><div><br></div><div><a href="http://www.raspberrypi.org/downloads/">Raspbian Debian Wheezy 2014-09-09 - Kernel version: 3.12</a> from ISO image,<br></div><div><br></div><div><a href="http://www.aten.com/products/productItem.php?pid=2005022316346005&psid=20070130144911002&pcid=2007013014453002&layerid=subClass7#.VJm11_8gsc">ATEN USB TO RS232 UC232A</a> (Debian found it without aditional driver) - I also tryed with  RS232 to TTL but it works worse than USB converter,</div><div><br></div><div>APC Smart-UPS SC450 RM (apcsmart driver documentation tell that this is new driver with only serial port),</div><div><br></div><div><a href="http://www.networkupstools.org/protocols/apcsmart.html#_rs_232_differences">Home made 940-0024C</a> cable tested by Windows PowerCute (UPS was recognised well without losing connections)</div><div><br></div><div><br></div><div>Instalation:</div><div><br></div><div>I'm have little NUT experiance. Because of that was read <a href="http://abakalidis.blogspot.com/2013/04/using-raspberry-pi-as-ups-server-with.html">that</a> blog at the begining.</div><div>I made same installation of nut but without usb drivers at the begining.</div><div><br></div><div>I setup apcsmart driver on port /dev/ttyUSB0 in ups.conf and check that runing user=root.</div><div><br></div></div></div></blockquote><div>user=root is only for testing- this may cause other permissions problems later. </div><div><br></div><div>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><blockquote type="cite"><div><div dir="ltr"><div>Then i test driver with that command: /lib/nut/apcsmart -D -a ups</div><div><br></div><div>Results:</div><div><br></div><div><div>Network UPS Tools - APC Smart protocol driver 3.04 (2.6.4)</div><div>APC command table version 3.0</div><div>   0.000000     debug level is '1'</div><div>   0.051518     attempting firmware lookup using command 'V'</div><div>   0.112106     APC - attempting to find command set</div><div>   0.792347     APC - Parsing out supported cmds and vars</div><div>   1.822792     protocol_verify - APC: [d] unrecognized</div><div>   2.873615     APC - About to get capabilities string</div><div>   4.963132     supported capability: 75 (I) - input.transfer.high</div><div>   4.963474     supported capability: 6c (I) - input.transfer.low</div><div>   4.963678     supported capability: 65 (4) - battery.charge.restart</div><div>   4.963862     supported capability: 6f (I) - output.voltage.nominal</div><div>   4.964063     supported capability: 73 (4) - input.sensitivity</div><div>   4.964312     supported capability: 71 (4) - battery.runtime.low</div><div>   4.964514     supported capability: 70 (4) - ups.delay.shutdown</div><div>   4.964689     supported capability: 6b (4) - battery.alarm.threshold</div><div>   4.964853     supported capability: 72 (4) - ups.delay.start</div><div>   4.965061     supported capability: 45 (4) - ups.test.interval</div><div>   4.965258     APC - UPS capabilities determined</div><div>   4.965387     detected Smart-UPS SC450 RM [5S1004T68623] on /dev/ttyUSB0</div></div><div><br></div><div>I think that this looks ok.</div></div></div></blockquote><div><br></div>Agreed. <br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Then i run that command: upsdrvctl start</div><div><br></div><div>Results:</div><div><br></div><div><div>Network UPS Tools - UPS driver controller 2.6.4</div><div>Network UPS Tools - APC Smart protocol driver 3.04 (2.6.4)</div><div>APC command table version 3.0</div></div><div><br></div><div>I think that is this also ok.</div></div></div></blockquote><div><br></div>If you start the driver manually (especially with debug options), be sure to stop it before using the init scripts for the rest of NUT.<div><br></div><div>This is an open issue: <a href="https://github.com/networkupstools/nut/issues/168">https://github.com/networkupstools/nut/issues/168</a><br><div><br><blockquote type="cite"><div><div dir="ltr"><div>I finished configurations and i try to run a service.</div><div>Command: service nut-server start (command take some time around 20 s like driver)</div><div><br></div><div>Results:</div><div>[....] Starting NUT - power devices information server and drivers:  driver(s). [ ok.<br></div><div><br></div><div>At the end i try to run client service.</div><div><br></div><div>command: service nut-client start</div><div><br></div><div>Results:</div><div><div>Broadcast Message from root@rasp</div><div>        (somewhere) at 18:49 ...</div><div><br></div><div>Communications with UPS <a href="mailto:ups@127.0.0.1">ups@127.0.0.1</a> lost</div><div><br></div><div><br></div><div>Broadcast Message from root@rasp</div><div>        (somewhere) at 18:49 ...</div><div><br></div><div>UPS <a href="mailto:ups@127.0.0.1">ups@127.0.0.1</a> is unavailable</div></div><div><br></div><div><br></div><div>This looks that client can't establish connection with the server but why? I checked all my configuration again but i didn't found errors.</div><div><br></div><div>How can i found solution for that?</div><div><br></div><div>p.s.:</div><div><br></div><div>Also upsc command return error: "Error: Driver not connected"</div></div></div></blockquote><div><br></div>This means the driver is not talking to upsd. See previous comments about permissions and extra drivers. I can try to test this on a Pi later today. <br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>But how driver is not connected?  I tested driver several time and everything was work.</div><div><br></div><div>Kind regards,</div><div>Janez</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>
</div></blockquote></div></div></body></html>