From d046f253f0c5ec8101862214857131b2f25539ad Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 19 Sep 2022 19:03:45 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.68.3 git-svn-id: https://svn.fhem.de/fhem/trunk@26428 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 3d2408a90..4992ff18e 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -2023,7 +2023,7 @@ sub ___setLastAPIcallKeyData { $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_time} = (timestampToTimestring ($t))[3]; # letzte Abrufzeit $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{lastretrieval_timestamp} = $t; # letzter Abrufzeitstempel - $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls} += 1; + $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests} += 1; ## Berechnung des optimalen Request Intervalls ################################################ @@ -2039,7 +2039,7 @@ sub ___setLastAPIcallKeyData { # $data{$type}{$name}{current}{solCastTodayMaxAPIcalls} = $madr; - my $darr = $madr - (SolCastAPIVal ($hash, '?All', '?All', 'todayDoneAPIcalls', 0) / ($asc * $upc)); # verbleibende SolCast API Calls am aktuellen Tag + my $darr = $madr - (SolCastAPIVal ($hash, '?All', '?All', 'todayDoneAPIrequests', 0) / ($asc * $upc)); # verbleibende SolCast API Calls am aktuellen Tag $darr = 0 if($darr < 0); $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayRemaingAPIcalls} = $darr; @@ -2648,6 +2648,7 @@ sub centralTask { delete $data{$type}{$name}{solcastapi}{'#All'}; delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todaySolCastAPIcalls}; delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{currentAPIInterval}; + delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls}; ############################################################### @@ -2945,7 +2946,7 @@ sub _specialActivities { delete $hash->{HELPER}{INITCONTOTAL}; delete $hash->{HELPER}{INITFEEDTOTAL}; - delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIcalls}; + delete $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayDoneAPIrequests}; delete $data{$type}{$name}{pvhist}{$day}; # den (alten) aktuellen Tag aus History löschen Log3 ($name, 3, qq{$name - history day "$day" deleted}); @@ -9180,7 +9181,7 @@ return $def; # Sonderabfragen # SolCastAPIVal ($hash, '?All', '?All', 'lastretrieval_time', $def) - letzte Abfrage Zeitstring # SolCastAPIVal ($hash, '?All', '?All', 'lastretrieval_timestamp', $def) - letzte Abfrage Unix Timestamp -# SolCastAPIVal ($hash, '?All', '?All', 'todayDoneAPIcalls', $def) - heute ausgeführte API Requests +# SolCastAPIVal ($hash, '?All', '?All', 'todayDoneAPIrequests', $def) - heute ausgeführte API Requests # SolCastAPIVal ($hash, '?All', '?All', 'todayRemaingAPIcalls', $def) - heute noch mögliche API Requests # SolCastAPIVal ($hash, '?All', '?All', 'currentAPIinterval', $def) - aktuelles API Request Intervall # SolCastAPIVal ($hash, '?IdPair', '?', 'rtid', $def) - RoofTop-ID, = Paarschlüssel @@ -9924,9 +9925,10 @@ Ein/Ausschaltzeiten sowie deren Ausführung vom SolarForecast Modul übernehmen lastretrieval_time Zeit des letzten SolCast API Abrufs lastretrieval_timestamp Unix Timestamp des letzten SolCast API Abrufs pv_estimate erwartete PV Erzeugung von SolCast API (Wh) - todayDoneAPIcalls Anzahl der ausgeführten API Requests am aktuellen Tag - todayRemaingAPIcalls Anzahl der noch möglichen API Requests am aktuellen Tag - + todayDoneAPIrequests Anzahl der ausgeführten API Requests am aktuellen Tag + todayRemaingAPIcalls Anzahl der noch möglichen API Abrufe am aktuellen Tag + (ein Abruf kann mehrere API Requests ausführen) +