diff --git a/fhem/CHANGED b/fhem/CHANGED index 63ed627d4..66cdc06ea 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it + - change: 76_SolarForecast: consumerXX if mode is device/reading combination - feature: 76_SolarForecast: consumerkey 'mode' can device/reading combination - feature: 76_SolarForecast: possible asynchron mode Battery Dev, code change - feature: 76_SMAInverter.pm: add installer login, code optimized diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index 75ae46c80..a633940f7 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -157,6 +157,8 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.39.3" => "09.12.2024 fix mode in consumerXX-Reading if mode is device/reading combination, show Mode in ". + "consumer legend mouse-over ", "1.39.2" => "08.12.2024 rollout delHashRefDeep, extended consumer key 'mode' by device/reading combination ", "1.39.1" => "07.12.2024 new control releaseCentralTask, new delHashRefDeep in some cases ". "possible asynchron mode for setupBatteryDev ", @@ -340,25 +342,6 @@ my %vNotesIntern = ( "1.6.2" => "07.01.2024 optimize battery management ", "1.6.1" => "04.01.2024 new sub __setPhysLogSwState, edit ___setConsumerPlanningState, boost performance of _collectAllRegConsumers ". "CurrentVal ctrunning - Central Task running Statusbit, edit comref ", - "1.6.0" => "22.12.2023 store daily batmaxsoc in pvHistory, new attr ctrlBatSocManagement, reading Battery_OptimumTargetSoC ". - "currentBatteryDev: new optional key 'cap', adapt cloud2bin,temp2bin,rain2bin ". - "minor internal changes, isAddSwitchOffCond: change hysteresis algo, ctrlDebug: new entry batteryManagement ". - "check longitude, latitude in general audit, use coordinates (if set) for sun calc ", - "1.5.1" => "07.12.2023 function _getftui can now process arguments (compatibility to new ftui widgets), plant check ". - "reviews SolarForecast widget files ", - "1.5.0" => "05.12.2023 new getter ftuiFramefiles ", - "1.4.3" => "03.12.2023 hidden set or attr commands in user specific header area when called by 'get ... html' ". - "plantConfig: check module update in repo ", - "1.4.2" => "02.12.2023 ___getFWwidget: codechange ___getFWwidget using __widgetFallback function ", - "1.4.1" => "01.12.2023 ___getFWwidget: adjust for FHEMWEB feature forum:#136019 ", - "1.4.0" => "29.11.2023 graphicHeaderOwnspec: can manage attr / sets of other devs by @ ", - "1.3.0" => "27.11.2023 new Attr graphicHeaderOwnspecValForm ", - "1.2.0" => "25.11.2023 graphicHeaderOwnspec: show readings of other devs by @, Set/reset batteryTrigger ", - "1.1.3" => "24.11.2023 rename reset arguments according possible adjustable textField width ", - "1.1.2" => "20.11.2023 ctrlDebug Adjustment of column width, must have new fhemweb.js Forum:#135850 ", - "1.1.1" => "19.11.2023 graphicHeaderOwnspec: fix ignoring the last element of allsets/allattr ", - "1.1.0" => "14.11.2023 graphicHeaderOwnspec: possible add set/attr commands, new setter consumerNewPlanning ", - "1.0.10" => "31.10.2023 fix warnings, edit comref ", "0.1.0" => "09.12.2020 initial Version " ); @@ -826,13 +809,13 @@ my %hqtxt = ( # H wexso => { EN => qq{switched externally}, DE => qq{von extern umgeschaltet} }, strok => { EN => qq{Congratulations 😊, the system configuration is error-free. Please note any information ().}, - DE => qq{Herzlichen Glückwunsch 😊, die Anlagenkonfiguration ist fehlerfrei. Bitte eventuelle Hinweise () beachten.} }, + DE => qq{Herzlichen Glückwunsch 😊, die Anlagenkonfiguration ist fehlerfrei. Bitte eventuelle Hinweise () beachten.} }, strwn => { EN => qq{Looks quite good 😐, the system configuration is basically OK. Please note the warnings ().}, - DE => qq{Sieht ganz gut aus 😐, die Anlagenkonfiguration ist prinzipiell in Ordnung. Bitte beachten Sie die Warnungen ().} }, + DE => qq{Sieht ganz gut aus 😐, die Anlagenkonfiguration ist prinzipiell in Ordnung. Bitte beachten Sie die Warnungen ().} }, strnok => { EN => qq{Oh no 🙁, the system configuration is incorrect. Please check the settings and notes!}, - DE => qq{Oh nein 😢, die Anlagenkonfiguration ist fehlerhaft. Bitte überprüfen Sie die Einstellungen und Hinweise!} }, - pstate => { EN => qq{Planning status: 
Info: 
On: 
Off: 
Remaining lock time:  seconds}, - DE => qq{Planungsstatus: 
Info: 
Ein: 
Aus: 
verbleibende Sperrzeit:  Sekunden} }, + DE => qq{Oh nein 😢, die Anlagenkonfiguration ist fehlerhaft. Bitte überprüfen Sie die Einstellungen und Hinweise!} }, + pstate => { EN => qq{Planning status: 
Info: 
Mode: 
On: 
Off: 
Remaining lock time:  seconds}, + DE => qq{Planungsstatus: 
Info: 
Modus: 
Ein: 
Aus: 
verbleibende Sperrzeit:  Sekunden} }, ); my %htitles = ( # Hash Hilfetexte (Mouse Over) @@ -928,8 +911,8 @@ my %htitles = ( DE => qq{Perl Modul AI::DecisionTree ist nicht vorhanden} }, dumtxt => { EN => qq{Consumption that cannot be allocated to registered consumers}, DE => qq{Verbrauch der den registrierten Verbrauchern nicht zugeordnet werden kann} }, - pstate => { EN => qq{Planning status: \nInfo: \n\nOn: \nOff: \nRemaining lock time:  seconds}, - DE => qq{Planungsstatus: \nInfo: \n\nEin: \nAus: \nverbleibende Sperrzeit:  Sekunden} }, + pstate => { EN => qq{Planning status: \nInfo: \n\nMode: \nOn: \nOff: \nRemaining lock time:  seconds}, + DE => qq{Planungsstatus: \nInfo: \n\nModus: \nEin: \nAus: \nverbleibende Sperrzeit:  Sekunden} }, ainuse => { EN => qq{AI Perl module is installed, but the AI support is not used.\nRun 'set plantConfiguration check' for hints.}, DE => qq{KI Perl Modul ist installiert, aber die KI Unterstützung wird nicht verwendet.\nPrüfen sie 'set plantConfiguration check' für Hinweise.} }, arsrad2o => { EN => qq{API query successful but the radiation values are outdated.\nCheck the plant with 'set plantConfiguration check'.}, @@ -10030,7 +10013,7 @@ sub _manageConsumerData { delete $data{$type}{$name}{consumers}{$c}{avgenergy}; } - $data{$type}{$name}{consumers}{$c}{runtimeAvgDay} = sprintf "%.2f", (($runhours / $dnum) * 60); # Durchschnittslaufzeit am Tag in Minuten + $data{$type}{$name}{consumers}{$c}{runtimeAvgDay} = sprintf "%.2f", (($runhours / $dnum) * 60); # Durchschnittslaufzeit am Tag in Minuten } ## Consumer Schaltstatus und Schaltzeit für Readings ermitteln @@ -10042,7 +10025,7 @@ sub _manageConsumerData { $data{$type}{$name}{consumers}{$c}{state} = $costate; my ($pstate,$starttime,$stoptime,$supplmnt) = __getPlanningStateAndTimes ($paref); my ($iilt,$rlt) = isInLocktime ($paref); # Sperrzeit Status ermitteln - my $mode = ConsumerVal ($hash, $c, 'mode', 'can'); + my $mode = getConsumerPlanningMode ($hash, $c); # Planungsmode 'can' oder 'must' my $constate = "name='$alias' state='$costate'"; $constate .= " mode='$mode' planningstate='$pstate'"; $constate .= " remainLockTime='$rlt'" if($rlt); @@ -10508,7 +10491,7 @@ sub ___doPlanning { $paref->{mintime} = $mintime; $paref->{stopdiff} = $stopdiff; - if ($mode eq "can") { # Verbraucher kann geplant werden + if ($mode eq 'can') { # Verbraucher kann geplant werden if ($debug =~ /consumerPlanning/x) { for my $m (sort{$a<=>$b} keys %mtimes) { Log3 ($name, 1, qq{$name DEBUG> consumer "$c" - surplus expected: $mtimes{$m}{spexp}, }. @@ -11030,7 +11013,7 @@ sub ___switchConsumerOn { debugLog ($paref, "consumerSwitching${c}", qq{Consumer switch enable by battery state: $enable}); - if ($mode eq "can" && !$enable) { # Batterieladung - keine Verbraucher "Einschalten" Freigabe + if ($mode eq 'can' && !$enable) { # Batterieladung - keine Verbraucher "Einschalten" Freigabe $paref->{ps} = "priority charging battery"; ___setConsumerPlanningState ($paref); @@ -13850,10 +13833,12 @@ sub _graphicConsumerLegend { my ($planstate,$starttime,$stoptime,$supplmnt) = __getPlanningStateAndTimes ($paref); $supplmnt = '-' if(!$supplmnt); my ($iilt,$rlt) = isInLocktime ($paref); # Sperrzeit Status ermitteln - + my $mode = getConsumerPlanningMode ($hash, $c); # Planungsmode 'can' oder 'must' + my $pstate = $caicon eq "times" ? $hqtxt{pstate}{$lang} : $htitles{pstate}{$lang}; my $surplusinfo = isConsRcmd($hash, $c) ? $htitles{splus}{$lang} : $htitles{nosplus}{$lang}; + $pstate =~ s//$mode/xs; $pstate =~ s//$planstate/xs; $pstate =~ s//$supplmnt/xs; $pstate =~ s//$starttime/xs;