2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

93_DbLog.pm: DbLog_splitFn um Uebergabe DEVICE im Parameter 2 erweitert

git-svn-id: https://svn.fhem.de/fhem/trunk@11823 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tobiasfaust 2016-07-20 08:54:33 +00:00
parent 22a2c63848
commit e23de5ea6c

View File

@ -1,3 +1,4 @@
################################################################
# $Id$
#
@ -287,12 +288,15 @@ sub DbLog_ParseEvent($$$)
my $unit;
my $dtype = $defs{$device}{TYPE};
if($modules{$dtype}{DbLog_splitFn}) {
# let the module do the job!
Log 4,"DbLog_ParseEvent calling external DbLog_splitFn for type: $dtype";
Log3 $device, 5, "DbLog_ParseEvent calling external DbLog_splitFn for type: $dtype , device: $device";
no strict "refs";
($reading,$value,$unit) =
&{$modules{$dtype}{DbLog_splitFn}}($event);
&{$modules{$dtype}{DbLog_splitFn}}($event, $device);
use strict "refs";
@result= ($reading,$value,$unit);
return @result;
@ -645,7 +649,7 @@ sub DbLog_Log($$) {
# Log is my entry, Dev is the entry of the changed device
my ($hash, $dev) = @_;
Log3 $hash,5, "Notify from Device: ".$dev->{NAME}." recieved";
Log3 $hash->{NAME}, 5, "Notify from Device: ".$dev->{NAME}." recieved";
return undef if($hash->{STATE} eq "disabled");