Hi Michal,<br><br>sorry for the lag...<br><br><div class="gmail_quote">2012/10/29 Michal Soltys <span dir="ltr"><<a href="mailto:soltys@ziu.info" target="_blank">soltys@ziu.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2012-10-29 22:02, Arnaud Quette wrote:<br>
<br>
><br>
> I'm not sure to fully understand your proposition, but it's probably<br>
> time for me to have some rest...<br>
><br>
> I recently tried to clarify the evolution of the ambient collection:<br>
> <a href="http://www.networkupstools.org/docs/user-manual.chunked/apcs01.html#_ambient_conditions_from_external_probe_equipment" target="_blank">http://www.networkupstools.org/docs/user-manual.chunked/apcs01.html#_ambient_conditions_from_external_probe_equipment</a><br>

><br>
> in light of this, could you please send your proposal of variable mapping?<br>
> that's the best way to see which command will be mapped to what NUT data...<br>
><br>
<br>
</div>For example, on my in-testing driver I have:<br>
<br>
        { "ambient.humidity",0          , 'h',  APC_POLL|APC_F_PERCENT },<br>
        { "ambient.0.humidity",0        , 'H',  APC_POLL|APC_PACKED|APC_F_PERCENT },<br>
        { "ambient.0.humidity.high",0   , '{',  APC_PACKED|APC_F_PERCENT },<br>
        { "ambient.0.humidity.low",0    , '}',  APC_PACKED|APC_F_PERCENT },<br>
        { "ambient.temperature",0       , 't',  APC_POLL|APC_F_CELSIUS },<br>
        { "ambient.0.temperature",0     , 'T',  APC_POLL|APC_PACKED|APC_F_CELSIUS },<br>
        { "ambient.0.temperature.high",0, '[',  APC_PACKED|APC_F_CELSIUS },<br>
        { "ambient.0.temperature.low",0 , ']',  APC_PACKED|APC_F_CELSIUS },<br>
<br>
<br>
'T' sends something like "23.11,45.55"<br>
<br>
It gets parsed into 23.11 and 45.55 and assigned/polled as<br>
ambient.1.temperature and ambient.2.temperature respectively; missing<br>
values are added as N/A, so ",45.55" would end as N/A and 45.55;<br>
ambient.0.temperature variant is not added (just a tab entry). Similarly<br>
'H' for humidity data.<br>
<br>
BUT<br>
<br>
'[' and other .high/.low are also enumerable - so in addition to the<br>
above, also ambient.0.temperature.high is added to be easily<br>
settable by e.g. upsrw.<br>
<br>
The "problematic" parts:<br>
<br>
- I can't test it (no hardware exposing such commands on my side)<br>
- I'm not 100% sure about enumeration in this case; supposedly '-' and '+'<br>
  are used to cycle through values - so I assume single values are<br>
  returned during capability check<br>
- previous point implies that only 2 values are possible in practice;<br>
  currently I split into up to 9 values, but it makes no sense then<br>
<br>
So in this context, supporting 2 values seem most reasonable (or most compatible).<br>
</blockquote></div><br>well, do you best to make this fit in the namespace, as described in nut-names.txt...<br clear="all"><br>cheers,<br>Arnaud<br>-- <br>NUT (Network UPS Tools) Project Leader - <a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>
Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br><br>