From 892c6a759e04431ae63a29ae4dbfe4889e1541e9 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Sat, 21 Nov 2015 18:48:03 +0000 Subject: [PATCH] 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 --- fhem/FHEM/36_JeeLink.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/36_JeeLink.pm b/fhem/FHEM/36_JeeLink.pm index c0a0f8ccc..178e35d92 100644 --- a/fhem/FHEM/36_JeeLink.pm +++ b/fhem/FHEM/36_JeeLink.pm @@ -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 " 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($@) {
  • flashCommand
    See "Set flash"
  • - +
  • timeout
    format: <timeout, checkInterval> Checks every 'checkInterval' seconds if the last data reception is longer than 'timout' seconds ago.
    If this is the case, a reset is done for the IO-Device.

  • - +