mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
CUL_HM:throttel auto-status-read - just small improvement
git-svn-id: https://svn.fhem.de/fhem/trunk@22199 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2b8e3981ea
commit
2d712a17e0
@ -9934,6 +9934,7 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
|||||||
# --- verify send is possible
|
# --- verify send is possible
|
||||||
|
|
||||||
my $mq = $modules{CUL_HM}{helper};
|
my $mq = $modules{CUL_HM}{helper};
|
||||||
|
my $Qexec = "none";
|
||||||
foreach my $q ("qReqStat","qReqConf"){
|
foreach my $q ("qReqStat","qReqConf"){
|
||||||
if (@{$mq->{$q}}){
|
if (@{$mq->{$q}}){
|
||||||
my ($devN,$devH);
|
my ($devN,$devH);
|
||||||
@ -9941,7 +9942,7 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
|||||||
$devH = $defs{$devNtmp};
|
$devH = $defs{$devNtmp};
|
||||||
CUL_HM_assignIO($devH);
|
CUL_HM_assignIO($devH);
|
||||||
if( defined $devH->{IODev}{NAME}
|
if( defined $devH->{IODev}{NAME}
|
||||||
&& ( ( ReadingsVal($devH->{IODev}{NAME},"cond","") =~ m/^(ok|Overload-released|Warning-HighLoad|init)$/
|
&& ( ( ReadingsVal($devH->{IODev}{NAME},"cond","ok") =~ m/^(ok|Overload-released|Warning-HighLoad|init)$/
|
||||||
&& $q eq "qReqStat")
|
&& $q eq "qReqStat")
|
||||||
||( CUL_HM_autoReadReady($devH->{IODev}{NAME})
|
||( CUL_HM_autoReadReady($devH->{IODev}{NAME})
|
||||||
&& !$devH->{cmdStack}
|
&& !$devH->{cmdStack}
|
||||||
@ -9973,16 +9974,17 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
|||||||
CUL_HM_unQEntity($eN,"qReqStat") if (!$dq->{$q});
|
CUL_HM_unQEntity($eN,"qReqStat") if (!$dq->{$q});
|
||||||
InternalTimer(gettimeofday()+20,"CUL_HM_readStateTo","sUpdt:$eN",0);
|
InternalTimer(gettimeofday()+20,"CUL_HM_readStateTo","sUpdt:$eN",0);
|
||||||
}
|
}
|
||||||
|
$Qexec = $q;
|
||||||
last; # execute only one!
|
last; # execute only one!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
my $delayAdd = $Qexec eq 'none' ? 10 : 0; # if no device was identified wait at least
|
||||||
delete $mq->{autoRdActive} if ($mq->{autoRdActive} &&
|
delete $mq->{autoRdActive} if ($mq->{autoRdActive} &&
|
||||||
$defs{$mq->{autoRdActive}}{helper}{prt}{sProc} != 1);
|
$defs{$mq->{autoRdActive}}{helper}{prt}{sProc} != 1);
|
||||||
my $next;# how long to wait for next timer
|
my $next;# how long to wait for next timer
|
||||||
if (@{$mq->{qReqStat}}){$next = 1}
|
if (@{$mq->{qReqStat}}){$next = 1}
|
||||||
elsif (@{$mq->{qReqConf}}){$next = $modules{CUL_HM}{hmAutoReadScan}}
|
elsif (@{$mq->{qReqConf}}){$next = $modules{CUL_HM}{hmAutoReadScan}}
|
||||||
InternalTimer(gettimeofday()+$next,"CUL_HM_procQs","CUL_HM_procQs",0) if ($next);
|
InternalTimer(gettimeofday()+$next+$delayAdd,"CUL_HM_procQs","CUL_HM_procQs",0) if ($next);
|
||||||
}
|
}
|
||||||
sub CUL_HM_appFromQ($$){#stack commands if pend in WuQ
|
sub CUL_HM_appFromQ($$){#stack commands if pend in WuQ
|
||||||
my ($name,$reason) = @_;
|
my ($name,$reason) = @_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user