2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-17 17:36:01 +00:00

10_ZWave.pm: set wakeUpNoMoreInformation if the stack is empty (Forum #37418)

git-svn-id: https://svn.fhem.de/fhem/trunk@8745 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-06-14 13:14:43 +00:00
parent a44866ec6f
commit ae65f2274d

View File

@ -1751,17 +1751,24 @@ ZWave_Parse($$@)
push @event, "UNPARSED:$className $arg" if(!$matched);
}
my $wu = $baseHash->{WakeUp};
if($arg =~ m/^028407/ && $wu && @{$wu}) {
foreach my $wuCmd (@{$wu}) {
IOWrite($hash, "00", ZWave_clockAdjust($wuCmd));
Log3 $hash, 4, "Sending stored command: $wuCmd";
if($arg =~ m/^028407/) {
my $wu = $baseHash->{WakeUp};
if($wu && @{$wu}) {
foreach my $wuCmd (@{$wu}) {
IOWrite($hash, "00", ZWave_clockAdjust($wuCmd));
Log3 $hash, 4, "Sending stored command: $wuCmd";
}
@{$baseHash->{WakeUp}}=();
#send a final wakeupNoMoreInformation
my $nodeId = $baseHash->{id};
Log3 $hash, 4, "Sending wakeupNoMoreInformation to node: $nodeId";
IOWrite($hash, "00", "13${nodeId}02840805");
} else {
InternalTimer(gettimeofday()+0.1, sub($) {
my $nodeId = $hash->{id};
IOWrite($hash, "00", "13${nodeId}02840805");
}, $hash, 0);
}
@{$baseHash->{WakeUp}}=();
#send a final wakeupNoMoreInformation
my $nodeId = $baseHash->{id};
Log3 $hash, 4, "Sending wakeupNoMoreInformation to node: $nodeId";
IOWrite($hash, "00", "13${nodeId}02840805");
}
$baseHash->{lastMsgTimestamp} = time();
@ -1781,6 +1788,7 @@ ZWave_Parse($$@)
return $name;
}
#####################################
sub
ZWave_Undef($$)