10_ZWave.pm: set wakeUpNoMoreInformation if the stack is empty (Forum #37418)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8745 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -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($$)
|
||||
|
||||
Reference in New Issue
Block a user