From cc6f458b93202b238407ba5b600fd503c594ad4d Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 13 Dec 2021 10:37:58 +0000 Subject: [PATCH] 10_ZWave.pm: better ReadingOnAck debugging (Forum #124576) git-svn-id: https://svn.fhem.de/fhem/trunk@25339 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_ZWave.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index 2eae5b0fe..e2e56dabe 100644 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -4671,8 +4671,11 @@ ZWave_callbackId($;$) $zwave_cbid = ($zwave_cbid+1) % 256; my $hx = sprintf("%02x", $zwave_cbid); $zwave_cbid2dev{$hx} = $p; - #Log 1, "CB: $cmd => $hx" if($cmd); - $zwave_cbid2cmd{$p->{NAME}." ".$hx} = $cmd if(defined($cmd)); #124576 + my $iodev = $p->{IODev}; + if($cmd && ref($iodev) eq "HASH" && $iodev->{setReadingOnAck}) { + Log3 $iodev, 5, "ReadingOnAck $p->{NAME} '$cmd' => $hx"; + $zwave_cbid2cmd{"$p->{NAME} $hx"} = $cmd; + } return $hx; } return $zwave_cbid2dev{$p}; @@ -5234,7 +5237,7 @@ ZWave_Parse($$@) if($iodev->{setReadingOnAck}) { my $ackCmd = $zwave_cbid2cmd{"$lname $callbackid"}; if($ackCmd) { - #Log 1, "ACK: $lname $msg $callbackid => $ackCmd"; + Log3 $iodev, 5, "ReadingOnAck $lname $callbackid => '$ackCmd'"; my ($type, $reading, $val) = split(" ", $ackCmd, 3); readingsBulkUpdate($lhash, $reading, $val, 1) if($type eq "set" && defined($val));