mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-25 09:49:20 +00:00
10_ZWave.pm/00_ZWDongle.pm: removeFailedNode patch (Forum #32823)
git-svn-id: https://svn.fhem.de/fhem/trunk@9313 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5f25603e93
commit
91e5c94539
@ -30,7 +30,7 @@ my %sets = (
|
||||
"removeNode" => { cmd => "4b%02x@", # ZW_REMOVE_NODE_FROM_NETWORK'
|
||||
param => {nwOn=>0xc1, on=>0x81, off=>0x05 } },
|
||||
"createNode" => { cmd => "60%02x" }, # ZW_REQUEST_NODE_INFO'
|
||||
"removeFailedNode" => { cmd => "61%02x" }, # ZW_REMOVE_FAILED_NODE_ID
|
||||
"removeFailedNode" => { cmd => "61%02x@" }, # ZW_REMOVE_FAILED_NODE_ID
|
||||
"replaceFailedNode"=> { cmd => "63%02x" }, # ZW_REPLACE_FAILED_NODE
|
||||
"neighborUpdate" => { cmd => "48%02x" }, # ZW_REQUEST_NODE_NEIGHBOR_UPDATE
|
||||
"sendNIF" => { cmd => "12%02x05@" },# ZW_SEND_NODE_INFORMATION
|
||||
@ -443,6 +443,9 @@ ZWDongle_Get($@)
|
||||
return "$name: Cannot generate" if($ret !~ m/^011c01(..)(.*)$/);
|
||||
$msg = $2; @a = ();
|
||||
|
||||
} elsif($type eq "isFailedNode") { ############################
|
||||
$msg = ($r[2]==1)?"yes":"no";
|
||||
|
||||
}
|
||||
|
||||
$type .= "_".join("_", @a) if(@a);
|
||||
@ -878,6 +881,11 @@ ZWDongle_Ready($)
|
||||
update process. To read node's neighbor list see neighborList get
|
||||
below.</li>
|
||||
|
||||
<li>removeFailedNode<br>
|
||||
Remove a non-responding node that must be on the failed Node list from
|
||||
the node list in controller. Instead, always use removeNode if possible.
|
||||
Note: the corresponding fhem device have to be deleted manually.</li>
|
||||
|
||||
<li>reopen<br>
|
||||
First close and then open the device. Used for debugging purposes.
|
||||
</li>
|
||||
@ -895,6 +903,9 @@ ZWDongle_Ready($)
|
||||
<li>homeId<br>
|
||||
return the six hex-digit homeId of the controller.</li>
|
||||
|
||||
<li>isFailedNode<br>
|
||||
return if a node is stored in the failed node List.</li>
|
||||
|
||||
<li>caps, ctrlCaps, version<br>
|
||||
return different controller specific information. Needed by developers
|
||||
only. </li>
|
||||
@ -941,6 +952,11 @@ ZWDongle_Ready($)
|
||||
<ul>
|
||||
<li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|controller|done|failed]
|
||||
</li>
|
||||
<li>ZW_REMOVE_FAILED_NODE_ID
|
||||
[notPrimaryController|noCallbackFunction|failedNodeNotFound|
|
||||
failedNodeProcessBusy|failedNodeRemoveFail|nodeOk|nodeRemoved|
|
||||
nodeNotRemoved]
|
||||
</li>
|
||||
<li>ZW_REMOVE_NODE_FROM_NETWORK
|
||||
[learnReady|nodeFound|slave|controller|done|failed]
|
||||
</li>
|
||||
|
@ -2523,6 +2523,27 @@ ZWave_Parse($$@)
|
||||
Log3 $ioName, 2, "SERIAL_API_SET_TIMEOUTS: ACK:$1 BYTES:$2";
|
||||
return "";
|
||||
}
|
||||
if($cmd eq "ZW_REMOVE_FAILED_NODE_ID") {
|
||||
my $retval;
|
||||
if ($arg eq "00") {
|
||||
$retval = 'failedNodeRemoveStarted';
|
||||
} elsif ($arg eq "02") {
|
||||
$retval = 'notPrimaryController';
|
||||
} elsif ($arg eq "04") {
|
||||
$retval = 'noCallbackFunction';
|
||||
} elsif ($arg eq "08") {
|
||||
$retval = 'failedNodeNotFound';
|
||||
} elsif ($arg eq "10") {
|
||||
$retval = 'failedNodeRemoveProcessBusy';
|
||||
} elsif ($arg eq "20") {
|
||||
$retval = 'failedNodeRemoveFail';
|
||||
} else {
|
||||
$retval = 'unknown_'.$arg; # should never happen
|
||||
}
|
||||
DoTrigger($ioName, "$cmd $retval");
|
||||
return "";
|
||||
}
|
||||
|
||||
Log3 $ioName, 4, "$ioName unhandled ANSWER: $cmd $arg";
|
||||
return "";
|
||||
}
|
||||
@ -2643,6 +2664,17 @@ ZWave_Parse($$@)
|
||||
$evt = 'unknown'; # should never happen
|
||||
}
|
||||
|
||||
} elsif($cmd eq "ZW_REMOVE_FAILED_NODE_ID") {
|
||||
if ($id eq "00") {
|
||||
$evt = 'nodeOk';
|
||||
} elsif ($id eq "01") {
|
||||
$evt = 'failedNodeRemoved';
|
||||
} elsif ($id eq "02") {
|
||||
$evt = 'failedNodeNotRemoved';
|
||||
} else {
|
||||
$evt = 'unknown_'.$id; # should never happen
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($evt) {
|
||||
@ -3187,7 +3219,7 @@ s2Hex($)
|
||||
</li>
|
||||
|
||||
<br><br><b>Class COLOR_CONTROL</b>
|
||||
<li>ccCapabilities<br>
|
||||
<li>ccCapability<br>
|
||||
return capabilities.</li>
|
||||
<li>ccStatus channelId<br>
|
||||
return status of channel ChannelId.
|
||||
@ -3470,7 +3502,7 @@ s2Hex($)
|
||||
<li>clock:[mon|tue|wed|thu|fri|sat|sun] HH:MM</li>
|
||||
|
||||
<br><br><b>Class COLOR_CONTROL</b>
|
||||
<li>ccCapabilities:XY</li>
|
||||
<li>ccCapability:XY</li>
|
||||
<li>ccStatus_X:Y</li>
|
||||
|
||||
<br><br><b>Class CONFIGURATION</b>
|
||||
|
Loading…
x
Reference in New Issue
Block a user