From e696e9edc56438cd979b179c5eb68acf9fc2d38d Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 13 Oct 2015 07:59:58 +0000 Subject: [PATCH] 10_ZWave.pm: addSecure fixes (Forum #40393) git-svn-id: https://svn.fhem.de/fhem/trunk@9448 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_ZWave.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index 47d21c8e1..168be9ea4 100755 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -1853,7 +1853,7 @@ ZWave_isSecureClass($$) my $cc_name = $zwave_id2class{lc($cc)}; my $sec_classes = AttrVal($name, "secure_classes", ""); - if ($sec_classes =~ m/$cc_name/) { + if (($sec_classes =~ m/$cc_name/) && ($cc_name ne 'SECURITY')){ Log3 $name, 5, "$name: $cc_name is a secured class!"; return (1); } @@ -2616,8 +2616,10 @@ ZWave_Parse($$@) my $dh = $modules{ZWave}{defptr}{"$homeId $1"}; return "" if(!$dh); + ZWave_wakeupTimer($dh, 1) if(ZWave_isWakeUp($dh)); + if($iodev->{addSecure}) { - readingsSingleUpdate($dh, "SECURITY", + readingsSingleUpdate($dh, "SECURITY", "INITIALIZING (starting secure inclusion)", 0); my $classes = AttrVal($dh->{NAME}, "classes", ""); if($classes =~ m/SECURITY/) { @@ -2647,7 +2649,7 @@ ZWave_Parse($$@) "SECURITY disabled, device does not support SECURITY command class"; } } - ZWave_wakeupTimer($dh, 1) if(ZWave_isWakeUp($dh)); + return ZWave_execInits($dh, 0); }