2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

00_ZWDongle.pm: no resend exception fo ZW_SEND_DATA (Forum #37418)

10_ZWDongle.pm: activate callbackid for get


git-svn-id: https://svn.fhem.de/fhem/trunk@8930 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-07-10 13:29:54 +00:00
parent cb108c9d4e
commit 454b088089
2 changed files with 2 additions and 23 deletions

View File

@ -509,11 +509,6 @@ ZWDongle_Write($$$)
{
my ($hash,$fn,$msg) = @_;
if($fn !~ m/^[0-9A-F]+$/i) { # ACK initiated from ZWDongle
ZWDongle_shiftSendStack($hash, 5, $fn);
return;
}
Log3 $hash, 5, "ZWDongle_Write $fn $msg";
# assemble complete message
$msg = "$fn$msg";
@ -630,14 +625,7 @@ ZWDongle_Read($@)
my $fb = substr($data, 0, 2);
if($fb eq "06") { # ACK
# ZWDongle messages are removed upon first ACK.
# Other network messages are removed if ZW_SEND_DATA:OK is received
my $sst = $hash->{SendStack}->[0];
if($sst && $sst !~ m/^01....13/) {
ZWDongle_shiftSendStack($hash, 5, "ACK received");
}
ZWDongle_shiftSendStack($hash, 5, "ACK received");
$data = substr($data, 2);
next;
}
@ -693,15 +681,6 @@ ZWDongle_Read($@)
Log3 $name, 4, "ZWDongle_Read $name: sending ACK, processing $msg";
DevIo_SimpleWrite($hash, "06", 1); # Send ACK
# SEND_DATA answer: remove message from SendStack. TODO: check callbackId
if($msg =~ m/^0013..(..)/ || $msg =~ m/^0113(..)/ ){
my $m = $1;
my %msg = ('00'=>'OK', '01'=>'NO_ACK', '02'=>'FAIL',
'03'=>'NOT_IDLE', '04'=>'NOROUTE' );
$m = $msg{$m} ? $msg{$m} : "UNKNOWN $m";
ZWDongle_shiftSendStack($hash, 5, "ZW_SEND_DATA:$m received");
}
last if(defined($local) && (!defined($regexp) || ($msg =~ m/$regexp/)));
$hash->{PARTIAL} = $data; # Recursive call by ZWave get, Forum #37418
ZWDongle_Parse($hash, $name, $msg) if($init_done);

View File

@ -634,7 +634,7 @@ ZWave_Cmd($$@)
}
} else {
$data .= $id if($type eq "set"); # callback=>id
$data .= $id; # callback=>id
}
IOWrite($hash, "00", $data);