2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

added ignore_battery option to LaCrossePairForSec

git-svn-id: https://svn.fhem.de/fhem/trunk@4166 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2013-11-06 21:21:53 +00:00
parent 943255d7ba
commit 32a3c3762f
2 changed files with 13 additions and 11 deletions

View File

@ -134,7 +134,8 @@ JeeLink_Set($@)
my $name = shift @a;
my $cmd = shift @a;
my $arg = join("", @a);
my $arg = shift @a;
my $arg2 = shift @a;
my $list = "raw:noArg";
$list .= " LaCrossePairForSec";
@ -147,8 +148,8 @@ JeeLink_Set($@)
JeeLink_SimpleWrite($hash, $arg);
} elsif( $cmd eq "LaCrossePairForSec" ) {
return "Usage: set $name LaCrossePairForSec <seconds_active>" if(!$arg || $arg !~ m/^\d+$/);
$hash->{LaCrossePair} = 1;
return "Usage: set $name LaCrossePairForSec <seconds_active> [ignore_battery]" if(!$arg || $arg !~ m/^\d+$/ || $arg2 ne "ignore_battery");
$hash->{LaCrossePair} = $arg2?2:1;
InternalTimer(gettimeofday()+$arg, "JeeLink_RemoveLaCrossePair", $hash, 1);
} else {
@ -561,8 +562,9 @@ JeeLink_Attr(@)
<li>raw &lt;datar&gt;<br>
send &lt;data&gt; as a raw message to the JeeLink to be transmitted over the RF link.
</li><br>
<li>LaCrossePair &lt;sec&gt;<br>
enable autocreate of new LaCrosse sensors vor &lt;sec&gt; seconds
<li>LaCrossePairForSec &lt;sec&gt; [ignore_battery]<br>
enable autocreate of new LaCrosse sensors for &lt;sec&gt; seconds. if ignore_battery is not given only sensors
sending the 'new battery' flag will be created.
</li>
</ul>

View File

@ -134,9 +134,9 @@ LaCrosse_Parse($$)
Log3 $name, 3, "LaCrosse Unknown device $rname, please define it";
my $iohash = $rhash->{IODev};
return undef if( $iohash->{LaCrossePair} );
return undef if( !$iohash->{LaCrossePair} );
return "UNDEFINED LaCrosse_$rname LaCrosse $raddr" if( $battery_new );
return "UNDEFINED LaCrosse_$rname LaCrosse $raddr" if( $battery_new || $iohash->{LaCrossePair} == 2 );
return undef;
}
@ -190,7 +190,7 @@ LaCrosse_Attr(@)
<ul>
<tr><td>
FHEM module for LaCrosse IT+ (and TFA 35.1111.IT and possibly Conrad WS9160-IT) Temperature and Humidity sensors.<br><br>
FHEM module for LaCrosse Temperature and Humidity sensors.<br><br>
It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
@ -202,7 +202,7 @@ LaCrosse_Attr(@)
<code>define &lt;name&gt; LaCrosse &lt;addr&gt;</code> <br>
<br>
addr is a 2 digit hex number to identify the LaCrosse device.<br><br>
Note: devices are autocreated on reception of the first message with new battery flag set if LaCrossePair is active for the JeeLink IODevice device.<br>
Note: devices are autocreated only if LaCrossePairForSec is active for the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
</ul>
<br>
@ -219,9 +219,9 @@ LaCrosse_Attr(@)
<a name="LaCrosse_Readings"></a>
<b>Readings</b>
<ul>
<li>battery[]<b>
<li>battery[]<br>
ok or low</li>
<li>temperature[]<b>
<li>temperature[]<br>
Notice: see the filterThreshold attribute.</li>
<li>humidity</li>
</ul><br>