mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 19:32:42 +00:00
36_JeeLink.pm: added initMessages (forum: http://forum.fhem.de/index.php/topic,44092.msg362677.html#msg362677)
git-svn-id: https://svn.fhem.de/fhem/trunk@9956 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
899f3ff26c
commit
892c6a759e
@ -30,7 +30,6 @@ my %matchListPCA301 = (
|
||||
"5:AliRF" => "^\\S+\\s+5 ",
|
||||
"6:EMT7110" => "^OK\\sEMT7110\\s",
|
||||
"7:KeyValueProtocol" => "^OK\\sVALUES\\s",
|
||||
"77:KeyValueProtocol" => "^OK\\sDICTIONARY\\s",
|
||||
);
|
||||
|
||||
my %matchListJeeLink433 = (
|
||||
@ -662,8 +661,14 @@ JeeLink_Parse($$$$)
|
||||
return if($dmsg =~ m/^ / ); # ignore startup messages
|
||||
return if($dmsg =~ m/^-> ack/ ); # ignore send ack
|
||||
|
||||
if( $dmsg =~ /^INIT / ) {
|
||||
$hash->{initMessages} .= "\n" if( $hash->{initMessages} );
|
||||
$hash->{initMessages} .= $dmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
if($dmsg =~ m/^\[/ ) {
|
||||
$hash->{model} = $dmsg;
|
||||
$hash->{model} = $dmsg;
|
||||
|
||||
if( $hash->{STATE} eq "Opened" ) {
|
||||
if( my $initCommandsString = AttrVal($name, "initCommands", undef) ) {
|
||||
@ -698,6 +703,7 @@ JeeLink_Parse($$$$)
|
||||
}
|
||||
|
||||
$hash->{STATE} = "Initialized";
|
||||
$hash->{initMessages} = '';
|
||||
}
|
||||
|
||||
return;
|
||||
@ -889,7 +895,7 @@ JeeLink_Attr(@)
|
||||
if( $aName eq "Clients" ) {
|
||||
$hash->{Clients} = $aVal;
|
||||
$hash->{Clients} = $clientsJeeLink if( !$hash->{Clients}) ;
|
||||
|
||||
|
||||
} elsif( $aName eq "timeout" ) {
|
||||
return "Usage: attr $name $aName <timeout,checkInterval>" if($aVal && $aVal !~ m/^[0-9]{1,6},[0-9]{1,6}$/);
|
||||
|
||||
@ -900,7 +906,7 @@ JeeLink_Attr(@)
|
||||
my ($timeout, $interval) = split(',', $aVal);
|
||||
InternalTimer(gettimeofday()+$interval, "JeeLink_OnTimer", $timerName, 0);
|
||||
}
|
||||
|
||||
|
||||
} elsif( $aName eq "MatchList" ) {
|
||||
my $match_list;
|
||||
if( $cmd eq "set" ) {
|
||||
@ -1117,13 +1123,13 @@ sub JeeLink_getIndexOfArray($@) {
|
||||
<li>flashCommand<br>
|
||||
See "Set flash"
|
||||
</li>
|
||||
|
||||
|
||||
<li>timeout<br>
|
||||
format: <timeout, checkInterval>
|
||||
Checks every 'checkInterval' seconds if the last data reception is longer than 'timout' seconds ago.<br>
|
||||
If this is the case, a reset is done for the IO-Device.
|
||||
</li><br>
|
||||
|
||||
|
||||
</ul>
|
||||
<br>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user