mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
76_SolarForecast: extended Debug collectData for EnergyConsumption
git-svn-id: https://svn.fhem.de/fhem/trunk@29373 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
21ad6a9d76
commit
2e7d1f66fb
@ -3083,7 +3083,8 @@ sub __forecastSolar_ApiRequest {
|
|||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
if (!$allstrings) { # alle Strings wurden abgerufen
|
if (!$allstrings) { # alle Strings wurden abgerufen
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls} += 1;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls} += 1;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{todayDoneAPIcalls} += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3168,7 +3169,8 @@ sub __forecastSolar_ApiResponse {
|
|||||||
|
|
||||||
Log3 ($name, 1, "$name - $msg");
|
Log3 ($name, 1, "$name - $msg");
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{response_message} = $err;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{response_message} = $err;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $err;
|
||||||
|
|
||||||
singleUpdateState ( {hash => $hash, state => $msg, evt => 1} );
|
singleUpdateState ( {hash => $hash, state => $msg, evt => 1} );
|
||||||
$data{$type}{$name}{current}{runTimeLastAPIProc} = sprintf "%.4f", tv_interval($sta); # Verarbeitungszeit ermitteln
|
$data{$type}{$name}{current}{runTimeLastAPIProc} = sprintf "%.4f", tv_interval($sta); # Verarbeitungszeit ermitteln
|
||||||
@ -3218,11 +3220,18 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_timestamp} = $t;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_timestamp} = $t;
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $jdata->{'message'}{'text'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_code} = $jdata->{'message'}{'code'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_timestamp} = $t;
|
||||||
|
|
||||||
if (defined $jdata->{'message'}{'ratelimit'}{'remaining'}) {
|
if (defined $jdata->{'message'}{'ratelimit'}{'remaining'}) {
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
||||||
|
delete $data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
||||||
}
|
}
|
||||||
|
|
||||||
if($debug =~ /apiCall/x) {
|
if($debug =~ /apiCall/x) {
|
||||||
@ -3239,6 +3248,9 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_time} = $rtyat;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_time} = $rtyat;
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_timestamp} = $rtyatts;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_timestamp} = $rtyatts;
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{retryat_time} = $rtyat;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{retryat_timestamp} = $rtyatts;
|
||||||
|
|
||||||
debugLog ($paref, "apiCall", "ForecastSolar API Call - retry at: ".$rtyat." ($rtyatts)");
|
debugLog ($paref, "apiCall", "ForecastSolar API Call - retry at: ".$rtyat." ($rtyatts)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3263,6 +3275,15 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_time} = $rt;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_timestamp} = $rts;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $jdata->{'message'}{'type'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_code} = $jdata->{'message'}{'code'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_limit_period} = $jdata->{'message'}{'ratelimit'}{'period'}; # Requests Limit Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
||||||
|
|
||||||
if ($debug =~ /apiCall/x) {
|
if ($debug =~ /apiCall/x) {
|
||||||
Log3 ($name, 1, qq{$name DEBUG> ForecastSolar API Call - server response for PV string "$string"});
|
Log3 ($name, 1, qq{$name DEBUG> ForecastSolar API Call - server response for PV string "$string"});
|
||||||
Log3 ($name, 1, "$name DEBUG> ForecastSolar API Call - request time: ". $rt." ($rts)");
|
Log3 ($name, 1, "$name DEBUG> ForecastSolar API Call - request time: ". $rt." ($rts)");
|
||||||
@ -3311,7 +3332,8 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
|
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests} += 1;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests} += 1;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{todayDoneAPIrequests} += 1;
|
||||||
|
|
||||||
## Berechnung des optimalen Request Intervalls
|
## Berechnung des optimalen Request Intervalls
|
||||||
################################################
|
################################################
|
||||||
@ -3319,12 +3341,14 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
my $period = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit_period', 3600); # Requests Limit Periode
|
my $period = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit_period', 3600); # Requests Limit Periode
|
||||||
my $limit = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit', 12); # Request Limit in Periode
|
my $limit = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit', 12); # Request Limit in Periode
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $forapirepdef;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $forapirepdef;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $forapirepdef;
|
||||||
|
|
||||||
my $interval = int ($period / ($limit / $snum));
|
my $interval = int ($period / ($limit / $snum));
|
||||||
$interval = 900 if($interval < 900);
|
$interval = 900 if($interval < 900);
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $interval;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $interval;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $interval;
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@ -3334,7 +3358,8 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
|
|
||||||
if ($rtyatts && $rtyatts > $t) { # Zwangswartezeit durch API berücksichtigen
|
if ($rtyatts && $rtyatts > $t) { # Zwangswartezeit durch API berücksichtigen
|
||||||
$apiitv = $rtyatts - $t;
|
$apiitv = $rtyatts - $t;
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $apiitv;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $apiitv;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $apiitv;
|
||||||
$smt = '(forced waiting time)';
|
$smt = '(forced waiting time)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7848,7 +7873,8 @@ sub __delObsoleteAPIData {
|
|||||||
## Status-API Daten löschen
|
## Status-API Daten löschen
|
||||||
#############################
|
#############################
|
||||||
if (keys %{$data{$type}{$name}{statusapi}}) {
|
if (keys %{$data{$type}{$name}{statusapi}}) {
|
||||||
delete $data{$type}{$name}{statusapi}{OpenMeteo} if(!isWeatherModelOpenMeteo ($hash) && !isOpenMeteoUsed ($hash));
|
delete $data{$type}{$name}{statusapi}{OpenMeteo} if(!isWeatherModelOpenMeteo ($hash) && !isOpenMeteoUsed ($hash));
|
||||||
|
delete $data{$type}{$name}{statusapi}{ForecastSolar} if(!isForecastSolarUsed ($hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
## Solar-API Daten löschen
|
## Solar-API Daten löschen
|
||||||
|
@ -3083,7 +3083,8 @@ sub __forecastSolar_ApiRequest {
|
|||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
if (!$allstrings) { # alle Strings wurden abgerufen
|
if (!$allstrings) { # alle Strings wurden abgerufen
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls} += 1;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls} += 1;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{todayDoneAPIcalls} += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3168,7 +3169,8 @@ sub __forecastSolar_ApiResponse {
|
|||||||
|
|
||||||
Log3 ($name, 1, "$name - $msg");
|
Log3 ($name, 1, "$name - $msg");
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{response_message} = $err;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{response_message} = $err;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $err;
|
||||||
|
|
||||||
singleUpdateState ( {hash => $hash, state => $msg, evt => 1} );
|
singleUpdateState ( {hash => $hash, state => $msg, evt => 1} );
|
||||||
$data{$type}{$name}{current}{runTimeLastAPIProc} = sprintf "%.4f", tv_interval($sta); # Verarbeitungszeit ermitteln
|
$data{$type}{$name}{current}{runTimeLastAPIProc} = sprintf "%.4f", tv_interval($sta); # Verarbeitungszeit ermitteln
|
||||||
@ -3218,11 +3220,18 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_timestamp} = $t;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_timestamp} = $t;
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $jdata->{'message'}{'text'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_code} = $jdata->{'message'}{'code'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t, $lang))[3]; # letzte Abrufzeit
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_timestamp} = $t;
|
||||||
|
|
||||||
if (defined $jdata->{'message'}{'ratelimit'}{'remaining'}) {
|
if (defined $jdata->{'message'}{'ratelimit'}{'remaining'}) {
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
||||||
|
delete $data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining}; # verbleibende Requests unbestimmt
|
||||||
}
|
}
|
||||||
|
|
||||||
if($debug =~ /apiCall/x) {
|
if($debug =~ /apiCall/x) {
|
||||||
@ -3239,6 +3248,9 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_time} = $rtyat;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_time} = $rtyat;
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_timestamp} = $rtyatts;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{retryat_timestamp} = $rtyatts;
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{retryat_time} = $rtyat;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{retryat_timestamp} = $rtyatts;
|
||||||
|
|
||||||
debugLog ($paref, "apiCall", "ForecastSolar API Call - retry at: ".$rtyat." ($rtyatts)");
|
debugLog ($paref, "apiCall", "ForecastSolar API Call - retry at: ".$rtyat." ($rtyatts)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3263,6 +3275,15 @@ sub __forecastSolar_ApiResponse {
|
|||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
||||||
|
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_time} = $rt;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{lastretrieval_timestamp} = $rts;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_message} = $jdata->{'message'}{'type'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{response_code} = $jdata->{'message'}{'code'};
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_remaining} = $jdata->{'message'}{'ratelimit'}{'remaining'}; # verbleibende Requests in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_limit_period} = $jdata->{'message'}{'ratelimit'}{'period'}; # Requests Limit Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{requests_limit} = $jdata->{'message'}{'ratelimit'}{'limit'}; # Requests Limit in Periode
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{place} = encode ("utf8", $jdata->{'message'}{'info'}{'place'});
|
||||||
|
|
||||||
if ($debug =~ /apiCall/x) {
|
if ($debug =~ /apiCall/x) {
|
||||||
Log3 ($name, 1, qq{$name DEBUG> ForecastSolar API Call - server response for PV string "$string"});
|
Log3 ($name, 1, qq{$name DEBUG> ForecastSolar API Call - server response for PV string "$string"});
|
||||||
Log3 ($name, 1, "$name DEBUG> ForecastSolar API Call - request time: ". $rt." ($rts)");
|
Log3 ($name, 1, "$name DEBUG> ForecastSolar API Call - request time: ". $rt." ($rts)");
|
||||||
@ -3311,7 +3332,8 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
|
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests} += 1;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests} += 1;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{todayDoneAPIrequests} += 1;
|
||||||
|
|
||||||
## Berechnung des optimalen Request Intervalls
|
## Berechnung des optimalen Request Intervalls
|
||||||
################################################
|
################################################
|
||||||
@ -3319,12 +3341,14 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
my $period = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit_period', 3600); # Requests Limit Periode
|
my $period = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit_period', 3600); # Requests Limit Periode
|
||||||
my $limit = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit', 12); # Request Limit in Periode
|
my $limit = SolCastAPIVal ($hash, '?All', '?All', 'requests_limit', 12); # Request Limit in Periode
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $forapirepdef;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $forapirepdef;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $forapirepdef;
|
||||||
|
|
||||||
my $interval = int ($period / ($limit / $snum));
|
my $interval = int ($period / ($limit / $snum));
|
||||||
$interval = 900 if($interval < 900);
|
$interval = 900 if($interval < 900);
|
||||||
|
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $interval;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $interval;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $interval;
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@ -3334,7 +3358,8 @@ sub ___setForeCastAPIcallKeyData {
|
|||||||
|
|
||||||
if ($rtyatts && $rtyatts > $t) { # Zwangswartezeit durch API berücksichtigen
|
if ($rtyatts && $rtyatts > $t) { # Zwangswartezeit durch API berücksichtigen
|
||||||
$apiitv = $rtyatts - $t;
|
$apiitv = $rtyatts - $t;
|
||||||
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $apiitv;
|
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIinterval} = $apiitv;
|
||||||
|
$data{$type}{$name}{statusapi}{ForecastSolar}{'?All'}{currentAPIinterval} = $apiitv;
|
||||||
$smt = '(forced waiting time)';
|
$smt = '(forced waiting time)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7848,7 +7873,8 @@ sub __delObsoleteAPIData {
|
|||||||
## Status-API Daten löschen
|
## Status-API Daten löschen
|
||||||
#############################
|
#############################
|
||||||
if (keys %{$data{$type}{$name}{statusapi}}) {
|
if (keys %{$data{$type}{$name}{statusapi}}) {
|
||||||
delete $data{$type}{$name}{statusapi}{OpenMeteo} if(!isWeatherModelOpenMeteo ($hash) && !isOpenMeteoUsed ($hash));
|
delete $data{$type}{$name}{statusapi}{OpenMeteo} if(!isWeatherModelOpenMeteo ($hash) && !isOpenMeteoUsed ($hash));
|
||||||
|
delete $data{$type}{$name}{statusapi}{ForecastSolar} if(!isForecastSolarUsed ($hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
## Solar-API Daten löschen
|
## Solar-API Daten löschen
|
||||||
|
Loading…
Reference in New Issue
Block a user