diff --git a/fhem/CHANGED b/fhem/CHANGED index 68af29db1..2abceb852 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 + - feature: 76_SolarForecast: Version 1.52.4 - feature: 98_weekprofile: attribute extraClientModules to support further modules with attribute weekprofile - feature: 76_SolarForecast: graphicControl keys beamPaddingBottom/Top diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index b0062e90c..a6b93ba95 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -160,6 +160,9 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.52.4" => "20.05.2025 commandref edited, setupInverterDevXX: change pv to pvOut, new key pvIn ". + "fix devision by zero -Forum: https://forum.fhem.de/index.php?msg=1341884, __calcFcQuality: minor code change ". + "ctrlSpecialReadings: new Topic BatWeightedTotalSOC ", "1.52.3" => "17.05.2025 _transferInverterValues: new property itype, graphicControl: new keys beamPaddingBottom, beamPaddingTop ". " setter attrKeyVal has dorp down list of all composite attributes ", "1.52.2" => "14.05.2025 _flowGraphic: Discharge the battery directly into the household grid if no battery inverter is defined ". @@ -168,9 +171,9 @@ my %vNotesIntern = ( "1.52.1" => "13.05.2025 _flowGraphic: hide inverter node if only one PV inverter and no battery is used ", "1.52.0" => "11.05.2025 An inverter string must not be named 'none', setupInverterDevXX: 'strings=none' is added ". "valInverter: add isource, new keys: ac2dc, dc2ac, _flowGraphic: add battery inverter type ". - "and extensive adjustments, new sub removeMinMaxArray, ___getFWwidget: bugfix with state-Reading ". + "and extensive adjustments, new sub removeMinMaxArray, ___getFWwidget: bugfix with state-Reading ". "flowGraphicControl: new key showGenerators, code cleaning ", - "1.51.8" => "02.05.2025 _specialActivities: delete overhanging days at the change of month ". + "1.51.8" => "02.05.2025 _specialActivities: delete overhanging days at the change of month ". "Bugfix: https://forum.fhem.de/index.php?msg=1340666 ", "1.51.7" => "01.05.2025 __createAdditionalEvents: optimized for SVG 'steps', new key plantControl->genPVforecastsToEvent ". "aiAddRawData: add gcons, _listDataPoolCircular: add gcons_a ", @@ -206,9 +209,9 @@ my %vNotesIntern = ( "some code changes ", "1.50.0" => "05.04.2025 changes V 1.49.1 - 1.49.6 as new major release ", "1.49.6" => "05.04.2025 some code changes, _flowGraphic: position of home text element, new attr consumerControl->dummyIcon, _batChargeRecmd: change loading release ". - "attr consumerAdviceIcon replaced by consumerControl->adviceIcon ". - "attr consumerLegend replaced by consumerControl->showLegend ". - "attr consumerLink replaced by consumerControl->detailLink ", + "attr consumerAdviceIcon replaced by consumerControl->adviceIcon ". + "attr consumerLegend replaced by consumerControl->showLegend ". + "attr consumerLink replaced by consumerControl->detailLink ", "1.49.5" => "29.03.2025 some code changes, Attr affectSolCastPercentile, ctrlSolCastAPIoptimizeReq are obsolete -> SolCast optimze requests is default now ". "attr affectConsForecastIdentWeekdays replaced by plantControl->consForecastIdentWeekdays ". "attr affectConsForecastLastDays replaced by plantControl->consForecastLastDays ". @@ -502,7 +505,7 @@ use constant { INPUTROWSHIFT => 150, # Flußgrafik: Verschiebung bei Anzeige Solarzellen/Input-Zeile PRDCRROWSHIFT => 100, # Flußgrafik: Verschiebung bei Anzeige Producer/Inverter-Zeile PRODICONDEF => 'sani_garden_pump', # default Producer-Icon - GENICONDEF => 'solar', # default Generator (z.B. Strings) Icon + GENICONDEF => 'solar', # default Generator (z.B. Strings) Icon GENCOLACT => 'darkorange', # default Generator-Icon aktiv Färbung GENCOLINACT => 'grey', # default Generator-Icon inaktiv Färbung CICONDEF => 'light_light_dim_100', # default Consumer-Icon @@ -519,7 +522,7 @@ use constant { MOONICONDEF => 2, # default Mond-Phase (aus %hmoon) MOONCOLDEF => 'lightblue', # default Mond Färbung ACTCOLDEF => 'orange', # default Färbung Icon wenn aktiv - ACTCOLINVBAT => '#00e000', # default Färbung aktiver Batterie-Wechselrichter ohne Solarzellen + ACTCOLINVBAT => '#00e000', # default Färbung aktiver Batterie-Wechselrichter ohne Solarzellen INACTCOLDEF => 'grey', # default Färbung Icon wenn inaktiv LOCALE_TIME => setlocale (POSIX::LC_TIME), # installierte locale abfragen @@ -602,7 +605,7 @@ my @gsopt = qw ( both forecast_noCons forecast_noHead_noCons none - ); + ); # Anlagenkonfiguration: maßgebliche Readings my @rconfigs = qw( pvCorrectionFactor_Auto batteryTrigger @@ -610,17 +613,17 @@ my @rconfigs = qw( pvCorrectionFactor_Auto energyH4Trigger ); # Anlagenkonfiguration: maßgebliche Attribute -my @aconfigs = qw( aiControl +my @aconfigs = qw( aiControl consumerControl graphicControl - flowGraphicControl + flowGraphicControl plantControl - ctrlConsRecommendReadings - ctrlLanguage - ctrlNextDayForecastReadings + ctrlConsRecommendReadings + ctrlLanguage + ctrlNextDayForecastReadings ctrlNextHoursSoCForecastReadings ctrlSolCastAPImaxReq - ctrlSpecialReadings + ctrlSpecialReadings ctrlUserExitFn disable graphicBeamHeightLevel1 graphicBeamHeightLevel2 graphicBeamHeightLevel3 @@ -767,7 +770,7 @@ my %hattr = ( # H $prn = sprintf "%02d", $prn; $hattr{'setupOtherProducer'.$prn}{fn} = \&_attrProducerDev; } - + my $hcompoattr = { # Composit-Attribute aiControl => '', consumerControl => '', @@ -779,28 +782,28 @@ my $hcompoattr = { # C setupStringDeclination => '', setupStringPeak => '', }; - + for my $cn (1..MAXCONSUMER) { $cn = sprintf "%02d", $cn; - $hcompoattr->{'consumer'.${cn}} = ''; + $hcompoattr->{'consumer'.${cn}} = ''; } for my $bn (1..MAXBATTERIES) { $bn = sprintf "%02d", $bn; - $hcompoattr->{'setupBatteryDev'.${bn}} = ''; + $hcompoattr->{'setupBatteryDev'.${bn}} = ''; $hcompoattr->{'ctrlBatSocManagement'.${bn}} = ''; } for my $in (1..MAXINVERTER) { $in = sprintf "%02d", $in; - $hcompoattr->{'setupInverterDev'.${in}} = ''; + $hcompoattr->{'setupInverterDev'.${in}} = ''; } for my $pn (1..MAXPRODUCER) { $pn = sprintf "%02d", $pn; - $hcompoattr->{'setupOtherProducer'.${pn}} = ''; + $hcompoattr->{'setupOtherProducer'.${pn}} = ''; } - + my @hcompoattrkeys = keys %{$hcompoattr}; # Array der Schlüssel aller Composit-Attribute my %htr = ( # Hash even/odd für
| pv | A reading that provides the current power from PV generation that is supplied to the domestic or pblic grid. |
| A positive numerical value is expected. | |
| When activated as a battery inverter without solar cells, this key cannot be set. | |
| ac2dc | A reading that indicates the current AC->DC power (house network to battery) as a positive value. |
| The key can only be set for battery inverters. | |
| etotal | The Reading which provides the total PV energy generated (a steadily increasing counter). |
| If the reading violates the specification of a continuously rising counter, | |
| SolarForecast handles this error and reports the situation by means of a log message. | |
| The key cannot be set for battery inverters without solar cells. | |
| Einheit | the respective unit (W,kW,Wh,kWh) |
| capacity | Rated power of the inverter according to data sheet, i.e. max. possible output in Watts |
| strings | Comma-separated list of the strings assigned to the inverter (optional). The string names |
| are defined in the setupInverterStrings attribute. | |
| If 'strings' is not specified, all defined string names are assigned to the inverter. | |
| With ‘strings=none’, no strings are assigned to the inverter and it is assumed that | |
| this inverter is powered by an existing battery instead of PV modeules (battery inverter). | |
| feed | Defines special properties of the device's energy supply (optional). |
| If the key is not set, the device feeds the PV energy into the house's AC grid. | |
| bat - the solar charger type is activated. Any surplus is fed to the inverter node/house grid. | |
| grid - the energy is fed exclusively into the public grid | |
| limit | Defines any active power limitation in % (optional). |
| icon | Icon for displaying the inverter in the flow chart (optional), otherwise standards are used. |
| <active> - Icon and, if applicable, color for activity or PV generation | |
| <inactive> - Icon and possibly color for inactivity | |
| asynchron | Data collection mode according to the plantControl->cycleInterval setting (synchronous) or additionally by |
| event processing (asynchronous). (optional) | |
| 0 - no data collection after receiving an event from the device (default) | |
| 1 - trigger a data collection when an event is received from the device | |
| strings | Comma-separated list of the strings assigned to the inverter (optional). The string names |
| are defined in the setupInverterStrings attribute. | |
| If 'strings' is not specified, all defined string names are assigned to the inverter. | |
| With 'strings=none', no strings are assigned to the inverter and the inverter type | |
| battery inverter is activated. | |
| feed | Defines special properties of the device's energy supply (optional). |
| If the key is not set, the device feeds the PV energy into the house's AC grid. | |
| bat - the solar charger type is activated. Any surplus is fed to the inverter node/house grid. | |
| grid - the energy is fed exclusively into the public grid | |
| capacity | Rated power of the inverter according to data sheet, i.e. max. possible output in Watts |
| limit | Defines any active power limitation in % (optional). |
| icon | Icon for displaying the inverter in the flow chart (optional), otherwise standards are used. |
| <active> - Icon and, if applicable, color for activity or PV generation | |
| <inactive> - Icon and possibly color for inactivity | |
| asynchron | Data collection mode according to the plantControl->cycleInterval setting (synchronous) or additionally by |
| event processing (asynchronous). (optional) | |
| 0 - no data collection after receiving an event from the device (default) | |
| 1 - trigger a data collection when an event is received from the device | |
| Unit | the respective unit (W,kW,Wh,kWh) |
| PV-Inverter | |
| pvIn | A reading that provides the current DC PV input power in W (sum of all connected strings). |
| A positive numerical value is expected. | |
| pvOut | A reading that provides the current power from PV generation that is supplied to the domestic or pblic grid. |
| A positive numerical value is expected. | |
| etotal | The Reading which provides the total PV energy generated (a steadily increasing counter). |
| If the reading violates the specification of a continuously rising counter, | |
| SolarForecast handles this error and reports the situation by means of a log message. | |
| Solar charger | |
| pvIn | A reading that provides the current DC PV input power in W (sum of all connected strings). |
| A positive numerical value is expected. | |
| pvOut | A reading that provides the current power from PV generation that is supplied to the battery(ies) or to a battery inverter. |
| A positive numerical value is expected. | |
| etotal | The Reading which provides the total PV energy generated (a steadily increasing counter). |
| If the reading violates the specification of a continuously rising counter, | |
| SolarForecast handles this error and reports the situation by means of a log message. | |
| Battery inverter | |
| ac2dc | A reading that indicates the current AC->DC power (house network to battery) as a positive value. |
| The key can only be set for battery inverters. | |
| dc2ac | A reading that indicates the current DC->AC power (battery/solar charger to the household grid) as a positive value. |
| The key can only be set for battery inverters. | |
| pv | Ein Reading welches die aktuelle Leistung aus PV-Erzeugung, die an das Hausnetz oder öffentliche Netz |
| geliefert wird, bereitstellt. Es wird ein ein positiver numerischer Wert erwartet. | |
| Bei Aktivierung als Batterie-Wechselrichter ohne Solarzellen kann dieser Schlüssel nicht gesetzt werden. | |
| ac2dc | Ein Reading, das die aktuelle AC->DC-Leistung (Hausnetz zur Batterie) als positiven Wert angibt. |
| Der Schlüssel kann nur für Batterie-Wechselrichter gesetzt werden. | |
| dc2ac | Ein Reading, das die aktuelle DC->AC-Leistung (Batterie / Solar-Ladegerät zum Hausnetz) als positiven Wert angibt. |
| Der Schlüssel kann nur für Batterie-Wechselrichter gesetzt werden. | |
| etotal | Das Reading, welches die gesamte erzeugte PV-Energie liefert (ein stetig aufsteigender Zähler). |
| Sollte des Reading die Vorgabe eines stetig aufsteigenden Zählers verletzen, behandelt | |
| SolarForecast diesen Fehler und meldet die aufgetretene Situation durch einen Logeintrag. | |
| Der Schlüssel kann für Batterie-Wechselrichter ohne Solarzellen nicht gesetzt werden. | |
| Einheit | die jeweilige Einheit (W,kW,Wh,kWh) |
| capacity | Bemessungsleistung des Wechselrichters gemäß Datenblatt, d.h. max. möglicher Output in Watt |
| strings | Komma getrennte Liste der dem Wechselrichter zugeordneten Strings (optional). Die Stringnamen |
| werden im Attribut setupInverterStrings definiert. | |
| Ist 'strings' nicht angegeben, werden alle definierten Stringnamen dem Wechselrichter zugeordnet. | |
| Mit 'strings=none' werden keine Strings dem Wechselrichter zugeordnet und es wird davon ausgegangen, dass | |
| dieser Wechselrichter von einer vorhandenen Batterie anstatt PV-Modulen gespeist wird (Batteriewechselrichter). | |
| feed | Definiert spezielle Eigenschaften der Energielieferung des Gerätes (optional). |
| Ist der Schlüssel nicht gesetzt, speist das Gerät die PV-Energie in das Wechselstromnetz des Hauses ein. | |
| bat - der Typ Solar-Ladegerät wird aktiviert. Ein Überschuß wird dem Inverterknoten/Hausnetz zugeführt. | |
| grid - die Energie wird ausschließlich in das öffentliche Netz eingespeist | |
| limit | Definiert eine eventuelle Wirkleistungsbeschränkung in % (optional). |
| icon | Icon zur Darstellung des Inverters in der Flowgrafik (optional), sonst werden Standards verwendet. |
| <aktiv> - Icon und ggf. Farbe bei Aktivität bzw. PV Erzeugung | |
| <inaktiv> - Icon und ggf. Farbe bei Inaktivität | |
| asynchron | Modus der Datensammlung entsprechend Einstellung plantControl->cycleInterval (synchron) oder |
| zusätzlich durch Eventverarbeitung (asynchron). (optional) | |
| 0 - keine Datensammlung nach Empfang eines Events des Gerätes (default) | |
| 1 - auslösen einer Datensammlung bei Empfang eines Events des Gerätes | |
| strings | Komma getrennte Liste der dem Wechselrichter zugeordneten Strings (optional). Die Stringnamen |
| werden im Attribut setupInverterStrings definiert. | |
| Ist 'strings' nicht angegeben, werden alle definierten Stringnamen dem Wechselrichter zugeordnet. | |
| Mit 'strings=none' werden dem Wechselrichter keine Strings zugeordnet und der Wechselrichtertyp | |
| Batterie-Wechselrichter wird aktiviert. | |
| feed | Definiert spezielle Eigenschaften der Energielieferung des Gerätes (optional). |
| Ist der Schlüssel nicht gesetzt, speist das Gerät die PV-Energie in das Wechselstromnetz des Hauses ein. | |
| bat - es wird ein Solar-Ladegerät aktiviert. Ein Überschuß wird dem Inverterknoten/Hausnetz zugeführt. | |
| grid - die Energie wird ausschließlich in das öffentliche Netz eingespeist | |
| capacity | Bemessungsleistung des Wechselrichters gemäß Datenblatt, d.h. max. möglicher Output in Watt |
| limit | Definiert eine eventuelle Wirkleistungsbeschränkung in % (optional). |
| icon | Icon zur Darstellung des Inverters in der Flowgrafik (optional), sonst werden Standards verwendet. |
| <aktiv> - Icon und ggf. Farbe bei Aktivität bzw. PV Erzeugung | |
| <inaktiv> - Icon und ggf. Farbe bei Inaktivität | |
| asynchron | Modus der Datensammlung entsprechend Einstellung plantControl->cycleInterval (synchron) oder |
| zusätzlich durch Eventverarbeitung (asynchron). (optional) | |
| 0 - keine Datensammlung nach Empfang eines Events des Gerätes (default) | |
| 1 - auslösen einer Datensammlung bei Empfang eines Events des Gerätes | |
| Einheit | die jeweilige Einheit (W,kW,Wh,kWh) |
| PV-Wechselrichter | |
| pvIn | Ein Reading, welches die aktuelle DC PV-Eingangsleistung in W liefert (Summe aller angeschlossenen Strings). |
| Es wird ein positiver numerischer Wert erwartet. | |
| pvOut | Ein Reading, welches die aktuelle Leistung aus PV-Erzeugung, die an das Hausnetz oder öffentliche Netz |
| geliefert wird, bereitstellt. Es wird ein positiver numerischer Wert erwartet. | |
| etotal | Das Reading, welches die gesamte erzeugte PV-Energie liefert (ein stetig aufsteigender Zähler). |
| Sollte des Reading die Vorgabe eines stetig aufsteigenden Zählers verletzen, behandelt | |
| SolarForecast diesen Fehler und meldet die aufgetretene Situation durch einen Logeintrag. | |
| Solar-Ladegerät | |
| pvIn | Ein Reading, welches die aktuelle DC PV-Eingangsleistung in W liefert (Summe aller angeschlossenen Strings). |
| Es wird ein positiver numerischer Wert erwartet. | |
| pvOut | Ein Reading welches die aktuelle Leistung aus PV-Erzeugung, die an die Batterie(n) bzw. an Batterie-Wechselrichter |
| geliefert wird, bereitstellt. Es wird ein positiver numerischer Wert erwartet. | |
| etotal | Das Reading, welches die gesamte erzeugte PV-Energie liefert (ein stetig aufsteigender Zähler). |
| Sollte des Reading die Vorgabe eines stetig aufsteigenden Zählers verletzen, behandelt | |
| SolarForecast diesen Fehler und meldet die aufgetretene Situation durch einen Logeintrag. | |
| Batterie-Wechselrichter | |
| ac2dc | Ein Reading, das die aktuelle AC->DC-Leistung (Hausnetz zur Batterie) als positiven Wert angibt. |
| Der Schlüssel kann nur für Batterie-Wechselrichter gesetzt werden. | |
| dc2ac | Ein Reading, das die aktuelle DC->AC-Leistung (Batterie / Solar-Ladegerät zum Hausnetz) als positiven Wert angibt. |
| Der Schlüssel kann nur für Batterie-Wechselrichter gesetzt werden. | |