<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.StileMessaggioDiPostaElettronica19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So, the hardware way seems too difficult.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I see the raspberry documentation in order to understand if it’s possible “replicate” an USB signal to GPIO.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So, with a TTL-USB cable I send the signal to the NVR.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I hope this is possible!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=IT style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Da:</span></b><span lang=IT style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> Charles Lepple [mailto:clepple@gmail.com] <br><b>Inviato:</b> mercoledì 21 gennaio 2015 13:41<br><b>A:</b> Maurizio Iacaruso<br><b>Cc:</b> NUT List<br><b>Oggetto:</b> Re: [Nut-upsuser] R: NUT and relay on USB<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On Jan 21, 2015, at 3:41 AM, Maurizio Iacaruso <<a href="mailto:maurizio.iacaruso@gmail.com">maurizio.iacaruso@gmail.com</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The “device” is this<span class=apple-converted-space> </span><a href="http://www.dlink.com/it/it/business-solutions/network-storage/network-video-recorders/dnr-322l-cloud-network-video-recorder"><span style='color:purple'>http://www.dlink.com/it/it/business-solutions/network-storage/network-video-recorders/dnr-322l-cloud-network-video-recorder</span></a><span class=apple-converted-space> </span> , a NVR with USB port for monitoring UPS. It doesn’t support monitoring by LAN.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So, my aim is to “replicate” the state of the UPS, in the sense that the information are sent to raspberry (for NUT) AND to NVR, so it may shutdown properly.</span><o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It is not a simple matter to replicate the UPS state, in that sense. In general, UPS monitoring ports cannot be "shared" by two devices (although some high-end UPSes have more than one serial port for that purpose).</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is why NUT has 'upsd'. In the following diagram, "communication" is the USB link between the UPS and the Raspberry Pi (or the NVR). Either the Raspberry Pi has to </span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>share</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> the UPS status </span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>through</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> something like upsd (or something similar, like apcupsd's NIS master mode), or the NVR has to send the shutdown signal to the Raspberry Pi.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="http://www.networkupstools.org/docs/user-manual.chunked/ar01s03.html#_advanced_configuration">http://www.networkupstools.org/docs/user-manual.chunked/ar01s03.html#_advanced_configuration</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal>-- <o:p></o:p></p></div><div><p class=MsoNormal>Charles Lepple<o:p></o:p></p></div><div><p class=MsoNormal>clepple@gmail<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>