mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
minor logging optimizations for mode fritzbox
git-svn-id: https://svn.fhem.de/fhem/trunk@3178 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3f673e3242
commit
fc2dc7dc4e
@ -567,6 +567,11 @@ PRESENCE_DoLocalFritzBoxScan($)
|
||||
{
|
||||
Log GetLogLevel($name, 5), "PRESENCE ($name) - checking with cached number the $check_command state ($number)";
|
||||
$status = qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice$number/$check_command);
|
||||
|
||||
chomp $status;
|
||||
|
||||
Log GetLogLevel($name, 5), "PRESENCE ($name) - ctlmgr_ctl (cached: $number) returned: $status";
|
||||
|
||||
if(not $status =~ /^\s*\d+\s*$/)
|
||||
{
|
||||
return "$name|$local|error|could not execute ctlmgr_ctl (cached)";
|
||||
@ -583,6 +588,8 @@ PRESENCE_DoLocalFritzBoxScan($)
|
||||
|
||||
chomp $max;
|
||||
|
||||
Log GetLogLevel($name, 5), "PRESENCE ($name) - ctlmgr_ctl (getting device count) returned: $max";
|
||||
|
||||
if(not $max =~ /^\s*\d+\s*$/)
|
||||
{
|
||||
return "$name|$local|error|could not execute ctlmgr_ctl";
|
||||
@ -605,6 +612,8 @@ PRESENCE_DoLocalFritzBoxScan($)
|
||||
{
|
||||
$status=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice$number/$check_command);
|
||||
|
||||
chomp $status;
|
||||
|
||||
Log GetLogLevel($name, 5), "PRESENCE ($name) - $check_command for device number $net_device is $status";
|
||||
last;
|
||||
}
|
||||
@ -612,8 +621,6 @@ PRESENCE_DoLocalFritzBoxScan($)
|
||||
$number++;
|
||||
sleep 0.2;
|
||||
}
|
||||
|
||||
chomp $status;
|
||||
|
||||
return ($status == 0 ? "$name|$local|absent" : "$name|$local|present").($number <= $max ? "|$number" : "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user