mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
threeStateSensor changes by Peterp
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1075 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dd9e9e09cd
commit
95e74cb29a
@ -557,13 +557,22 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
} elsif($st eq "threeStateSensor") { #####################################
|
} elsif($st eq "threeStateSensor") { #####################################
|
||||||
|
|
||||||
push @event, "cover:closed" if($p =~ m/^0601..00$/);
|
|
||||||
push @event, "cover:open" if($p =~ m/^0601..0E$/);
|
|
||||||
push @event, "state:alive" if($p =~ m/^0601000E$/);
|
|
||||||
|
|
||||||
$p =~ m/^....(..)$/;
|
$p =~ m/^....(..)$/;
|
||||||
my $lst = defined($1) ? $1 : "00";
|
my $lst = defined($1) ? $1 : "00";
|
||||||
|
|
||||||
|
if($p =~ m/^0601000E$/) {
|
||||||
|
push @event, "state:alive";
|
||||||
|
|
||||||
|
} elsif($p =~ m/^0601..00$/) {
|
||||||
|
push @event, "cover:closed";
|
||||||
|
push @event, "state:alive";
|
||||||
|
|
||||||
|
} elsif($p =~ m/^0601..0E$/) {
|
||||||
|
push @event, "cover:open";
|
||||||
|
push @event, "state:sabotage";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
my %txt;
|
my %txt;
|
||||||
%txt = ("C8"=>"open", "64"=>"tilted", "00"=>"closed");
|
%txt = ("C8"=>"open", "64"=>"tilted", "00"=>"closed");
|
||||||
%txt = ("C8"=>"wet", "64"=>"damp", "00"=>"dry") # by peterp
|
%txt = ("C8"=>"wet", "64"=>"damp", "00"=>"dry") # by peterp
|
||||||
@ -577,6 +586,8 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CUL_HM_SendCmd($shash, "++8002".$id.$src."0101".$lst."00",1,0) # Send Ack
|
CUL_HM_SendCmd($shash, "++8002".$id.$src."0101".$lst."00",1,0) # Send Ack
|
||||||
if($id eq $dst);
|
if($id eq $dst);
|
||||||
push @event, "unknownMsg:$p" if(!@event);
|
push @event, "unknownMsg:$p" if(!@event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user