mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
10_ZWave.pm: partial CENTRAL_SCENE
00_ZWDongle: addNode sec attribute git-svn-id: https://svn.fhem.de/fhem/trunk@8703 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
140703c257
commit
f065201d5d
@ -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($)
|
||||
<b>Set</b>
|
||||
<ul>
|
||||
|
||||
<li>addNode [nwOn|on|off]<br>
|
||||
<li>addNode [nwOn|on|off] [sec]<br>
|
||||
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).</li>
|
||||
after inclusion. "on" activates standard inclusion. "nwOn" activates network
|
||||
wide inclusion (only SDK 4.5-4.9, SDK 6.x and above).<br>
|
||||
If sec is specified, the ZWDongle networkKey ist set, and the device
|
||||
supports the SECURITY class, then a secure inclusion is attempted.
|
||||
</li>
|
||||
|
||||
<li>removeNode [nwOn|on|off]<br>
|
||||
Activate (or deactivate) exclusion mode. "on" activates standard exclusion.
|
||||
|
@ -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($)
|
||||
<br><br><b>Class BATTERY</b>
|
||||
<li>battery:chargelevel %</li>
|
||||
|
||||
<br><br><b>Class CENTRAL_SCENE</b>
|
||||
<li>cSceneSet:X</li>
|
||||
<li>cSceneDim:X</li>
|
||||
<li>cSceneDimEnd:X</li>
|
||||
|
||||
<br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
|
||||
<li>ccsOverride:[no|temporary|permanent],
|
||||
[frost protection|energy saving|unused]</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user