diff --git a/fhem/FHEM/00_ZWDongle.pm b/fhem/FHEM/00_ZWDongle.pm
index cc2601fe3..f643a09b3 100755
--- a/fhem/FHEM/00_ZWDongle.pm
+++ b/fhem/FHEM/00_ZWDongle.pm
@@ -26,9 +26,9 @@ sub ZWave_ProcessSendStack($);
# https://bitbucket.org/bradsjm/aeonzstickdriver
my %sets = (
"addNode" => { cmd => "4a%02x@", # ZW_ADD_NODE_TO_NETWORK'
- param => {nwOn=>0xc1, on=>0x81, off=>0x05 } },
+ param => {nwOn=>0xc1, on=>0x81, off=>0x05 } },
"removeNode" => { cmd => "4b%02x@", # ZW_REMOVE_NODE_FROM_NETWORK'
- param => {nwOn=>0xc1, on=>0x81, off=>0x05 } },
+ param => {nwOn=>0xc1, on=>0x81, off=>0x05 } },
"createNode" => { cmd => "60%02x" }, # ZW_REQUEST_NODE_INFO'
"removeFailedNode" => { cmd => "61%02x" }, # ZW_REMOVE_FAILED_NODE_ID
"replaceFailedNode"=> { cmd => "63%02x" }, # ZW_REPLACE_FAILED_NODE
@@ -294,6 +294,15 @@ ZWDongle_Set($@)
$cmd =~ s/\@/$c/g;
}
+ if($type eq "addNode") {
+ if(@a == 2 && $a[2] =~ m/^sec/i) {
+ $hash->{addSecure} = pop(@a);
+ } else {
+ delete($hash->{addSecure});
+ }
+ Log 1, "CMD:".join("/",@a)."/";
+ }
+
my @ca = split("%", $cmd, -1);
my $nargs = int(@ca)-1;
return "set $name $type needs $nargs arguments" if($nargs != int(@a));
@@ -652,9 +661,8 @@ ZWDongle_Read($@)
next;
}
$hash->{nrNAck} = 0;
- Log3 $name, 5, "ZWDongle_Read -> sending ACK";
+ Log3 $name, 5, "ZWDongle_Read $name: ACK, processing $msg";
DevIo_SimpleWrite($hash, "06", 1); # Send ACK
- Log3 $name, 5, "ZWDongle_Read $name: processing $msg";
# SEND_DATA OK: remove message from SendStack. TODO: check the callbackId
if($msg =~ m/^0013..00/ ){
@@ -669,6 +677,7 @@ ZWDongle_Read($@)
last if(defined($local) && (!defined($regexp) || ($msg =~ m/$regexp/)));
$hash->{PARTIAL} = $data; # Recursive call by ZWave get, Forum #37418
ZWDongle_Parse($hash, $name, $msg);
+
$data = $hash->{PARTIAL};
$msg = undef;
}
@@ -855,14 +864,17 @@ ZWDongle_Ready($)
Set
- - addNode [nwOn|on|off]
+ - addNode [nwOn|on|off] [sec]
Activate (or deactivate) inclusion mode. The controller (i.e. the dongle)
will accept inclusion (i.e. pairing/learning) requests only while in this
mode. After activating inclusion mode usually you have to press a switch
three times within 1.5 seconds on the node to be included into the network
of the controller. If autocreate is active, a fhem device will be created
- after inclusion. "on" activates standard inclusion. "nwOn" activates network
- wide inclusion (only SDK 4.5-4.9, SDK 6.x and above).
+ after inclusion. "on" activates standard inclusion. "nwOn" activates network
+ wide inclusion (only SDK 4.5-4.9, SDK 6.x and above).
+ If sec is specified, the ZWDongle networkKey ist set, and the device
+ supports the SECURITY class, then a secure inclusion is attempted.
+
- removeNode [nwOn|on|off]
Activate (or deactivate) exclusion mode. "on" activates standard exclusion.
diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm
index a42d895fc..8615e1871 100755
--- a/fhem/FHEM/10_ZWave.pm
+++ b/fhem/FHEM/10_ZWave.pm
@@ -195,7 +195,10 @@ my %zwave_class = (
ASSOCIATION_GRP_INFO => { id => '59' },
DEVICE_RESET_LOCALLY => { id => '5a',
parse => { "025a01" => "deviceResetLocally:yes" } },
- CENTRAL_SCENE => { id => '5b' },
+ CENTRAL_SCENE => { id => '5b',
+ parse => { "055b03..00(..)" => '"cSceneSet:".hex($1)',
+ "055b03..02(..)" => '"cSceneDim:".hex($1)',
+ "055b03..01(..)" => '"cSceneDimEnd:".hex($1)'} },
IP_ASSOCIATION => { id => '5c' },
ANTITHEFT => { id => '5d' },
ZWAVEPLUS_INFO => { id => '5e',
@@ -1584,14 +1587,17 @@ ZWave_Parse($$@)
return "" if(!$dh);
$dh->{lastMsgTimestamp} = time();
- my $classes = AttrVal($dh->{NAME}, "classes", "");
- if($classes =~ m/SECURITY/) {
- my $key = AttrVal($ioName, "networkKey", "");
- if($key) {
- $iodev->{secInitName} = $dh->{NAME};
- return ZWave_securityInit($dh);
- } else {
- Log3 $ioName, 2, "No secure inclusion as $ioName has no networkKey";
+
+ if($iodev->{addSecure}) {
+ my $classes = AttrVal($dh->{NAME}, "classes", "");
+ if($classes =~ m/SECURITY/) {
+ my $key = AttrVal($ioName, "networkKey", "");
+ if($key) {
+ $iodev->{secInitName} = $dh->{NAME};
+ return ZWave_securityInit($dh);
+ } else {
+ Log3 $ioName, 2, "No secure inclusion as $ioName has no networkKey";
+ }
}
}
return ZWave_execInits($dh, 0);
@@ -2350,6 +2356,11 @@ s2Hex($)
Class BATTERY
- battery:chargelevel %
+
Class CENTRAL_SCENE
+ - cSceneSet:X
+ - cSceneDim:X
+ - cSceneDimEnd:X
+
Class CLIMATE_CONTROL_SCHEDULE
- ccsOverride:[no|temporary|permanent],
[frost protection|energy saving|unused]