mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
10_CUL_HM:restrict statusrequest repetition
git-svn-id: https://svn.fhem.de/fhem/trunk@8835 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5e1f3f8c5f
commit
1b29c6ecd0
@ -953,6 +953,7 @@ sub HMLAN_qResp($$$) {#response-waiting queue##################################
|
||||
push @{$hashQ->{apIDs}},$id;
|
||||
if ($hashQ->{answerPend} >= $hashQ->{hmLanQlen}){
|
||||
$hash->{XmitOpen} = 2;#delay further sending
|
||||
RemoveInternalTimer("hmClearQ:$hash->{NAME}");
|
||||
InternalTimer(gettimeofday()+10, "HMLAN_clearQ", "hmClearQ:$hash->{NAME}", 0);
|
||||
}
|
||||
}
|
||||
|
@ -7523,6 +7523,7 @@ sub CUL_HM_qAutoRead($$){
|
||||
sub CUL_HM_unQEntity($$){# remove entity from q
|
||||
my ($name,$q) = @_;
|
||||
my $devN = CUL_HM_getDeviceName($name);
|
||||
|
||||
return if (AttrVal($devN,"subType","") eq "virtual");
|
||||
my $dq = $defs{$devN}{helper}{q};
|
||||
RemoveInternalTimer("sUpdt:$name") if ($q eq "qReqStat");#remove delayed
|
||||
@ -7569,6 +7570,12 @@ sub CUL_HM_qEntity($$){ # add to queue
|
||||
InternalTimer(gettimeofday()+ $wT,"CUL_HM_procQs","CUL_HM_procQs", 0);
|
||||
}
|
||||
|
||||
sub CUL_HM_readStateTo($){#staterequest not working
|
||||
my ($eN) = @_;
|
||||
$eN = substr($eN,6) if ($eN =~ m/^sUpdt:/);
|
||||
CUL_HM_UpdtReadSingle($defs{$eN},"state","unreachable",1);
|
||||
CUL_HM_stateUpdatDly($eN,1800);
|
||||
}
|
||||
sub CUL_HM_procQs($){#process non-wakeup queues
|
||||
# --- verify send is possible
|
||||
|
||||
@ -7580,7 +7587,7 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
||||
next if(!defined $defs{$devN}{IODev}{NAME});
|
||||
my $ioName = $defs{$devN}{IODev}{NAME};
|
||||
|
||||
if ( ( ReadingsVal($ioName,"cond","") =~ m /^(ok|Overload-released|init)$/
|
||||
if ( ( ReadingsVal($ioName,"cond","") =~ m /^(ok|Overload-released|Warning-HighLoad|init)$/
|
||||
&& $q eq "qReqStat")
|
||||
||( CUL_HM_autoReadReady($ioName)
|
||||
&& !$defs{$devN}{cmdStack}
|
||||
@ -7600,6 +7607,8 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
||||
}
|
||||
else{
|
||||
CUL_HM_Set($defs{$eN},$eN,"statusRequest");
|
||||
CUL_HM_unQEntity($eN,"qReqStat");
|
||||
InternalTimer(gettimeofday()+5,"CUL_HM_readStateTo","sUpdt:$eN",0);
|
||||
}
|
||||
}
|
||||
last; # execute only one!
|
||||
|
Loading…
x
Reference in New Issue
Block a user