diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm
index 8ee2d8b01..f8b2f9497 100755
--- a/fhem/FHEM/73_PRESENCE.pm
+++ b/fhem/FHEM/73_PRESENCE.pm
@@ -51,7 +51,7 @@ PRESENCE_Initialize($)
$hash->{DefFn} = "PRESENCE_Define";
$hash->{UndefFn} = "PRESENCE_Undef";
$hash->{AttrFn} = "PRESENCE_Attr";
- $hash->{AttrList}= "do_not_notify:0,1 disable:0,1 loglevel:1,2,3,4,5 ".$readingFnAttributes;
+ $hash->{AttrList}= "do_not_notify:0,1 disable:0,1 fritzbox_repeater:0,1 loglevel:1,2,3,4,5 ".$readingFnAttributes;
}
@@ -398,7 +398,7 @@ sub PRESENCE_StartLocalScan($;$)
}
elsif($hash->{MODE} eq "fritzbox")
{
- BlockingCall("PRESENCE_DoLocalFritzBoxScan", $hash->{NAME}."|".$hash->{ADDRESS}."|".$local, "PRESENCE_ProcessLocalScan", 20);
+ BlockingCall("PRESENCE_DoLocalFritzBoxScan", $hash->{NAME}."|".$hash->{ADDRESS}."|".$local."|".AttrVal($hash->{NAME}, "fritzbox_repeater", "0"), "PRESENCE_ProcessLocalScan", 20);
}
}
@@ -410,6 +410,8 @@ PRESENCE_DoLocalPingScan($)
my ($string) = @_;
my ($name, $device, $local) = split("\\|", $string);
+ Log GetLogLevel($defs{$name}{NAME}, 5), "PRESENCE_DoLocalPingScan: $string";
+
my $retcode;
my $return;
my $temp;
@@ -448,10 +450,13 @@ sub
PRESENCE_DoLocalFritzBoxScan($)
{
my ($string) = @_;
- my ($name, $device, $local) = split("\\|", $string);
-
+ my ($name, $device, $local, $repeater) = split("\\|", $string);
+
+ Log GetLogLevel($defs{$name}{NAME}, 5), "PRESENCE_DoLocalFritzBoxScan: $string";
my $number=0;
+ my $check_command = ($repeater ? "active" : "speed");
+
my $status=0;
@@ -467,8 +472,8 @@ PRESENCE_DoLocalFritzBoxScan($)
# only use the cached $number if it has still the correct device name
if($cached_name eq $device)
{
- Log GetLogLevel($name, 5), "PRESENCE ($name) - checking with cached number ($number)";
- $status = qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice$number/speed);
+ 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);
if(not $status =~ /^\s*\d+\s*$/)
{
return "$name|$local|error|could not execute ctlmgr_ctl (cached)";
@@ -502,12 +507,12 @@ PRESENCE_DoLocalFritzBoxScan($)
chomp $net_device;
- Log GetLogLevel($name, 5), "PRESENCE ($name) - checking device number $number ($net_device)";
+ Log GetLogLevel($name, 5), "PRESENCE ($name) - checking with device number $number the $check_command state ($net_device)";
if($net_device eq $device)
{
- $status=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice$number/speed);
+ $status=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice$number/$check_command);
- Log GetLogLevel($name, 5), "PRESENCE ($name) - speed for device number $net_device is $status";
+ Log GetLogLevel($name, 5), "PRESENCE ($name) - $check_command for device number $net_device is $status";
last;
}
@@ -786,6 +791,16 @@ Options:
If this attribute is activated, an active check will be disabled.
Possible values: 0 => not disabled , 1 => disabled
Default Value is 0 (not disabled)
+