From 816db3e62f0d76fe0da48d65ea40e912dac82a32 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 28 Apr 2017 07:45:56 +0000 Subject: [PATCH] 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 --- fhem/FHEM/00_ZWDongle.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/00_ZWDongle.pm b/fhem/FHEM/00_ZWDongle.pm index e355379bc..2ae79de3d 100755 --- a/fhem/FHEM/00_ZWDongle.pm +++ b/fhem/FHEM/00_ZWDongle.pm @@ -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. +