mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
30_DUOFERN: add tilted state for window contact
git-svn-id: https://svn.fhem.de/fhem/trunk@17845 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2a2076ba4a
commit
464db73ae6
@ -65,8 +65,8 @@ my %sensorMsg = (
|
|||||||
"071F" => {"name" => "endSmoke", "chan" => 5, "state" => "off"},
|
"071F" => {"name" => "endSmoke", "chan" => 5, "state" => "off"},
|
||||||
"0720" => {"name" => "startMotion", "chan" => 5, "state" => "on"},
|
"0720" => {"name" => "startMotion", "chan" => 5, "state" => "on"},
|
||||||
"0721" => {"name" => "endMotion", "chan" => 5, "state" => "off"},
|
"0721" => {"name" => "endMotion", "chan" => 5, "state" => "off"},
|
||||||
"0723" => {"name" => "opened", "chan" => 5, "state" => "on"},
|
"0723" => {"name" => "opened", "chan" => 5, "state" => "opened"},
|
||||||
"0724" => {"name" => "closed", "chan" => 5, "state" => "off"},
|
"0724" => {"name" => "closed", "chan" => 5, "state" => "closed"},
|
||||||
"0E01" => {"name" => "off", "chan" => 6, "state" => "Btn01"},
|
"0E01" => {"name" => "off", "chan" => 6, "state" => "Btn01"},
|
||||||
"0E02" => {"name" => "off", "chan" => 6, "state" => "Btn02"},
|
"0E02" => {"name" => "off", "chan" => 6, "state" => "Btn02"},
|
||||||
"0E03" => {"name" => "on", "chan" => 6, "state" => "Btn03"},
|
"0E03" => {"name" => "on", "chan" => 6, "state" => "Btn03"},
|
||||||
@ -1300,14 +1300,19 @@ DUOFERN_Parse($$)
|
|||||||
}
|
}
|
||||||
readingsSingleUpdate($hash, "channel$chan", $sensorMsg{$id}{name}, 1);
|
readingsSingleUpdate($hash, "channel$chan", $sensorMsg{$id}{name}, 1);
|
||||||
} else {
|
} else {
|
||||||
|
my @state;
|
||||||
if(($code !~ m/^(69|73).*/) || ($id =~ m/..(11|12)/)) {
|
if(($code !~ m/^(69|73).*/) || ($id =~ m/..(11|12)/)) {
|
||||||
$chan="";
|
$chan="";
|
||||||
}
|
}
|
||||||
if($code =~ m/^(65|A5|AA|AB|AC)..../) {
|
my $state = $sensorMsg{$id}{name}.$chan;
|
||||||
|
if($code =~ m/^(AC)..../ && substr($msg, 14, 2) eq "FE") {
|
||||||
|
readingsSingleUpdate($hash, "state", "tilted", 1);
|
||||||
|
$state = "tilted";
|
||||||
|
} elsif($code =~ m/^(65|A5|AA|AB|AC)..../) {
|
||||||
readingsSingleUpdate($hash, "state", $sensorMsg{$id}{state}, 1);
|
readingsSingleUpdate($hash, "state", $sensorMsg{$id}{state}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
readingsSingleUpdate($hash, "event", $sensorMsg{$id}{name}.$chan, 1);
|
readingsSingleUpdate($hash, "event", $state, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user