From a6f43c50d4c610d4efad1c57e8bdbb5eddb30898 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Tue, 3 Jun 2025 11:36:22 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 1.52.10 git-svn-id: https://svn.fhem.de/fhem/trunk@30022 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 37 ++++++++++----------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index a7b9d3cba..9d4adfc32 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -160,6 +160,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.52.10"=> "03.06.2025 attr plantControl->genPVforecastsToEvent new possible value 'adapt4fSteps' ", "1.52.9" => "02.06.2025 __getDWDSolarData: new sub azSolar2Astro, ctrlBatSocManagementXX: new key loadAbort ", "1.52.8" => "01.06.2025 _calcConsForecast_circular: use avgArray if number included days <= number of days in pvHistory ", "1.52.7" => "30.05.2025 _calcConsForecast_circular: excludes/includes only if number included days <= number of days in pvHistory ", @@ -402,19 +403,6 @@ my %vNotesIntern = ( "tranformed setter moduleDeclination to setupStringDeclination ". "tranformed setter moduleRoofTops to setupRoofTops ", "1.28.0" => "15.06.2024 new consumer key exconfc, Forum: https://forum.fhem.de/index.php?msg=1315111 ", - "1.27.0" => "12.06.2024 __VictronVRM_ApiResponseLogin: check token not empty ". - "transformed setter modulePeakString to attr setupStringPeak ", - "1.26.0" => "10.06.2024 transformed setter currentRadiationAPI to attr setupRadiationAPI ", - "1.25.2" => "09.06.2024 _specialActivities: change delete readings exec ", - "1.25.1" => "08.06.2024 Illegal division by zero Forum:https://forum.fhem.de/index.php?msg=1314730 ", - "1.25.0" => "05.06.2024 transformed setter inverterStrings to attr setupInverterStrings, _calcTodayPVdeviation: fix continuously calc again ", - "1.24.0" => "03.06.2024 transformed setter currentInverterDev to attr setupInverterDev, _calcTodayPVdeviation: fix continuously calc ", - "1.23.0" => "02.06.2024 transformed setter currentBatteryDev to attr setupBatteryDev, _transferInverterValues: change output for DEBUG ". - "new key attrInvChangedTs in circular, prepare transformation of currentInverterDev ". - "_calcTodayPVdeviation: fix daily calc ", - "1.22.0" => "01.06.2024 transformed setter currentMeterDev to attr setupMeterDev, plantConfiguration: setModel after restore ". - "delete reset currentMeterSet ", - "1.21.5" => "30.05.2024 listDataPool: list current can operate three hash levels, first preparation for remote objects ", "0.1.0" => "09.12.2020 initial Version " ); @@ -6743,7 +6731,7 @@ sub _attrplantControl { ## no critic "not used" cycleInterval => { comp => '\d+', act => 1 }, feedinPowerLimit => { comp => '\d+', act => 0 }, genPVdeviation => { comp => '(daily|continuously)', act => 1 }, - genPVforecastsToEvent => { comp => '(adapt4Steps)', act => 0 }, + genPVforecastsToEvent => { comp => '(adapt4(?:f)?Steps)', act => 0 }, showLink => { comp => '(0|1)', act => 0 }, }; @@ -9564,9 +9552,14 @@ sub __createAdditionalEvents { for my $idx (sort keys %{$data{$name}{nexthours}}) { my $nhts = NexthoursVal ($name, $idx, 'starttime', undef); my $nhfc = NexthoursVal ($name, $idx, 'pvfc', undef); - next if(!defined $nhts || !defined $nhfc); - - my ($dt, $h) = $nhts =~ /([\w-]+)\s(\d{2})/xs; + next if(!defined $nhts || !defined $nhfc); + + my ($dt, $h) = $nhts =~ /([\w-]+)\s(\d{2})/xs; + + if (!$nhfc && $g2ev eq 'adapt4fSteps') { # für SVG 'fsteps'-Darstellung optimieren + storeReading ('AllPVforecastsToEvent', "0 Wh", $dt." ".$h.":59:59"); + next; + } # https://forum.fhem.de/index.php?msg=1340607 storeReading ('AllPVforecastsToEvent', "0 Wh", $dt." ".$h.":00:00") if(!$done); # vor dem ersten Prognosewert immer einen Nullwert setzen @@ -26377,8 +26370,10 @@ to ensure that the system configuration is correct. genPVforecastsToEvent The module generates daily ‘AllPVforecastsToEvent’ events to visualize the PV forecast. Further explanations can be found in the german Wiki. - Event generation can be optimized for specific uses. - adapt4Steps - the events are optimized for the SVG Plot-Type 'steps' + Note: When using the attribute, the attribute event-on-update-reading=AllPVforecastsToEvent must also be set. + Event generation can be optimized for specific uses: + adapt4Steps - the events are optimized for the SVG plot type 'steps' + adapt4fSteps - the events are optimized for the SVG plot type 'fsteps' showLink Display of a link to the detailed view of the device above the graphics area 0 - Display off, 1 - Display on, default: 0 @@ -28989,8 +28984,10 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. genPVforecastsToEvent Das Modul erzeugt täglich 'AllPVforecastsToEvent'-Events zur Visualisierung der PV Prognose. Nähere Erläuterungen dazu sind im Wiki beschrieben. - Die Eventerzeugung kann für bestimmte Nutzungen optimiert werden. + Hinweis: Bei Nutzung des Attributes ist ebenfalls das Attribut event-on-update-reading=AllPVforecastsToEvent zu setzen. + Die Eventerzeugung kann für bestimmte Nutzungen optimiert werden: adapt4Steps - die Events werden für den SVG Plot-Type 'steps' optimiert + adapt4fSteps - die Events werden für den SVG Plot-Type 'fsteps' optimiert showLink Anzeige eines Links zur Detailansicht des Device über dem Grafikbereich 0 - Anzeige aus, 1 - Anzeige an, default: 0