From b92bea50cbe6d08d82a7bd42d58af06be3241403 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Tue, 10 Mar 2015 22:34:23 +0000 Subject: [PATCH] PRESENCE: optimize logging for local-bluetooth mode (Forum: #34368) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8191 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/73_PRESENCE.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/FHEM/73_PRESENCE.pm b/FHEM/73_PRESENCE.pm index b22cd9d33..81aff7683 100755 --- a/FHEM/73_PRESENCE.pm +++ b/FHEM/73_PRESENCE.pm @@ -755,7 +755,7 @@ PRESENCE_DoLocalBluetoothScan($) { my ($string) = @_; my ($name, $device, $local) = split("\\|", $string); - my $hcitool = qx(which hcitool); + my $devname; my $return; my $wait = 1; @@ -764,16 +764,18 @@ PRESENCE_DoLocalBluetoothScan($) if(qx(ps --help 2>&1) =~ /BusyBox/g) { - Log3 $name, 5, "PRESENCE ($name): found busybox variant of ps command, using \"w\" as parameter"; + Log3 $name, 5, "PRESENCE ($name) - found busybox variant of ps command, using \"w\" as parameter"; $psargs = "w"; } else { - Log3 $name, 5, "PRESENCE ($name): found standard variant of ps command, using \"ax\" as parameter"; + Log3 $name, 5, "PRESENCE ($name) - found standard variant of ps command, using \"ax\" as parameter"; $psargs = "ax"; } - - Log3 $name, 4, "PRESENCE ($name): 'which hcitool' returns: $hcitool"; + + Log3 $name, 4, "PRESENCE ($name) - executing: which hcitool"; + my $hcitool = qx(which hcitool); + Log3 $name, 4, "PRESENCE ($name) - 'which hcitool' returns: $hcitool"; chomp $hcitool; if(-x $hcitool) @@ -792,7 +794,8 @@ PRESENCE_DoLocalBluetoothScan($) $wait = 0; } } - + + Log3 $name, 5, "PRESENCE ($name) - executing: hcitool name $device"; $devname = qx(hcitool name $device); chomp($devname);