2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

Added maxPairForSeconds to fundamentally allow MAX! pairing

git-svn-id: https://svn.fhem.de/fhem/trunk@2098 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
gmaniac 2012-11-08 20:52:04 +00:00
parent c770bd1abe
commit 6ea70d394e

View File

@ -31,6 +31,7 @@ my %gets = ( # Name, Data to send to the CUL, Regexp for the answer
my %sets = (
"hmPairForSec" => "HomeMatic",
"hmPairSerial" => "HomeMatic",
"maxPairForSec" => "MAX",
"raw" => "",
"freq" => "SlowRF",
"bWidth" => "SlowRF",
@ -207,6 +208,13 @@ CUL_RemoveHMPair($)
delete($hash->{hmPair});
}
sub
CUL_RemoveMAXPair($)
{
my $hash = shift;
delete($hash->{maxPair});
}
#####################################
sub
@ -242,6 +250,11 @@ CUL_Set($@)
$hash->{HM_CMDNR}, $id, unpack('H*', $arg)));
$hash->{hmPairSerial} = $arg;
} elsif($type eq "maxPairForSec") { ####################################
return "Usage: set $name maxPairForSec <seconds_active>"
if(!$arg || $arg !~ m/^\d+$/);
$hash->{maxPair} = 1;
InternalTimer(gettimeofday()+$arg, "CUL_RemoveMAXPair", $hash, 1);
} elsif($type eq "freq") { ######################################## MHz
@ -1136,7 +1149,7 @@ CUL_Attr(@)
<a name="hmPairForSec"></a>
<li>hmPairForSec<br>
<a href="#rfmode">HomeMatic</a> mode only.<br>
Set the CUL in Pairing-Mode for the given seconds. Any device set into
Set the CUL in Pairing-Mode for the given seconds. Any HM device set into
pairing mode in this time will be paired with fhem.
</li><br>
<a name="hmPairSerial"></a>
@ -1147,6 +1160,12 @@ CUL_Attr(@)
the backside of the device. It is not necessary to put the given device
in learning mode if it is a receiver.
</li><br>
<a name="hmPairForSec"></a>
<li>maxPairForSec<br>
<a href="#rfmode">MAX</a> mode only.<br>
Set the CUL in Pairing-Mode for the given seconds. Any MAX device set into
pairing mode in this time will be paired with fhem.
</li><br>
<li>led<br>
Set the CUL led off (00), on (01) or blinking (02).
</li><br>