mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
Removed log from CUL, added HM Duplicate checking
git-svn-id: https://svn.fhem.de/fhem/trunk@766 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
759e28256d
commit
93334e823b
@ -171,7 +171,6 @@ sub
|
||||
CUL_RemoveHMPair($)
|
||||
{
|
||||
my $hash = shift;
|
||||
Log 1, "CUL_RemoveHMPair";
|
||||
delete($hash->{hmPair});
|
||||
}
|
||||
|
||||
@ -916,7 +915,6 @@ CUL_SimpleWrite(@)
|
||||
$hash->{USBDev}->write($msg . "\n") if($hash->{USBDev});
|
||||
syswrite($hash->{TCPDev}, $msg) if($hash->{TCPDev});
|
||||
|
||||
Log 1, "CUL_SimpleWrite >$msg<";
|
||||
select(undef, undef, undef, 0.001);
|
||||
}
|
||||
|
||||
|
@ -238,6 +238,7 @@ CUL_HM_Parse($$)
|
||||
my $btn = int((($button&0x3f)+1)/2);
|
||||
my $state = ($button&1 ? "off" : "on") . ($button & 0x40 ? "Long" : "");
|
||||
my $add = ($dst eq $id) ? "" : " (to $dname)";
|
||||
|
||||
push @event, "state:Btn$btn:$state$add";
|
||||
if($id eq $dst) {
|
||||
CUL_HM_SendCmd($shash, "++8002".$id.$src."0101". # Send Ack.
|
||||
@ -263,6 +264,12 @@ CUL_HM_Parse($$)
|
||||
my $tn = TimeNow();
|
||||
for(my $i = 0; $i < int(@event); $i++) {
|
||||
next if($event[$i] eq "");
|
||||
|
||||
if($shash->{lastMsgNr} && $shash->{lastMsgNr} eq $msgcnt) {
|
||||
Log GetLogLevel($name,4), "CUL_HM $name dup mesg";
|
||||
next;
|
||||
}
|
||||
|
||||
my ($vn, $vv) = split(":", $event[$i], 2);
|
||||
Log GetLogLevel($name,2), "CUL_HM $name $vn:$vv" if($vn eq "unknown");
|
||||
|
||||
@ -280,6 +287,7 @@ CUL_HM_Parse($$)
|
||||
}
|
||||
|
||||
|
||||
$shash->{lastMsgNr} = $msgcnt;
|
||||
return $name;
|
||||
}
|
||||
|
||||
@ -461,6 +469,7 @@ CUL_HM_Pair(@)
|
||||
if($isSender) {
|
||||
$hash->{pairButtons} =~ m/(..)(..)/;
|
||||
my ($b1, $b2, $cmd) = ($1, $2, "");
|
||||
delete($hash->{cmdStack});
|
||||
CUL_HM_SendCmd($hash, "++A001$id$src${b1}05$src${b1}04", 1, 1);
|
||||
CUL_HM_PushCmdStack($hash, "++A001$id$src${b1}07020201");
|
||||
CUL_HM_PushCmdStack($hash, "++A001$id$src${b1}06");
|
||||
|
Loading…
x
Reference in New Issue
Block a user