From 26bb20136cb27ffb0335c7848a69bbf5a90fc890 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 11 Sep 2023 06:24:02 +0000 Subject: [PATCH] 76_SolarForecast: contrib 0.82.2 git-svn-id: https://svn.fhem.de/fhem/trunk@27945 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 736d968a3..9e90d03e4 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -140,7 +140,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( - "0.82.2" => "10.09.2023 activate implementation of DWD AI support ", + "0.82.2" => "11.09.2023 activate implementation of DWD AI support, add runTimeTrainAI ", "0.82.1" => "08.09.2023 rebuild implementation of DWD AI support, some error fixing (FHEM restarts between 0 and 1) ", "0.82.0" => "02.09.2023 first implementation of DWD AI support, new ctrlDebug aiProcess aiData, reset aiData ", "0.81.1" => "30.08.2023 show forecast qualities when pressing quality icon in forecast grafic, store rad1h (model DWD) in ". @@ -882,6 +882,7 @@ my %hcsr = ( todayRemainingAPIcalls => { fnr => 1, fn => \&SolCastAPIVal, par => '', unit => '', def => 'apimaxreq' }, todayRemainingAPIrequests => { fnr => 1, fn => \&SolCastAPIVal, par => '', unit => '', def => 'apimaxreq' }, runTimeCentralTask => { fnr => 2, fn => \&CurrentVal, par => '', unit => '', def => '-' }, + runTimeTrainAI => { fnr => 2, fn => \&CurrentVal, par => '', unit => '', def => '-' }, runTimeLastAPIAnswer => { fnr => 2, fn => \&CurrentVal, par => '', unit => '', def => '-' }, runTimeLastAPIProc => { fnr => 2, fn => \&CurrentVal, par => '', unit => '', def => '-' }, allStringsFullfilled => { fnr => 2, fn => \&CurrentVal, par => '', unit => '', def => 0 }, @@ -10678,6 +10679,8 @@ sub aiTrain { ## no critic "not used" return if(!isPrepared4AI ($hash)); + my $cst = [gettimeofday]; # Zyklus-Startzeit + my $err; my $dtree = AiDetreeVal ($hash, 'object', undef); @@ -10704,6 +10707,8 @@ sub aiTrain { ## no critic "not used" $data{$type}{$name}{current}{aitrainstate} = 'ok'; } + setTimeTracking ($hash, $cst, 'runTimeTrainAI'); # Zyklus-Laufzeit ermitteln + return; } @@ -14927,6 +14932,7 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. lastretrieval_timestamp der Timestamp der letzen Abrufzeitpunkt der API (nur Model SolCastAPI, ForecastSolarAPI) response_message die letzte Statusmeldung der API (nur Model SolCastAPI, ForecastSolarAPI) runTimeCentralTask die Laufzeit des letzten SolarForecast Intervalls (Gesamtprozess) in Sekunden + runTimeTrainAI die Laufzeit des letzten KI Trainingszyklus in Sekunden runTimeLastAPIAnswer die letzte Antwortzeit des API Abrufs auf einen Request in Sekunden (nur Model SolCastAPI, ForecastSolarAPI) runTimeLastAPIProc die letzte Prozesszeit zur Verarbeitung der empfangenen API Daten (nur Model SolCastAPI, ForecastSolarAPI) SunMinutes_Remain die verbleibenden Minuten bis Sonnenuntergang des aktuellen Tages