2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

34_ESPEasy.pm: add source/target device to verbose 4 logging (Forum #71418)

git-svn-id: https://svn.fhem.de/fhem/trunk@15662 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dev0 2017-12-21 12:47:50 +00:00
parent d453e55311
commit 5e1852f679

View File

@ -760,9 +760,15 @@ sub ESPEasy_Read($) {
return;
}
my $ident = ESPEasy_isCombineDevices($peer,$espName,AttrVal($bname,"combineDevices",0))
my $cd = ESPEasy_isCombineDevices($peer,$espName,AttrVal($bname,"combineDevices",0));
my $ident = $cd
? $espName ne "" ? $espName : $peer
: $espName.($espName ne "" && $espDevName ne "" ? "_" : "").$espDevName;
Log3 $bname, 4, "$btype $name: "
. "Dispatch to: '$ident', "
. "source: '$json->{data}{ESP}{name}'/"
. "'$json->{data}{SENSOR}{0}{deviceName}' "
. "(combinedDevice: ".($cd ? "true" : "false").")";
# push internals in @values
my @values;
@ -1155,7 +1161,7 @@ sub ESPEasy_dispatch($$$@) #called by bridge -> send to logical devices
my $ac = (AttrVal($bname,"autocreate",AttrVal("global","autoload_undefined_devices",1))) ? 1 : 0;
my $msg = $ident."::".$host."::".$ac."::".$as."::".$ui."::".join("|||",@values);
Log3 $bname, 5, "$type $name: Dispatch: $msg";
# Log3 $bname, 5, "$type $name: Dispatch: $msg";
Dispatch($bhash, $msg, undef);
return undef;