From 21a9820d2ff046e8e905a3272ecd9ae94a621543 Mon Sep 17 00:00:00 2001 From: oskarfessel <> Date: Sat, 14 Apr 2012 18:20:21 +0000 Subject: [PATCH] Homematic Schliesser-Kontakt Status Update wegen Sabotage git-svn-id: https://svn.fhem.de/fhem/trunk@1452 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 50 ++++++++++++++++----------------------- fhem/docs/commandref.html | 3 +-- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 0e891d41a..c7d99072d 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -667,41 +667,33 @@ CUL_HM_Parse($$) my $lst = defined($1) ? $1 : "00"; my $chn = "01"; - if($p =~ m/^0601000E$/) { + if($p =~ m/^0601..00$/) { push @event, "alive:yes"; - } elsif($p =~ m/^0601..00$/) { - push @event, "cover:closed"; - push @event, "alive:yes"; + } + # Multi-channel device: Switch to the shadow source hash + # for the HM-SCI-3-FM + $chn = $1 if($p =~ m/^(..)(..)/); + if($chn && $chn ne "01" && $chn ne "00") { + my $sshash = $modules{CUL_HM}{defptr}{"$src$chn"}; + $shash = $sshash if($sshash); + $name = $shash->{NAME}; + } - } elsif($p =~ m/^0601..0E$/) { - push @event, "cover:open"; - push @event, "state:sabotage"; + my %txt; + %txt = ("C8"=>"open", "64"=>"tilted", "00"=>"closed"); + %txt = ("C8"=>"wet", "64"=>"damp", "00"=>"dry") # by peterp + if($model eq "HM-SEC-WDS"); + + if($txt{$lst}) { + push @event, "state:$txt{$lst}$target"; } else { + $lst = "00"; # for the ack + } - # Multi-channel device: Switch to the shadow source hash - # for the HM-SCI-3-FM - $chn = $1 if($p =~ m/^(..)(..)/); - if($chn && $chn ne "01" && $chn ne "00") { - my $sshash = $modules{CUL_HM}{defptr}{"$src$chn"}; - $shash = $sshash if($sshash); - $name = $shash->{NAME}; - } - - my %txt; - %txt = ("C8"=>"open", "64"=>"tilted", "00"=>"closed"); - %txt = ("C8"=>"wet", "64"=>"damp", "00"=>"dry") # by peterp - if($model eq "HM-SEC-WDS"); - - if($txt{$lst}) { - push @event, "state:$txt{$lst}$target"; - - } else { - $lst = "00"; # for the ack - - } - + if($p =~ m/^0601..0E$/) { + push @event, "state:sabotage"; } CUL_HM_SendCmd($shash, "++8002$id$src${chn}01${lst}00",1,0) # Send Ack diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 7513f6912..dfefd9b5d 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -3105,8 +3105,7 @@ A line ending with \ will be concatenated with the next one, so long lines alive
test $t
  • threeStateSensor (all)
    - cover closed
    - cover open
    + sabotage
    alive
  • threeStateSensor (HM-SEC-WDS)
    contact wet