<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Jan 21, 2015, at 3:41 AM, Maurizio Iacaruso <<a href="mailto:maurizio.iacaruso@gmail.com">maurizio.iacaruso@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">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" style="color: purple; text-decoration: underline;">http://www.dlink.com/it/it/business-solutions/network-storage/network-video-recorders/dnr-322l-cloud-network-video-recorder</a><span class="Apple-converted-space"> </span> , a NVR with USB port for monitoring UPS. It doesn’t support monitoring by LAN.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">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.<o:p></o:p></span></div></blockquote><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><br></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">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></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><br></span></div><div style="margin: 0cm 0cm 0.0001pt; orphans: auto; text-align: start; text-indent: 0px; widows: auto;"><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 11pt;">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: 15px;">share</span><span style="font-size: 11pt;"> the UPS status </span><span style="font-size: 15px;">through</span><span style="font-size: 11pt;"> 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></font></div><div style="margin: 0cm 0cm 0.0001pt; orphans: auto; text-align: start; text-indent: 0px; widows: auto;"><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 11pt;"><br></span></font></div><div style="margin: 0cm 0cm 0.0001pt; orphans: auto; text-align: start; text-indent: 0px; widows: auto;"><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></div><div style="margin: 0cm 0cm 0.0001pt; orphans: auto; text-align: start; text-indent: 0px; widows: auto;"><br></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; 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;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div></div><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>