mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 10:34:52 +00:00
10_ZWave.pm: avoid incorrect events with setReadingOnAck (FOrum #124576)
git-svn-id: https://svn.fhem.de/fhem/trunk@25325 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
153c9ac127
commit
f5c80037e4
@ -1023,7 +1023,7 @@ ZWave_Cmd($$@)
|
|||||||
my ($type, $hash, @a) = @_;
|
my ($type, $hash, @a) = @_;
|
||||||
return "no $type argument specified" if(int(@a) < 2);
|
return "no $type argument specified" if(int(@a) < 2);
|
||||||
my $name = shift(@a);
|
my $name = shift(@a);
|
||||||
my $fullCmd = $type." ".join(" ",@a);
|
my $fullCmd = "$name $type ".join(" ",@a);
|
||||||
my $cmd = shift(@a);
|
my $cmd = shift(@a);
|
||||||
|
|
||||||
# Collect the commands from the distinct classes
|
# Collect the commands from the distinct classes
|
||||||
@ -3973,7 +3973,7 @@ ZWave_secAddToSendStack($$;$)
|
|||||||
my $id = $hash->{nodeIdHex};
|
my $id = $hash->{nodeIdHex};
|
||||||
my $len = sprintf("%02x", (length($cmd)-2)/2+1);
|
my $len = sprintf("%02x", (length($cmd)-2)/2+1);
|
||||||
my $cmdEf = (AttrVal($name, "noExplorerFrames", 0) == 0 ? "25" : "05");
|
my $cmdEf = (AttrVal($name, "noExplorerFrames", 0) == 0 ? "25" : "05");
|
||||||
my $data = "13$id$len$cmd$cmdEf" . ZWave_callbackId($hash, $cmdTxt);
|
my $data = "13$id$len$cmd$cmdEf" . ZWave_callbackId($hash, "$name $cmdTxt");
|
||||||
ZWave_addToSendStack($hash, "set", $data);
|
ZWave_addToSendStack($hash, "set", $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5235,9 +5235,9 @@ ZWave_Parse($$@)
|
|||||||
my $ackCmd = $zwave_cbid2cmd{$callbackid};
|
my $ackCmd = $zwave_cbid2cmd{$callbackid};
|
||||||
if($ackCmd) {
|
if($ackCmd) {
|
||||||
#Log 1, "ACK: $callbackid => $ackCmd";
|
#Log 1, "ACK: $callbackid => $ackCmd";
|
||||||
my ($type, $reading, $val) = split(" ", $ackCmd, 3);
|
my ($ackName, $type, $reading, $val) = split(" ", $ackCmd, 3);
|
||||||
readingsBulkUpdate($lhash, $reading, $val, 1)
|
readingsBulkUpdate($lhash, $reading, $val, 1) #124576
|
||||||
if($type eq "set" && defined($val));
|
if($ackName eq $lname && $type eq "set" && defined($val));
|
||||||
$name = $lname;
|
$name = $lname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user