From 1fdccf139a2a85a37479f34438a88faa6de9dce3 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Mon, 18 Feb 2013 17:53:37 +0000 Subject: [PATCH] moving cachednr deletion from ReadyFn to DefineFn as ReadyFn is not called in fritzbox mode git-svn-id: https://svn.fhem.de/fhem/trunk@2758 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_PRESENCE.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 15c3c1e6c..4b76dc350 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -129,10 +129,13 @@ PRESENCE_Define($$) if($destination eq "lan-ping" or $destination eq "local-bluetooth" or $destination eq "fritzbox") { - $hash->{MODE} = $destination; - + $hash->{MODE} = $destination; + + delete $hash->{helper}{cachednr} if(defined($hash->{helper}{cachednr}; + RemoveInternalTimer($hash); InternalTimer(gettimeofday()+2, "PRESENCE_StartLocalScan", $hash, 0) unless(exists($hash->{helper}{DISABLED}) and $hash->{helper}{DISABLED}); + return; } @@ -362,7 +365,7 @@ PRESENCE_Ready($) { my ($hash) = @_; - delete $hash->{helper}{cachednr}; ##MH clear cache on start + return DevIo_OpenDev($hash, 1, "PRESENCE_DoInit"); }