mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
actiondetect addings delayed
git-svn-id: https://svn.fhem.de/fhem/trunk@2744 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8e9ce262bc
commit
57dfed7972
@ -277,8 +277,9 @@ sub CUL_HM_updateConfig($){
|
|||||||
# it will also be called after each manual definition
|
# it will also be called after each manual definition
|
||||||
# Purpose is to parse attributes and read config
|
# Purpose is to parse attributes and read config
|
||||||
my @getConfList;
|
my @getConfList;
|
||||||
while(@{$modules{CUL_HM}{helper}{updtCfgLst}}){
|
my @nameList = CUL_HM_noDup(@{$modules{CUL_HM}{helper}{updtCfgLst}});
|
||||||
my $name = shift(@{$modules{CUL_HM}{helper}{updtCfgLst}});
|
while(@nameList){
|
||||||
|
my $name = shift(@nameList);
|
||||||
my $hash = CUL_HM_name2Hash($name);
|
my $hash = CUL_HM_name2Hash($name);
|
||||||
if (CUL_HM_hash2Id($hash) ne $K_actDetID){# if not action detector
|
if (CUL_HM_hash2Id($hash) ne $K_actDetID){# if not action detector
|
||||||
CUL_HM_ID2PeerList($name,"",1); # update peerList out of peerIDs
|
CUL_HM_ID2PeerList($name,"",1); # update peerList out of peerIDs
|
||||||
@ -291,8 +292,8 @@ sub CUL_HM_updateConfig($){
|
|||||||
|
|
||||||
# convert variables, delete obsolete, move to hidden level
|
# convert variables, delete obsolete, move to hidden level
|
||||||
$attr{$name}{".devInfo"} = $attr{$name}{devInfo} if ($attr{$name}{devInfo});
|
$attr{$name}{".devInfo"} = $attr{$name}{devInfo} if ($attr{$name}{devInfo});
|
||||||
# delete $attr{$name}{devInfo};
|
delete $attr{$name}{devInfo};
|
||||||
# delete $attr{$name}{hmClass};
|
delete $attr{$name}{hmClass};
|
||||||
|
|
||||||
# add default web-commands
|
# add default web-commands
|
||||||
my $webCmd;
|
my $webCmd;
|
||||||
@ -1667,9 +1668,16 @@ sub CUL_HM_Attr(@) {#############################
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($attrName eq "actCycle"){#"000:00" or 'off'
|
elsif($attrName eq "actCycle"){#"000:00" or 'off'
|
||||||
my $hmID = CUL_HM_name2Id($name);
|
return if (CUL_HM_name2Id($name) eq $K_actDetID);
|
||||||
return if ($hmID eq $K_actDetID);
|
# Add to ActionDetector. Wait a little - config might not be finished
|
||||||
return CUL_HM_ActAdd($hmID,$attrVal);
|
my @arr;
|
||||||
|
if(!$modules{CUL_HM}{helper}{updtCfgLst}){
|
||||||
|
$modules{CUL_HM}{helper}{updtCfgLst} = \@arr;
|
||||||
|
}
|
||||||
|
push(@{$modules{CUL_HM}{helper}{updtCfgLst}}, $name);
|
||||||
|
|
||||||
|
RemoveInternalTimer("updateConfig");
|
||||||
|
InternalTimer(gettimeofday()+5,"CUL_HM_updateConfig", "updateConfig", 0);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4109,7 +4117,6 @@ sub CUL_HM_ActAdd($$) {# add an HMid to list for activity supervision
|
|||||||
$actHash->{helper}{peers} = CUL_HM_noDupInString(
|
$actHash->{helper}{peers} = CUL_HM_noDupInString(
|
||||||
($actHash->{helper}{peers}?$actHash->{helper}{peers}:"")
|
($actHash->{helper}{peers}?$actHash->{helper}{peers}:"")
|
||||||
.",$devId");
|
.",$devId");
|
||||||
|
|
||||||
Log 3,"Device ".$devName." added to ActionDetector with "
|
Log 3,"Device ".$devName." added to ActionDetector with "
|
||||||
.$cycleString." time";
|
.$cycleString." time";
|
||||||
#run ActionDetector
|
#run ActionDetector
|
||||||
|
Loading…
x
Reference in New Issue
Block a user