From 063ad19763804bde04a249e0796d732b0b51b32b Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Thu, 20 Aug 2020 17:50:27 +0000 Subject: [PATCH] CUL_HM:debug some Action Detector startup problems git-svn-id: https://svn.fhem.de/fhem/trunk@22637 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 329a5b3f1..d27dfc7ba 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -738,6 +738,7 @@ sub CUL_HM_Attr(@) {################################# return "$attrName must be higher then 30, $attrVal not allowed" if ($attrVal < 10); #update and sync to new timing + RemoveInternalTimer("ActionDetector"); InternalTimer(gettimeofday()+5,"CUL_HM_ActCheck", "ActionDetector", 0); } @@ -748,9 +749,9 @@ sub CUL_HM_Attr(@) {################################# my($h,$m) = split(":",$attrVal); $h = int($h); $m = int($m); - return "format hhh:mm required. $attrVal incorrect" if( $h >= 999 && $h <= 0 - && $m >= 59 && $m <= 0 - && $h + $m > 0); + return "format hhh:mm required. $attrVal incorrect" if( $h >= 999 || $h <= 0 + || $m >= 59 || $m <= 0 + || $h + $m <= 0); my $attrValNew = sprintf("%03d:%02d",$h,$m); CUL_HM_ActAdd(CUL_HM_name2Id($name),$attrValNew); $attr{$name}{$attrName} = $attrValNew; @@ -9456,9 +9457,6 @@ sub CUL_HM_ActAdd($$) {# add an HMid to list for activity supervision ($actHash->{helper}{peers}?$actHash->{helper}{peers}:"") .",$devId"); Log3 $actHash, 3,"Device ".$devName." added to ActionDetector with $cycleString time"; - #run ActionDetector - RemoveInternalTimer("ActionDetector"); -# CUL_HM_ActCheck("add") if ($init_done); return; } sub CUL_HM_ActDel($) {# delete HMid for activity supervision