mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
10_ZWave.pm/00_ZWDongle.pm: Try to fix CAN problems (Forum #50090)
git-svn-id: https://svn.fhem.de/fhem/trunk@11007 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
97f7f181a8
commit
bc693e1355
@ -210,11 +210,13 @@ ZWCUL_cmd($$@)
|
||||
delete $hash->{addNode};
|
||||
if($cmdName eq "addNodeId") {
|
||||
$hash->{addNode} = sprintf("%02x", $a[0]);
|
||||
|
||||
} else {
|
||||
$hash->{addNode} = ZWCUL_getNextNodeId($hash) if($a[0]);
|
||||
$hash->{addSecure} = 1 if($a[0] == 2);
|
||||
}
|
||||
Log3 $hash, 3, "ZWCUL going to assigning new node id $hash->{addNode}";
|
||||
Log3 $hash, 3, "ZWCUL going to assigning new node id $hash->{addNode}"
|
||||
if($a[0]);
|
||||
ZWCUL_tmp9600($hash, $a[0] ? "zm9" : 0); # expect random homeId
|
||||
return;
|
||||
}
|
||||
@ -470,7 +472,14 @@ ZWCUL_Parse($$$$$)
|
||||
return;
|
||||
}
|
||||
|
||||
$rmsg = sprintf("0004%s%s%02x%s", $S, $S, length($P)/2, $P);
|
||||
if($P =~ m/^0101(......)(..)..(.*)/) {
|
||||
my ($nodeInfo, $type6, $classes) = ($1, $2, $3);
|
||||
$rmsg = sprintf("004a0003%s####%s##%s", $S, $2, $3);
|
||||
|
||||
} else {
|
||||
$rmsg = sprintf("0004%s%s%02x%s", $S, $S, length($P)/2, $P);
|
||||
|
||||
}
|
||||
|
||||
} else { # ACK
|
||||
if($hash->{removeNode} && $hash->{removeNode} eq $S) { #############
|
||||
|
@ -634,6 +634,9 @@ ZWDongle_Parse($$$)
|
||||
$hash->{"${name}_TIME"} = TimeNow();
|
||||
$hash->{RAWMSG} = $rmsg;
|
||||
|
||||
$hash->{SendTime} = 0 # Retry sending after a "real" msg from the dongle
|
||||
if($hash->{WaitForAck} && $rmsg !~ m/^(0113|0013)/);
|
||||
|
||||
my %addvals = (RAWMSG => $rmsg);
|
||||
|
||||
Dispatch($hash, $rmsg, \%addvals);
|
||||
|
@ -2073,7 +2073,8 @@ ZWave_mcCreateAll($$)
|
||||
my ($hash, $data) = @_;
|
||||
if(!$data) { # called by the user
|
||||
$zwave_parseHook{"$hash->{nodeIdHex}:046008...."} = \&ZWave_mcCreateAll;
|
||||
return("", "07");
|
||||
ZWave_Get($hash, $hash->{NAME}, "mcEndpoints");
|
||||
return("", "EMPTY");
|
||||
}
|
||||
$data =~ m/^046008(..)(..)/;
|
||||
my $nGrp = hex($2);
|
||||
@ -3691,7 +3692,7 @@ ZWave_Parse($$@)
|
||||
my $evt;
|
||||
|
||||
my $rawMsg = "CMD:$cmd ID:$id ARG:$arg"; # No fmt change, Forum #49165
|
||||
Log3 $ioName, 4, $rawMsg;
|
||||
Log3 $ioName, 4, $rawMsg ." CB:$callbackid";
|
||||
|
||||
if($cmd eq 'ZW_ADD_NODE_TO_NETWORK' ||
|
||||
$cmd eq 'ZW_REMOVE_NODE_FROM_NETWORK') {
|
||||
@ -3723,10 +3724,10 @@ ZWave_Parse($$@)
|
||||
|
||||
my $hash = $modules{ZWave}{defptr}{"$homeId $id"};
|
||||
if($hash) {
|
||||
if(ZWave_isWakeUp($hash)) {
|
||||
ZWave_wakeupTimer($hash, 1);
|
||||
ZWave_processSendStack($hash, "next");
|
||||
}
|
||||
#if(ZWave_isWakeUp($hash)) { # Used to Debug Forum #50090 / CAN problems
|
||||
# ZWave_wakeupTimer($hash, 1);
|
||||
# ZWave_processSendStack($hash, "next");
|
||||
#}
|
||||
|
||||
if(!$ret) {
|
||||
readingsSingleUpdate($hash, "CMD", $cmd, 1); # forum:20884
|
||||
|
Loading…
x
Reference in New Issue
Block a user