From aada9bb24fb8912af42bc50f9262a130e7274af8 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Thu, 6 Feb 2014 19:33:24 +0000 Subject: [PATCH] PRESENCE: fixing present-check-interval to be equal like regular check-interval if it's not set git-svn-id: https://svn.fhem.de/fhem/trunk@4824 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/73_PRESENCE.pm | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 0efab966b..9b5f22ce4 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. - SVN + - bugfix: PRESENCE: fix present-check-interval to be equal with normal + check-interval if not set in define statement and not 30 sec. - feature: DASHBOARD: Tabs can show an icon. - bugfix: DASHBOARD: dashboard_showfullsize only in DashboardRoom. Fix showhelper Bug on lock/unlock. The error that after a trigger diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 9e2f7a15e..241819c1d 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -78,7 +78,7 @@ PRESENCE_Define($$) $hash->{MODE} = "local-bluetooth"; $hash->{ADDRESS} = $a[3]; $hash->{TIMEOUT_NORMAL} = (defined($a[4]) ? $a[4] : 30); - $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : 30); + $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : $hash->{TIMEOUT_NORMAL}); } elsif($a[2] eq "fritzbox") @@ -101,7 +101,7 @@ PRESENCE_Define($$) $hash->{MODE} = "fritzbox"; $hash->{ADDRESS} = $a[3]; $hash->{TIMEOUT_NORMAL} = (defined($a[4]) ? $a[4] : 30); - $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : 30); + $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : $hash->{TIMEOUT_NORMAL}); } elsif($a[2] eq "lan-ping") @@ -116,7 +116,7 @@ PRESENCE_Define($$) $hash->{MODE} = "lan-ping"; $hash->{ADDRESS} = $a[3]; $hash->{TIMEOUT_NORMAL} = (defined($a[4]) ? $a[4] : 30); - $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : 30); + $hash->{TIMEOUT_PRESENT} = (defined($a[5]) ? $a[5] : $hash->{TIMEOUT_NORMAL}); } elsif($a[2] =~ /(shellscript|function)/) @@ -127,7 +127,7 @@ PRESENCE_Define($$) $hash->{MODE} = $2; $hash->{helper}{call} = $3; $hash->{TIMEOUT_NORMAL} = ($4 ne "" ? $4 : 30); - $hash->{TIMEOUT_PRESENT} = ($5 ne "" ? $5 : 30); + $hash->{TIMEOUT_PRESENT} = ($5 ne "" ? $5 : $hash->{TIMEOUT_NORMAL}); if($hash->{helper}{call} =~ /\|/) { @@ -160,7 +160,7 @@ PRESENCE_Define($$) $hash->{MODE} = "lan-bluetooth"; $hash->{ADDRESS} = $a[3]; $hash->{TIMEOUT_NORMAL} = (defined($a[5]) ? $a[5] : 30); - $hash->{TIMEOUT_PRESENT} = (defined($a[6]) ? $a[6] : 30); + $hash->{TIMEOUT_PRESENT} = (defined($a[6]) ? $a[6] : $hash->{TIMEOUT_NORMAL}); $dev = $a[4]; $dev .= ":5222" if($dev !~ m/:/ && $dev ne "none" && $dev !~ m/\@/);