From f505f35350f8d83b6fa93b0c7a06aa3e9f423f99 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 14 Jun 2015 18:26:34 +0000 Subject: [PATCH] 00_ZWDongle.pm: another wakup change (Forum #37418) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8750 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_ZWDongle.pm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/FHEM/00_ZWDongle.pm b/FHEM/00_ZWDongle.pm index 1bd579441..d63e5884b 100755 --- a/FHEM/00_ZWDongle.pm +++ b/FHEM/00_ZWDongle.pm @@ -511,22 +511,23 @@ ZWDongle_Write($$$) # push message on stack my $ss = $hash->{SendStack}; + + my $wNMIre = '01....13..028408'; + if(@{$ss} && $ss->[0] =~ m/$wNMIre/) { + Log3 $hash, 2, + "ZWDongle_Write: command after wakeupNoMoreInformation dropped"; + return; + } + push @{$ss}, $msg; # assure that wakeupNoMoreInformation is the last message on the sendStack if($msg =~ m/^01....13(..)/) { - my $wNMIre = '01....13..028408'; - - if($ss->[0] =~ m/$wNMIre/) { - Log3 $hash, 2, - "ZWDongle_Write: command after wakeupNoMoreInformation dropped"; - return; - } - my $wNMI; my @s = grep { /^$wNMIre/ ? ($wNMI=$_,0):1 } @{$ss}; if($wNMI) { - Log3 $hash, 5, "ZWDongle_Write wakeupNoMoreInformation moved to the end"; + Log3 $hash, 5, "ZWDongle_Write wakeupNoMoreInformation moved to the end" + if($wNMI ne $msg); push @s, $wNMI; $hash->{SendStack} = \@s; }