mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
10_ZWave.pm: better ReadingOnAck debugging (Forum #124576)
git-svn-id: https://svn.fhem.de/fhem/trunk@25339 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5a91458acb
commit
cc6f458b93
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user