From d10fc25929896aed3970cf8049c45a89387fff1f Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Fri, 12 Apr 2013 21:27:22 +0000 Subject: [PATCH] HMLAN issue nachtrag git-svn-id: https://svn.fhem.de/fhem/trunk@3066 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_HMLAN.pm | 8 ++++---- fhem/FHEM/10_CUL_HM.pm | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/00_HMLAN.pm b/fhem/FHEM/00_HMLAN.pm index 015e33808..81d04a9b6 100755 --- a/fhem/FHEM/00_HMLAN.pm +++ b/fhem/FHEM/00_HMLAN.pm @@ -15,7 +15,7 @@ sub HMLAN_secSince2000(); sub HMLAN_SimpleWrite(@); -my $debug = 0; # set 1 for better log readability +my $debug = 1; # set 1 for better log readability my %sets = ( "hmPairForSec" => "HomeMatic", "hmPairSerial" => "HomeMatic", @@ -276,7 +276,7 @@ sub HMLAN_Parse($$) {########################################################## # 00 21= (seen with 'R') # 00 30= # 00 41= (seen with 'R') - # 00 50= (seen with 'E') + # 00 50= (seen with 'R') # 00 81= open # 01 xx= (seen with 'E') # 02 xx= prestate to 04xx. @@ -293,7 +293,7 @@ sub HMLAN_Parse($$) {########################################################## Log $ll5, "HMLAN_Parse: $name discard" if($stat & 0x000A); return ;# message with no ack is send - do not dispatch } - if ($mFld[1] !~ m/00(01|02|21|41)/ && $letter eq 'R'){ + if ($mFld[1] !~ m/00(01|02|21|41|50)/ && $letter eq 'R'){ Log $ll5, "HMLAN_Parse: $name discard, NACK state:".$mFld[1]; return; } @@ -301,7 +301,7 @@ sub HMLAN_Parse($$) {########################################################## # HMLAN sends ACK for flag 'A0' but not for 'A4'(config mode)- # we ack ourself an long as logic is uncertain - also possible is 'A6' for RHS - if (hex($flg)&0x2){#General 4 oder 2 ? + if (hex($flg)&0x4){#General 4 oder 2 ? $hash->{helper}{nextSend}{$src} = gettimeofday() + 0.100; } if (hex($flg)&0xA4 == 0xA4 && $hash->{owner} eq $dst){ diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 1d7ef3e85..bc9855d6c 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -2783,7 +2783,7 @@ sub CUL_HM_eventP($$) {#handle protocol events sub CUL_HM_protState($$){ my ($hash,$state) = @_; $hash->{protState} = $state; - delete $hash->{helper}{burstEvtCnt} if ($state =~ m/^CMDs_done/); + #delete $hash->{helper}{burstEvtCnt} if ($state =~ m/^CMDs_done/); readingsSingleUpdate($hash,"state",$state,1)if (!$hash->{helper}{role}{chn}); DoTrigger($hash->{NAME}, undef) if ($state eq "CMDs_done"); } @@ -2817,7 +2817,7 @@ sub CUL_HM_respPendTout($) { delete($hash->{cmdStack}); delete($hash->{protCmdPend}); CUL_HM_protState($hash,"CMDs_done".($hash->{helper}{burstEvtCnt}? - ("_events:".$hash->{helper}{burstEvtCnt}):"")); + ("_events:".$hash->{helper}{burstEvtCnt}):"")); } CUL_HM_respPendRm($hash); CUL_HM_ProcessCmdStack($hash); # continue processing commands