Log3 changes

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3784 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig 2013-08-24 19:04:30 +00:00
parent 68355e58db
commit 605960e964

View File

@ -171,7 +171,7 @@ TRX_Get($@)
my $reading= $a[1]; my $reading= $a[1];
$msg="$name => No Get function ($reading) implemented"; $msg="$name => No Get function ($reading) implemented";
Log3 $name, 1,$msg if ($reading ne "?"); Log3 $name, 1, $msg if ($reading ne "?");
return $msg; return $msg;
} }
@ -364,20 +364,20 @@ TRX_Parse($$$$)
{ {
my ($hash, $iohash, $name, $rmsg) = @_; my ($hash, $iohash, $name, $rmsg) = @_;
Log3 $name, 5, "TRX_Parse1 '$rmsg'"; #Log3 $hash, 5, "TRX_Parse() '$rmsg'";
my %addvals; my %addvals;
# Parse only if message is different within 2 seconds # Parse only if message is different within 2 seconds
# (some Oregon sensors always sends the message twice, X10 security sensors even sends the message five times) # (some Oregon sensors always sends the message twice, X10 security sensors even sends the message five times)
if (("$last_rmsg" ne "$rmsg") || (time() - $last_time) > 1) { if (("$last_rmsg" ne "$rmsg") || (time() - $last_time) > 1) {
Log3 $name, 1, "TRX_Dispatch '$rmsg'"; Log3 $hash, 5, "TRX_Parse() '$rmsg'";
%addvals = (RAWMSG => $rmsg); %addvals = (RAWMSG => $rmsg);
Dispatch($hash, $rmsg, \%addvals); Dispatch($hash, $rmsg, \%addvals);
$hash->{"${name}_MSGCNT"}++; $hash->{"${name}_MSGCNT"}++;
$hash->{"${name}_TIME"} = TimeNow(); $hash->{"${name}_TIME"} = TimeNow();
$hash->{RAWMSG} = $rmsg; $hash->{RAWMSG} = $rmsg;
} else { } else {
Log3 $name, 1, "TRX_Dispatch '$rmsg' dup"; Log3 $hash, 5, "TRX_Parse() '$rmsg' dup";
} }
$last_rmsg = $rmsg; $last_rmsg = $rmsg;