2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 23:06:37 +00:00

10_ZWave.pm: ignoreDupMsg (Experimental, Forum #61527)

git-svn-id: https://svn.fhem.de/fhem/trunk@13223 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-01-24 19:17:24 +00:00
parent 1a78a48956
commit c5daead751

View File

@ -623,19 +623,20 @@ ZWave_Initialize($)
my @attrList = qw( my @attrList = qw(
IODev IODev
WNMI_delay WNMI_delay
noWakeupForApplicationUpdate:1,0
classes classes
do_not_notify:1,0 do_not_notify:1,0
dummy:1,0 dummy:1,0
eventForRaw
extendedAlarmReadings:0,1,2 extendedAlarmReadings:0,1,2
ignore:1,0 ignore:1,0
ignoreDupMsg:1,0
neighborListPos
noExplorerFrames:1,0 noExplorerFrames:1,0
eventForRaw noWakeupForApplicationUpdate:1,0
secure_classes secure_classes
showtime:1,0 showtime:1,0
vclasses vclasses
zwaveRoute zwaveRoute
neighborListPos
); );
use warnings 'qw'; use warnings 'qw';
$hash->{AttrList} = join(" ", @attrList)." ".$readingFnAttributes; $hash->{AttrList} = join(" ", @attrList)." ".$readingFnAttributes;
@ -4634,11 +4635,24 @@ ZWave_Parse($$@)
} }
} }
if($arg =~ m/^028407/) { # wakeup:notification if($arg =~ m/^028407/) { # wakeup:notification (WUN)
if($hash->{ignoreDupMsg} && $hash->{wakeupAlive}) { # Ignore 2nd WUN
Log3 $name, 3, "$name: ignore duplicate WUN";
return ""
}
ZWave_wakeupTimer($baseHash, 1); ZWave_wakeupTimer($baseHash, 1);
ZWave_processSendStack($baseHash, "next"); ZWave_processSendStack($baseHash, "next");
} else { } else {
if($hash->{ignoreDupMsg} && $callbackid ne "00") {
my $hp = hex($callbackid);
if($zwave_cbid2dev{$hp}) {
delete $zwave_cbid2dev{$hp};
} else {
Log3 $name, 3, "$name: ignore duplicate answer $event[0]";
return "";
}
}
ZWave_processSendStack($baseHash, "msg", $arg) ZWave_processSendStack($baseHash, "msg", $arg)
if(!ZWave_isWakeUp($hash) || $hash->{wakeupAlive}); if(!ZWave_isWakeUp($hash) || $hash->{wakeupAlive});
@ -4717,6 +4731,14 @@ ZWave_Attr(@)
InternalTimer(1, "ZWave_computeRoute", "TYPE=ZWave", 0); InternalTimer(1, "ZWave_computeRoute", "TYPE=ZWave", 0);
return undef; return undef;
} elsif($attrName eq "ignoreDupMsg") {
if($type eq "del") {
delete $hash->{ignoreDupMsg};
} else {
$hash->{ignoreDupMsg} = (defined($param) ? $param : 1);
}
return undef;
} elsif($attrName eq "vclasses") { } elsif($attrName eq "vclasses") {
if($type eq "del") { if($type eq "del") {
$hash->{".vclasses"} = {}; $hash->{".vclasses"} = {};
@ -5832,12 +5854,17 @@ s2Hex($)
</li> </li>
<li><a href="#ignore">ignore</a></li> <li><a href="#ignore">ignore</a></li>
<li><a name="ignoreDupMsg">ignoreDupMsg</a><br>
Experimental: if set (to 1), ignore duplicate wakeup messages, or
multiple responses to a single get due to missing lowlevel ACK.
</li>
<li><a href="#neighborListPos">neighborListPos</a></li> <li><a href="#neighborListPos">neighborListPos</a></li>
<li><a href="#noExplorerFrames">noExplorerFrames</a><br> <li><a name="noExplorerFrames">noExplorerFrames</a><br>
turn off the use of Explorer Frames turn off the use of Explorer Frames
</li> </li>
<li><a href="#noWakeupForApplicationUpdate">noWakeupForApplicationUpdate</a><br> <li><a name="noWakeupForApplicationUpdate">noWakeupForApplicationUpdate</a>
<br>
some devices (notable the Aeotec Multisensor 6) are only awake after an some devices (notable the Aeotec Multisensor 6) are only awake after an
APPLICATION UPDATE telegram for a very short time. If this attribute is APPLICATION UPDATE telegram for a very short time. If this attribute is
set (recommended for the Aeotec Multisensor 6), the WakeUp-Stack is not set (recommended for the Aeotec Multisensor 6), the WakeUp-Stack is not