mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
30_DUOFERN: fix simultaneously events from weather sensor
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12089 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1c5545e898
commit
db38d1dc8f
@ -1217,15 +1217,19 @@ DUOFERN_Parse($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $chan = substr($msg, $sensorMsg{$id}{chan}*2 + 2 , 2);
|
my $chan = substr($msg, $sensorMsg{$id}{chan}*2 + 2 , 2);
|
||||||
|
my @chans;
|
||||||
if ($sensorMsg{$id}{chan} == 5) {
|
if ($sensorMsg{$id}{chan} == 5) {
|
||||||
for(my $x=0; $x<5; $x++) {
|
for(my $x=0; $x<5; $x++) {
|
||||||
if((0x01<<$x) & hex($chan)) {
|
if((0x01<<$x) & hex($chan)) {
|
||||||
$chan = $x+1;
|
push(@chans, $x+1);
|
||||||
last;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
push(@chans, $chan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (@chans) {
|
||||||
|
$chan = $_;
|
||||||
if($id =~ m/..(1A|18|19|01|02|03)/) {
|
if($id =~ m/..(1A|18|19|01|02|03)/) {
|
||||||
if(($id =~ m/..1A/) || ($id =~ m/0E../) || ($code =~ m/^(A0|A2)..../)) {
|
if(($id =~ m/..1A/) || ($id =~ m/0E../) || ($code =~ m/^(A0|A2)..../)) {
|
||||||
readingsSingleUpdate($hash, "state", $sensorMsg{$id}{state}.".".$chan, 1);
|
readingsSingleUpdate($hash, "state", $sensorMsg{$id}{state}.".".$chan, 1);
|
||||||
@ -1248,9 +1252,11 @@ DUOFERN_Parse($$)
|
|||||||
if($code =~ m/^(A5|AA|AB)..../) {
|
if($code =~ m/^(A5|AA|AB)..../) {
|
||||||
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", $sensorMsg{$id}{name}.$chan, 1);
|
||||||
DoTrigger($hash->{NAME},$sensorMsg{$id}{name}.$chan);
|
DoTrigger($hash->{NAME},$sensorMsg{$id}{name}.$chan);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#Umweltsensor Wetter
|
#Umweltsensor Wetter
|
||||||
} elsif ($msg =~ m/0F011322.{36}/) {
|
} elsif ($msg =~ m/0F011322.{36}/) {
|
||||||
@ -1497,6 +1503,8 @@ DUOFERN_StatusTimeout($)
|
|||||||
1;
|
1;
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item summary controls Rademacher DuoFern devices
|
||||||
|
=item summary_DE steuert Rademacher DuoFern Geräte
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="DUOFERN"></a>
|
<a name="DUOFERN"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user