76_SolarForecast - Informationen/Ideen zu Weiterentwicklung und Support

Begonnen von DS_Starter, 11 Februar 2024, 14:11:00

Vorheriges Thema - Nächstes Thema

der-Lolo

Hilft Dir das hier?

$Id: 76_SolarForecast.pm 29707 2025-02-28 13:02:23Z DS_Starter $

komplett zurück möchte ich nicht.

DS_Starter

#3721
Ja, das ist die V 1.46.5.
Ich habe dir die Version hier angehängt falls du sie bei dir wieder einspielen möchtest. Sie muß nur entsprechend umbenannt werden.

Die V ist nun schon wieder ein halbes Jahr alt. Seitdem ist wirklich schon viel passiert und so wundert es mich nicht dass es mit der aktuellen Version nicht reibungslos zusammenpasst.

Es hat sich in den Invertedefinitionen (Attributen) allerhand getan und noch vieles mehr.
Sofern du kein Problem mit den Warnungen und Fehlermeldungen bzw. der aktuell nicht passenden Flowgrafik hast kann man in Ruhe die Attribute und Einstellungen anpassen. Dauert dann dann etwas.

Ansonsten gehe erstmal auf die alte Version zurück und plane das Update wenn es zeitlich passt. Es bringt nichts es nun über das Knie zu brechen.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo

Du kannst mir nicht sagen welche Attribute und einstellungen angepasst werden müssen?

DS_Starter

Doch, aber das braucht Zeit. Weil eben viel passiert ist.

Als erstes müsstest du die setupInverterDevXX aufrufen und setzen. Da gibt es ein paar neue Keys -> Commandref beachten.
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Hier ist die komplette Changelist seit deiner eingesetzen V.
Überall wo Attribute enthalten sind, wären die zu kontrollieren:

  "1.57.1" => "10.08.2025  fix warning, Forum: https://forum.fhem.de/index.php?msg=1346055 ",
  "1.57.0" => "08.08.2025  new option attr graphicControl->scaleMode=X:staple ",
  "1.56.0" => "07.08.2025  set MAXINVERTER to 5 ",
  "1.55.0" => "06.08.2025  DWD-Weather and DWD-Radiation device new minimum value of attr 'forecastDays' is 2 ".
                           "checkPlantConfig: check forecastDays of new minimum value ".
                           "___createOpenMeteoURL: set forecast_hours=72, bugfix of V 1.54.7 ".
                           "Nexthours: max 72 hours available but not more than 3 days ",                           
  "1.54.7" => "01.08.2025  _transferAPIRadiationValues: Extension of Nexthours content up to 48 hours into the future ".
                           "attr graphicBeamHeightLevelX is obsolete -> use graphicControl instead ".
                           "attr graphicControl new key beamHeightlevel ",
  "1.54.6" => "29.07.2025  _graphicConsumerLegend: show surplus method and result in consumer legend hoover ",
  "1.54.5" => "24.07.2025  isAddSwitchOnCond/isAddSwitchOffCond: change debug info ",
  "1.54.4" => "22.07.2025  replace length by new sub strlength, Consumer attr new key 'aliasshort', change code of medianArray ".
                           "medianArray: can optional use newest 3..20 elements, avgArray: use the newest elements if num is set ".
                           "Debug consumerSwitching: print out info message of compare operation, remove attr graphicShowDiff ".
                           "store surpmeth calc result in key surpmethResult in Consumer master record, __readFileMessages: refactored code ".
                           "surpmeth: use average[_2..20] instead of numeric values 2.20 only ",
  "1.54.3" => "19.07.2025  ctrlDebug: add collectData_long ",
  "1.54.2" => "18.07.2025  _createSummaries: add debug infos ",
  "1.54.1" => "08.07.2025  userExit: new coding, __createReduceIcon: fix Wide character in syswrite - https://forum.fhem.de/index.php?msg=1344368 ".
                           "_setattrKeyVal: optimize function between execute from FHEMWEB and Commandline ".
                           "_beamGraphicFirstHour, _beamGraphicRemainingHours: decimal places according to the setting of the energy unit ".
                           "___switchConsumerOn: Switch on consumers even if they are not interruptible after state interrupted|interrupting|continuing ".
                           "increase MAXCONSUMER up to 20 ",
  "1.54.0" => "05.07.2025  edit commandref, ___areaFactorTrack: important bugfix in calc of direct area factor for DWD use ",
  "1.53.3" => "04.07.2025  Change of the correction factor calculation to the ratio of real production and the API raw forecast ",
  "1.53.2" => "03.07.2025  graphicControl->showDiff can be set separately for each level ".
                           "setupInverterDevXX: Check that there are no commas with spaces before and after (strings) ",
  "1.53.1" => "30.06.2025  add utf8 smileys, fix Perl warning uninitialized value \$color ",
  "1.53.0" => "28.06.2025  new battery style (batcontainer), new key setupBatteryDevXX->label, new reading Battery_ChargeUnrestricted_XX ".
                           "attribute graphicShowDiff replaced by graphicControl->showDiff ".
                           "check local coordinates are set in global device and fill message system if failure ".
   "consumer Attr key noshow new possible value '9', _beamGraphic: scaleMode log double reduce Discount of z3 ".
                           "new key plantControl->reductionState, _calcDataEveryFullHour and subs: changeover aln to pvrlvd ".
                           "_getaiDecTree: reduce character size of aiRawData, set ... reset: pvCorrection deletes hidden readings too ",
  "1.52.18"=> "23.06.2025  ctrlSpecialReadings: new option conForecastComingNight, fix last hour of remainingSurplsHrsMinPwrBat_ ".
                           "some more minor fixes ",
  "1.52.17"=> "22.06.2025  remainingSurplsHrsMinPwrBat_: calculate with two decimal places ",
  "1.52.16"=> "21.06.2025  _genSpecialReadings: new option remainingSurplsHrsMinPwrBat_XX ",
  "1.52.15"=> "20.06.2025  ctrlBatSocManagementXX->loadAbort expanded by unlock condition ",
  "1.52.14"=> "18.06.2025  _beamGraphic: rework linear and logarithmic normalization of beam height ",
  "1.52.13"=> "17.06.2025  _genSpecialReadings: new option remainingHrsWoChargeRcmdBat_XX, edit comref ",
  "1.52.12"=> "15.06.2025  readCacheFile: option aitrained -> Code optimized for saving memory ".
                           "fillupMessageSystem: prevent Icon failore if SV contain spaces ".
                           "setupBatteryDevXX: 'dyn' -> Battery color can be dynamically set depending from SoC value ",
  "1.52.11"=> "03.06.2025  _genSpecialReadings: new option todayNotOwnerConsumption ",
  "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 ",
  "1.52.6" => "27.05.2025  verbose 3 for consumer switch log ",
  "1.52.5" => "25.05.2025  edit commandref, _batChargeMgmt: add load management time slot, ctrlBatSocManagementXX: new key lcSlot ".
                           "check attribute values for prohibited occurrence [...] Forum: https://forum.fhem.de/index.php?msg=1342147 ".
                           "_flowGraphic: bugfix chain style in case of logical on/off Forum: https://forum.fhem.de/index.php?msg=1342122 ".
                           "_attrBatteryDev: more checks (cap) ",
  "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 ".
                           "correction of inverter x-start, ".
                           "isConsumerLogOn: bugfix Threshold value detection if threshold value specification above 1% of power ",
  "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 ".
                           "flowGraphicControl: new key showGenerators, code cleaning ",
  "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 ",
  "1.51.6" => "30.04.2025  graphicBeamXContent: change batsocforecast_XX to batsocCombi_XX, new options batsocForecast_XX, batsocReal_XX ".
                           "new Paramaeter socprogwhsum, socwhsum in pvHisory & NextHours ",
  "1.51.5" => "28.04.2025  attr transformed: graphicBeamWidth, graphicHourCount, graphicEnergyUnit, graphicSpaceSize ".
                           "graphicHeaderDetail, graphicHourStyle, graphicLayoutType ".
                           "graphicControl->beamWidth, graphicControl->hourCount, graphicControl->energyUnit, graphicControl->spaceSize ".
                           "graphicControl->headerDetail, graphicControl->hourStyle, graphicControl->layoutType ",
  "1.51.4" => "27.04.2025  avoid warnings uninitialized value \$FW_ME, \$FW_subdir in line 14434 ".
                           "bugfix in attr .*Control, fix 'ERROR deleting file' if no consumers are registered ".
                           "save batprogsocXX to pvHistory, prepared for new Attr graphicControl ",
  "1.51.3" => "22.04.2025  change battery text to 'load if above feed-in limit' ".
                           "transform set setupStringAzimuth, setupStringDeclination to attr setupStringAzimuth, setupStringDeclination ",
  "1.51.2" => "21.04.2025  Attributes obsolet: graphicHeaderShow replaced by graphicSelect, Value 'none' of consumerControl->showLegend deleted ",
  "1.51.1" => "20.04.2025  consumer: interruptable, swoncond, swoffcond, spignorecond can be perl code enclosed by {..} ".
                           "check key is valid in plantControl, aiControl, flowGraphicControl, consumerControl, setupMeterDev ".
                           "setupOtherProducer, setupInverterDev, setupBatteryDev, consumer ".
                           "writeCacheToFile: bugfix - cache File on OS is deleted if cache is empty ".
                           "new Setter attrKeyVal, graphicEnergyUnit: fix display of 'diff' ",
  "1.51.0" => "16.04.2025  obsolete Attr deleted: affectBatteryPreferredCharge, affectConsForecastInPlanning, ctrlShowLink, ctrlBackupFilesKeep ".
                           "affectConsForecastIdentWeekdays, affectConsForecastLastDays, ctrlInterval, ctrlGenPVdeviation ".
                           "affectSolCastPercentile, ctrlSolCastAPIoptimizeReq, consumerAdviceIcon, consumerLink, consumerLegend ",
  "1.50.4" => "16.04.2025  Consumer Strokes: fix val2pahColor, new key flowGraphicControl->strokeCmrRedColLimit ".
                           "__getopenMeteoData: fix get calclated call interval, new Setter cycleInterval ".
                           "normBeamWidth: decouple content batsocCombi_, energycosts, feedincome from the conversion Wh -> kWh ".
                           "___getFWwidget: textField-long -> textFieldNL-long ",
  "1.50.3" => "12.04.2025  __calcPVestimates: Fix missing limitation for strings if more than one string is assigned to an inverter ".
                           "code change in _attrInverterStrings, _attrStringPeak, checkPlantConfig: improved string check ",
  "1.50.2" => "11.04.2025  take inverter cap into account if no strings key is set, ctrlSpecialReadings: new option tomorrowConsumptionForecast ".
                           "plant check: print out module version in header, decouple graphicBeamHeightLevelX from each other ",
  "1.50.1" => "07.04.2025  new pvCorrectionFactor_Auto option 'on_complex_api_ai' to use average of AI + API forecast if AI Hit ".
                           "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, _batChargeMgmt: change loading release ".
                           "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 ".
                           "attr ctrlInterval replaced by plantControl->cycleInterval ".
                           "attr ctrlGenPVdeviation replaced by plantControl->genPVdeviation ".
                           "setupBatteryDevXX: new keys pinmax, poutmax ",
  "1.49.4" => "28.03.2025  _batChargeMgmt: revert Loading release changes of V 1.49.0, _transferAPIRadiationValues: fix sunalt for next day ".
                           "Home Node: Mouse over show Autarky Rate, flowGraphicControl: new key strokeconsumerdyncol ",
  "1.49.3" => "27.03.2025  flowGraphicControl: new key homenodedyncol ",
  "1.49.2" => "26.03.2025  ___enableSwitchByBatPrioCharge: fix usage of rusulting SOC of all batteries ",
  "1.49.1" => "25.03.2025  fix batteryPreferredCharge: https://forum.fhem.de/index.php?msg=1337802, Attr ctrlBackupFilesKeep is ".
                           "obsolete and replaced by plantControl->backupFilesKeep ",
  "1.49.0" => "23.03.2025  _listDataPoolApiData: fix warning item1, new option OpenMeteoDWD_D2-API with preparation for satellite support ".
                           "add Attr graphicBeamHeightLevel3, Compatibility of Rad1h data between DWD and OpenMeteo established ".
                           "set reset aiData deletes raw data also, _transferAPIRadiationValues: AI PV estimate limited to inverter capacity summary ".
                           "__calcPVestimates: pv power summary of all strings connected to inverter limited to inverter capacity summary ".
                           "_batChargeMgmt: fix calc if more than one batteries are installed, set aiDecTree: new option rawDataGHIreplace ".
                           "new Attr plantControl with keys feedinPowerLimit, batteryPreferredCharge, consForecastInPlanning ".
                           "Attr affectBatteryPreferredCharge, affectConsForecastInPlanning, ctrlShowLink are obsolete ",
  "1.48.0" => "14.03.2025  edit commandref, add graphicBeam layer 5 and 6, attr ctrlAIdataStorageDuration, ctrlAIshiftTrainStart removed ",
  "1.47.3" => "11.03.2025  adjust weather_ids and management of significant weather, _calcDataEveryFullHour: change attrInvChangedTs Management ".
                           "split __batteryOnBeam into _beamFillupBatValues and itself, expand bat key 'show' by top, bottom ".
                           "__getDWDSolarData: use always diffuse radiation as part of global radiation ",
  "1.47.2" => "09.03.2025  __getDWDSolarData: change calc when af == 0, aiAddInstance: add weatherid property ".
                           "overwrite wcc = 0 if wid = 0 -> give wid priority over wcc ",
  "1.47.1" => "07.03.2025  __substituteIcon: consider Tooltip content if ctrlBatSocManagementXX is set ",
  "1.47.0" => "05.03.2025  aiInit: change AI init sequence, use Random Forest with Ensemble algorithm, use Scalar::Util ".
                           "_beamGraphic.*: change decimal places für battery SoC, set aiDecTree: change addInstances to addInstAndTrain ".
                           "addInstAndTrain is generally executed non-blocking, _batChargeMgmt: use effective surplus for soc forecast, ".
                           "consider !ctrlBatSocManagement for permanent Bat loading release, _transferBatteryValues: change verbose 2 -> 3 ".
                           "new attr aiControl, attr ctrlAIdataStorageDuration, ctrlAIshiftTrainStart are obsolete ",
  "1.46.5" => "28.02.2025  new ctrlSpecialReadings  key todayConsumptionForecastDay ",
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

der-Lolo


DS_Starter

Dann exclude das Modul erstmal von Updates (global->exclude_from_update) und führe das Update erst dann durch wenn du dich vorher auf etwas Zeit und Korrekturmaßnahmen eingestellt hast.
Wie gesagt, wenn du regelmäßig die Updates mitgehst, passiert soetwas nicht weil ich die Umsetzungen wenn möglich immer automatisch vornehme.

LG,
Heiko
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

#3727
@Gerd, Hugo + @all,

in meinem contrib liegt die V 1.57.2.

Das Modul wird das Rücksetzen eines Meter-Tageszählers auch dann verkraften, wenn der Zähler nicht auf 0, sondern einen anderen Wert (wie 100Wh bei Hugo) zurückgesetzt wird.
Für den Test schreibe ich zunächst mit verbose 2 aus:

WARNING - '<Zähler>' - total Grid consumption '<Wert>' is lower than the day Init value '<Wert>'. The initialization for the day was performed again. 
Weiterhin wird in den ConsumerXX->etotal Attr die Threshold Angabe validiert sofern man sie setzt.


LG,
Heiko
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

300P

Download Test-V aus Contrib.... aber ich kann nicht viel testen
->> "Isch habe leider keine Consumer der so agiert" .... ;)
Gruß
300P

FHEM 6.4|RPi|SMAEM|SMAInverter|SolarForecast|DbLog|DbRep|MariaDB|Buderus-MQTT_EMS|
Fritzbox|fhempy|JsonMod|HTTPMOD|Modbus ser+TCP|ESP32-Digitizer-AI_on_the_Edge|ESP32CAM usw.

DS_Starter

Kannst ja einfach mal bei einem Consumer bei etotal versuchen einen Threshold von z.B. 'acht' anzugeben. Oder als Unit 'kwWh'.  ;)
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Max_Meyer

Zitat von: DS_Starter am 13 August 2025, 19:55:43Weiterhin wird in den ConsumerXX->etotal Attr die Threshold Angabe validiert sofern man sie setzt.
Hallo Heiko, Hallo 300P,
habe die Warnung bei falsch angelegten etotal bei consumer geprüft
Bei Neuanlage bzw. Wiederspeichern des Attr. wird die Fehlermeldung ausgegeben --> OK
wenn Consumer allerdings schon falsch angelegt sind, dann kommt keine Meldung und logischerweise die Perl Warnung im LOG --> ich bin nicht sicher ob das abgetestet werden muss - aber für den Fall dass es noch jemanden gibt der die Consumer so falsch angelegt hat (und nicht das LOG checkt) bleibt der Fehler ewig unentdeckt :)
Gruß Gerd

DS_Starter

#3731
Ja, das ist richtig. Alle checks werden bei der Anlage der Attribute durchgeführt.
Ich könnte auch weitere Checks zur Laufzeit vornehmen, jedoch muß auch ein wenig Maß halten um nicht mit zuviel ständige Checks das System zu bremsen.

Sagen wir mal so ... der User wird ja merken wenn etwas nicht so läuft wie es soll oder Meldungen kommen, hast du ha auch. Vertrauen wir mal darauf dass man ab und zu ins Log schaut.  ;)


Ach so .... die Laufzeitprüfung wäre auch nur eine Logausgabe. Die kommt ja sowieso. Ok. der Text wäre deulicher wo es hakt, aber dafür gibt es uns.  :)
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Max_Meyer

Zitat von: DS_Starter am 13 August 2025, 21:24:43Ach so .... die Laufzeitprüfung wäre auch nur eine Logausgabe. Die kommt ja sowieso. Ok. der Text wäre deulicher wo es hakt, aber dafür gibt es uns.  :)


12.000er Beitrag!!
Gratulation :)