<br><div class="gmail_quote">2009/5/7 Steffen Plotner <span dir="ltr"><<a href="mailto:swplotner@amherst.edu">swplotner@amherst.edu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font face="Arial" size="2">Hi,</font>
</p></div></blockquote><div>Hi Stephen,<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><p></p>
<p><font face="Arial" size="2">We have several APC Smart UPSes (serial port/apcsmart) with the APC Temp/Humidity sensor cards (AP9612TH). The sensor cards have 2 plugs for 2 separate sensors. So far, we have only used one of the sensors in conjunction with the apcsmart module from nut. This has been working great. Example output:</font></p>
<p><font face="Arial" size="2">[nut@nut]# upsc APC11</font>
<br><font face="Arial" size="2">ambient.humidity: 037.2</font>
<br><font face="Arial" size="2">ambient.humidity.alarm.maximum: NO,NO</font>
<br><font face="Arial" size="2">ambient.humidity.alarm.minimum: NO,NO</font>
<br><font face="Arial" size="2">ambient.temperature: 21.08</font>
<br><font face="Arial" size="2">ambient.temperature.alarm.maximum: NO,NO</font>
<br><font face="Arial" size="2">ambient.temperature.alarm.minimum: NO,NO</font>
</p>
<p><font face="Arial" size="2">We thought of utilizing the second sensor port and have not been able to determine how to read the values of the second port.</font></p>
<p><font face="Arial" size="2">Looking at the source code of apcsmart we noticed that the following characters are sent to the UPS to retrieve the current data: the letter 't' for temperature and the letter 'h' for humidity.</font></p>
<p><font face="Arial" size="2">One of our co-workers decided to use the Windows based software from APC and showed me that he can read both sensors fine. Ok, so we fired up from sysinternals the portmon tool to study what is happening on the serial port and we find the following:</font></p>
<p><font face="Arial" size="2">The upper case letter 'T' produces 2 values:</font>
<br><font face="Arial" size="2">21.08,20.09</font>
</p>
<p><font face="Arial" size="2">The upper case letter 'H' produces 2 values:</font>
<br><font face="Arial" size="2">037.2,034.0</font>
</p>
<p><font face="Arial" size="2">If sensor 1 is not plugged in and sensor 2 is, then the output can look like:</font>
<br><font face="Arial" size="2">,034.3</font>
</p>
<p><font face="Arial" size="2">I have 2 questions:</font>
</p>
<p><font face="Arial" size="2">1. could the web page </font><a href="http://www.networkupstools.org/protocols/apcsmart.html" target="_blank"><u><font color="#0000ff" face="Arial" size="2">http://www.networkupstools.org/protocols/apcsmart.html</font></u></a><font face="Arial" size="2"> be updated to include this finding?</font>
</p>
<p><font face="Arial" size="2">2. could we modify the source code to accommodate this?</font>
</p>
<p><font face="Arial" size="2">In regards to the software, there are some issues. By default we still have to query for the old values so that the above output is maintained. Maybe a config switch (man apcsmart: extra arguments: multisensor:1 and default to 0) would specifically allow the admin to enable the dual values, then the output might look like:</font></p>
<p><font face="Arial" size="2">ambient.humdity1: x.x</font>
<br><font face="Arial" size="2">ambient.humidty2: x.x</font>
<br><font face="Arial" size="2">ambient.temperature1: x.x</font>
<br><font face="Arial" size="2">ambient.temperatuer2: x.x</font>
</p>
<p><font face="Arial" size="2">I am unclear currently about the alarm.min and max values what exactly does NO,NO mean? Is that referring by chance to the 2 possible sensors?<br>
</font>
<br><font face="Arial" size="2">I am willing to work on the source code - unless some else already knows and wants to implement this feature… I would like have to have feed back in particularly about how we should go about implementing the above (i.e. is that in line with the current project, for example).</font></p>
</div></blockquote><div>first, thanks for your mail and investigations.<br>we sadly lack an APC maintainer, which explains the lack of answer and evolution of this driver.<br>if you're willing to work on implementing your findings, you're welcome.<br>
I, and maybe others, will be glad to help you.<br><br>on my side, I'll check for the protocol update, possibly also using:<br><a href="http://www.apcupsd.org/manual/APC_smart_protocol.html">http://www.apcupsd.org/manual/APC_smart_protocol.html</a><br>
</div></div><br>if you need directions to start, tell me so.<br><br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br><br>