diff --git a/fhem/FHEM/79_BDKM.pm b/fhem/FHEM/79_BDKM.pm
index bb7dcd609..378fd6772 100644
--- a/fhem/FHEM/79_BDKM.pm
+++ b/fhem/FHEM/79_BDKM.pm
@@ -173,7 +173,7 @@ my @RC35DEFAULTS =
qw(/gateway/DateTime:0:0:DateTime
);
-# extra valid value not in range which is set by gateway
+# extra valid value not in range (set by gateway)
my %extra_value=
qw(/heatingCircuits/hc1/fastHeatupFactor 0
/heatingCircuits/hc1/temporaryRoomSetpoint -1
@@ -196,6 +196,7 @@ sub BDKM_Initialize($)
$hash->{AttrList} =
"BaseInterval " .
+ "InterPollDelay " .
"PollIds:textField-long " .
"HttpTimeout " .
$readingFnAttributes;
@@ -269,7 +270,7 @@ sub BDKM_Define($$)
$hash->{IDS} = {}; # Hash containing IDS of first full poll
$hash->{VERSION} = '$Id$';
# init attrs to defaults:
- map {BDKM_Attr("del",$name,$_)} qw(BaseInterval ReadBackDelay HttpTimeout);
+ map {BDKM_Attr("del",$name,$_)} qw(BaseInterval InterPollDelay ReadBackDelay HttpTimeout);
BDKM_reInit($hash);
return undef;
@@ -293,6 +294,14 @@ sub BDKM_Attr(@)
$hash->{BASEINTERVAL} = $val;
BDKM_reInit($hash);
}
+ } elsif ($attr eq "InterPollDelay") {
+ $del and $val = 0; # default
+ if($val !~ /^\d+$/) {
+ return $error."needs interger value";
+ } else {
+ $hash->{INTERPOLLDELAY} = $val/1000;
+ BDKM_reInit($hash);
+ }
} elsif($attr eq "ReadBackDelay") {
$del and $val = 500;
if($val !~ /^\d+$/ or $val < 100 or $val > 2000) {
@@ -394,7 +403,11 @@ sub BDKM_doSequence($)
# restart timer for next sequence
BDKM_Timer($hash,$hash->{BASEINTERVAL},"BDKM_doSequence");
# only start polling if we are not polling (e.g. due to network promlems)
- $hash->{ISPOLLING} and return;
+ if($hash->{ISPOLLING}) {
+ Log3 $hash, 3, $hash->{NAME}." trying to start new sequence while previous not finished";
+ Log3 $hash, 3, $hash->{NAME}." Gateway not responding? BaseInterval too short? InterPollDelay too high?";
+ return;
+ }
$hash->{ISPOLLING}=1;
my $seq = $hash->{SEQUENCE};
my $h = $hash->{POLLIDS};
@@ -486,8 +499,11 @@ sub BDKM_JobQueueNextIdHttpDone($)
Log3 $hash, 4, "$name $id - no JSON data available - raw data: $data";
}
}
- BDKM_JobQueueNextId($hash); # get next id
-
+ if($hash->{INTERPOLLDELAY}) {
+ BDKM_Timer($hash,$hash->{INTERPOLLDELAY},"BDKM_JobQueueNextId");
+ } else {
+ BDKM_JobQueueNextId($hash);
+ }
return;
}
@@ -1074,7 +1090,10 @@ sub BDKM_update_id_from_json
} elsif ($type eq "yRecording") {
defined $h->{TYPE} or $h->{TYPE}="Recroding";
# ignore recordings - fhem records :-)
- } elsif ($type eq "refEnum") { # ignore directory entry
+ } elsif ($type eq "refEnum") {
+ # ignore directory entry
+ } elsif ($type eq "eMonitoringList") {
+ # ignore eMonitoringList - I don't have infos about that
} else {
Log3 $hash, 2, "$hash->{NAME}: unknown type $type for $id";
}
@@ -1238,6 +1257,15 @@ sub BDKM_MapSwitchPrograms
It defaults to 120 seconds. Which means that every 120 seconds a
new poll collects values of IDs which turn it is.
+