From 40788d4cf6c31a7e5854480f607991c601e27c7b Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 30 Mar 2016 08:22:52 +0000 Subject: [PATCH] 10_ZWave.pm: decode ZW_APPLICATION_UPDATE failed (Forum #51520) git-svn-id: https://svn.fhem.de/fhem/trunk@11152 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_ZWave.pm | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index 678d924af..cdb38823a 100755 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -3749,25 +3749,33 @@ ZWave_Parse($$@) return ZWave_execInits($dh, 0); } - } elsif($cmd eq "ZW_APPLICATION_UPDATE" && $arg =~ m/....(..)..(.*)$/) { - my ($type6,$classes) = ($1, $2); - my $ret = ZWave_SetClasses($homeId, $id, $type6, $classes); + } elsif($cmd eq "ZW_APPLICATION_UPDATE") { + if($arg =~ m/....(..)..(.*)$/) { + my ($type6,$classes) = ($1, $2); + my $ret = ZWave_SetClasses($homeId, $id, $type6, $classes); - my $hash = $modules{ZWave}{defptr}{"$homeId $id"}; - if($hash) { - if(!AttrVal($hash->{NAME}, "noWakeupForApplicationUpdate", 0)) { # 50090 - if(ZWave_isWakeUp($hash)) { - ZWave_wakeupTimer($hash, 1); - ZWave_processSendStack($hash, "next"); + my $hash = $modules{ZWave}{defptr}{"$homeId $id"}; + if($hash) { + if(!AttrVal($hash->{NAME}, "noWakeupForApplicationUpdate", 0)) { # 50090 + if(ZWave_isWakeUp($hash)) { + ZWave_wakeupTimer($hash, 1); + ZWave_processSendStack($hash, "next"); + } + } + + if(!$ret) { + readingsSingleUpdate($hash, "CMD", $cmd, 1); # forum:20884 + return $hash->{NAME}; } } + return $ret; + + } else { + Log3 $ioName, 2, "ZW_REQUEST_NODE_INFO ". + ($callbackid eq "81" ? "failed" : "unknown $calbackid"); + return ""; - if(!$ret) { - readingsSingleUpdate($hash, "CMD", $cmd, 1); # forum:20884 - return $hash->{NAME}; - } } - return $ret; } elsif($cmd eq "ZW_SEND_DATA") { # 0013cb00.... my $hash = ZWave_callbackId($callbackid);