2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

00_ZWDongle: set routeFor (ZW_SET_PRIORITY_ROUTE) by krikan (Forum #71189)

git-svn-id: https://svn.fhem.de/fhem/trunk@14125 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-04-28 07:45:56 +00:00
parent bc318a33c6
commit 816db3e62f

View File

@ -44,6 +44,8 @@ my %sets = (
param => {onNw=>0xc1, on=>0x81, off=>0x05 } },
"reopen" => { cmd => "" },
"replaceFailedNode"=> { cmd => "63%02x@" }, # ZW_REPLACE_FAILED_NODE
"routeFor" => { cmd => "93%02x%02x%02x%02x%02x%02x" },
# ZW_SET_PRIORITY_ROUTE
"sendNIF" => { cmd => "12%02x05@" },# ZW_SEND_NODE_INFORMATION
"setNIF" => { cmd => "03%02x%02x%02x%02x" },
# SERIAL_API_APPL_NODE_INFORMATION
@ -366,6 +368,15 @@ ZWDongle_Set($@)
}
}
if($type eq "routeFor") {
for(@a = @a) {
$_ =~ s/^UNKNOWN_//;
$_ = hex($defs{$_}{nodeIdHex})
if($defs{$_} && $defs{$_}{nodeIdHex});
return "$_ is neither a device nor a decimal id" if($_ !~ m/\d+/);
}
}
my $par = $sets{$type}{param};
if($par && !$par->{noArg}) {
return "Unknown argument for $type, choose one of ".join(" ",keys %{$par})
@ -1094,9 +1105,16 @@ ZWDongle_Ready($)
Replace a non-responding node with a new one. The non-responding node
must be on the failed node list.</li>
<li>routeFor &lt;device&gt; &lt;hop1&gt; &lt;hop2&gt; &lt;hop3&gt;
&lt;hop4&gt; &lt;speed&gt;<br>
set priority routing for &ltdevice&gt. &ltdevice&gt and &lt;hopN&gt are
either device name or decimal nodeId or 0 for unused.<br>
&lt;speed&gt;: 1=9,6kbps; 2=40kbps; 3=100kbps
</li>
<li>sucNodeId &lt;decimal nodeId&gt; &lt;sucState&gt;
&lt;capabilities&gt;<br>
&lt;Configure a controller node to be a SUC/SIS or not.<br>
Configure a controller node to be a SUC/SIS or not.<br>
&lt;nodeId&gt;: decimal nodeId to be SUC/SIS<br>
&lt;sucState&gt;: 0 = deactivate; 1 = activate<br>
&lt;capabilities&gt;: 0 = basic SUC; 1 = SIS