<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>apcsmart and dual environmental sensors</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">We have a several AP9612TH environmental cards (they have 2 probe connectors) inserted into our APC UPS devices which monitor temperature and humidity. The apcsmart nut module knows how to query the ambient.temperature and ambient.humidity using the 't' and 'h' commands of the UPS (refer to apcsmart.h). The results of the 't' and 'h' commands are from probe 1.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">If you submit via the serial port the commands 'T' and 'H' you can obtain temperature and humidity readings that contains the results of both probes. The results are comma seperated:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">ambient.temperature.dual: 28.70,20.82</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have created a patch that supports the new 'T' and 'H' commands and its resulting output using upsc is shown above. The patch does not change the behavior of the origina ambient.temperature reading, it simply adds a new ambient.temperature.dual reading (this applies to both temperature and humidity):</FONT></P>

<P><FONT SIZE=2 FACE="Arial">--- nut-2.2.0/drivers/apcsmart.h.orig&nbsp;&nbsp; 2006-11-25 02:52:52.000000000 -0500</FONT>

<BR><FONT SIZE=2 FACE="Arial">+++ nut-2.2.0/drivers/apcsmart.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2009-06-10 09:54:18.000000000 -0400</FONT>

<BR><FONT SIZE=2 FACE="Arial">@@ -156,6 +156,8 @@</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_F_VOLT,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'o' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.humidity&quot;,&nbsp;&nbsp; APC_POLL|APC_F_PERCENT, 'h' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.humidity.dual&quot;,</FONT>

<BR><FONT SIZE=2 FACE="Arial">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_POLL|APC_F_LEAVE,&nbsp;&nbsp; 'H' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.humidity.alarm.maximum&quot;, </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_F_PERCENT,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '{' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.humidity.alarm.minimum&quot;, </FONT>

<BR><FONT SIZE=2 FACE="Arial">@@ -163,6 +165,8 @@</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.temperature&quot;, </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_POLL|APC_F_CELSIUS, 't' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.temperature.dual&quot;,</FONT>

<BR><FONT SIZE=2 FACE="Arial">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_POLL|APC_F_LEAVE,&nbsp;&nbsp; 'T' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.temperature.alarm.maximum&quot;,</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APC_F_CELSIUS,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '[' },</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &quot;ambient.temperature.alarm.minimum&quot;, </FONT>

<BR><FONT SIZE=2 FACE="Arial">@@ -241,7 +245,7 @@</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;};</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;/* things to ignore in protocol_verify - useless variables, etc. */</FONT>

<BR><FONT SIZE=2 FACE="Arial">-#define CMD_IGN_CHARS &quot;\032-78@.,~\047\177QHRTYayz)1IJ&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">+#define CMD_IGN_CHARS &quot;\032-78@.,~\047\177QRYayz)1IJ&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;/* compatibility with hardware that doesn't do APC_CMDSET ('a') */</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>
</P>

<P><FONT SIZE=1 FACE="Verdana">________________________________</FONT>
</P>

<P><FONT SIZE=1 FACE="Verdana">Steffen Plotner</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Systems Administrator/Programmer</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Systems &amp; Networking</FONT>
</P>

<P><FONT SIZE=1 FACE="Verdana">Amherst College</FONT>

<BR><FONT SIZE=1 FACE="Verdana">PO BOX 5000</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Amherst, MA 01002-5000</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Tel (413) 542-2348</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Fax (413) 542-2626</FONT>

<BR><FONT SIZE=1 FACE="Verdana">Email:<U> </U></FONT><U><FONT COLOR="#0000FF" SIZE=1 FACE="Verdana">swplotner@amherst.edu </FONT></U>

<BR><FONT SIZE=1 FACE="Verdana">________________________________</FONT>
</P>
<BR>

</BODY>
</HTML>