76_SolarForecast - Informationen/Ideen zu Weiterentwicklung und Support

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

Vorheriges Thema - Nächstes Thema

DS_Starter

#1140
ZitatBist Du sicher, dass die Reihenfolge im Modul immer richtig ist, d.h. zuerst swstate ausgewertet/aktualisiert wird und dann ggf. der Schaltbefehl ausgeführt wird? Oder kann es passieren, dass da noch der alte Status verwendet wird?
Ja, allerdings ist es wichtig dass der Consumer synchron arbeitet, d.h. das Ergebnis des Schaltbefehls sofort aktualisiert und nicht zeitversetzt. Sonst sollte die Einstellung des Consumers im Attr auf "asynchron" helfen.

Genaueres sieht man mit ctrlDebug = consumerSwitchingXX.

ZitatWann beginnt die spezifizierte "locktime" zu wirken? Nach dem 1. Schaltversuch oder erst, nachdem der Verbraucher das Einschalten über swstate rückgemeldet hat? (Falls ersteres, könnte ich einfach eine "locktime" angeben, dann dürfte es zu keinem weiteren Schaltversuch kommen.)
Sie beginnt wenn der Consumer physisch "on" bzw. "off" geschaltet wurde, d.h. wenn der Regex im Key bei einem Statuswechsel swstate erfüllt wurde.

Auch das würde man mit dem ctrlDebug verfolgen können.
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

Mal nebenbei was ganz anderes:

Irgendwie "läuft" das Forum bei mir wohl nicht richtig...

Manchmal bekomme ich eine Mail für neue Beiträge und der Beitrag ist dann nicht im Forum sichtbar (wenn dann ich auf den link in der Mail drücke oder auch manuell das Forum aufrufe).🤯

Ein anderes Mal bekomme ich gar keine Mail (oder viel später erst) für neue Beiträge und sehe sie aber bevor die Mail oder der "ALARM" bei mir als User oben im Kopf angezeigt wird.😳

Das mit der Anzeige von angehängten Dateien kenn ich inzwischen ja, aber jetzt wird es bei mir irgendwie schlimmer.😴 Oder sollte es daran liegen das ich auf dem Land bin und nur mit 50MBit angeschlossen bin.🤬

Habt ihr auch solche ähnliche Problem mit dem Forum ?
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

Ja, kann bestätigen. Zumindest die teilweise fehlenden Mails bei neuen Beiträgen und die Anzeige von angehängten Dateien. Ein bestimmtes Schema konnte ich noch nicht erkennen.
Echt unschön...
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

@TheTrumpeter,
ich habe im Modul eine Logik eingebaut, die den negativen Effekt eines verzögerten Setzen des Schaltstatus in einem Consumer eliminiert.

Liegt in meinem contrib. Kannst du gern mal einsetzen und das Ergebnis kontrollieren.

LG
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

TheTrumpeter

Zitat von: DS_Starter am 07 Oktober 2024, 21:06:39Ja, allerdings ist es wichtig dass der Consumer synchron arbeitet, d.h. das Ergebnis des Schaltbefehls sofort aktualisiert und nicht zeitversetzt. Sonst sollte die Einstellung des Consumers im Attr auf "asynchron" helfen.

Genaueres sieht man mit ctrlDebug = consumerSwitchingXX.
Hm... asynchron=1 hatte ich die ganze Zeit, nur am Wochenende habe ich es mal deaktiviert, was aber keine Verbesserung brachte.

Habe die Debug-Ausgabe nun für beide Consumer aktiviert, aktuell ist consumer04 für 12 und consumer10 für 13 Uhr geplant. Für consumer10 wird die swoncond aber nicht erfüllt sein, d.h. der kommt so oder so nicht dran.
Wenn die Prognose so bleibt, sehen wir hoffentlich zu Mittag was sich warum tut.


Zitat von: DS_Starter am 07 Oktober 2024, 22:20:21ich habe im Modul eine Logik eingebaut, die den negativen Effekt eines verzögerten Setzen des Schaltstatus in einem Consumer eliminiert.
Danke. Ich warte noch die heutigen Debug-Ausgaben ab. Eventuell liegt die Ursache ja woanders vergraben, wenngleich ich es mir nicht vorstellen kann.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

TheTrumpeter

Zitat von: TheTrumpeter am 08 Oktober 2024, 06:56:16Danke. Ich warte noch die heutigen Debug-Ausgaben ab. Eventuell liegt die Ursache ja woanders vergraben, wenngleich ich es mir nicht vorstellen kann.
So...

Hier der Debug-Output von SolarForecast:
2024.10.08 11:59:49 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 213 W, nompower: 3500, surplus: 3515 W, planstate: planned: 2024-10-08 12:00:00 - 2024-10-08 13:00:00, starttime: 08.10.2024 12:00:00
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - current planning state: planned
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate: off
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate: off

2024.10.08 11:59:49 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 213 W, nompower: 2500, surplus: 3515 W, planstate: planned: 2024-10-08 14:00:00 - 2024-10-08 15:00:00, starttime: 08.10.2024 14:00:00
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 0, on-command: pOpMode manual
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate: off
2024.10.08 11:59:49 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate: off

2024.10.08 12:00:04 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 219 W, nompower: 3500, surplus: 3542 W, planstate: planned: 2024-10-08 12:00:00 - 2024-10-08 13:00:00, starttime: 08.10.2024 12:00:00
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.08 12:00:04 1: mySolarForecast DEBUG> mySolarForecast DEBUG> Consumer switch enable by battery state: 1
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - current planning state: starting
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate: off
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate: off

2024.10.08 12:00:04 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 219 W, nompower: 2500, surplus: 3542 W, planstate: planned: 2024-10-08 14:00:00 - 2024-10-08 15:00:00, starttime: 08.10.2024 14:00:00
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 0, on-command: pOpMode manual
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate: off
2024.10.08 12:00:04 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate: off

2024.10.08 12:00:17 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 230 W, nompower: 3500, surplus: 3541 W, planstate: switching on:, starttime: 08.10.2024 12:00:00
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.08 12:00:17 1: mySolarForecast DEBUG> mySolarForecast DEBUG> Consumer switch enable by battery state: 1
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - current planning state: starting
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate: on
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate: off

2024.10.08 12:00:17 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 230 W, nompower: 2500, surplus: 3541 W, planstate: planned: 2024-10-08 14:00:00 - 2024-10-08 15:00:00, starttime: 08.10.2024 14:00:00
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 0, on-command: pOpMode manual
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate: on
2024.10.08 12:00:17 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate: off

2024.10.08 12:01:16 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 2666 W, nompower: 3500, surplus: 1076 W, planstate: switched on: 2024-10-08 12:00:17 - 2024-10-08 13:00:17, starttime: 08.10.2024 12:00:17
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - current planning state: started
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate: on
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate: off

2024.10.08 12:01:16 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 2666 W, nompower: 2500, surplus: 1076 W, planstate: planned: 2024-10-08 14:00:00 - 2024-10-08 15:00:00, starttime: 08.10.2024 14:00:00
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 0, on-command: pOpMode manual
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-07 12:06:42
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-07 12:41:08
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate: on
2024.10.08 12:01:16 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate: off

2024.10.08 12:02:15 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 2782 W, nompower: 3500, surplus: 1024 W, planstate: switched on: 2024-10-08 12:00:17 - 2024-10-08 13:00:17, starttime: 08.10.2024 12:00:17
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - current planning state: started
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 1
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-08 12:02:15
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: still running
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate: on
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate: on

2024.10.08 12:02:15 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 2782 W, nompower: 2500, surplus: 1024 W, planstate: planned: 2024-10-08 14:00:00 - 2024-10-08 15:00:00, starttime: 08.10.2024 14:00:00
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 0, on-command: pOpMode manual
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 1
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-08 12:02:15
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: still running
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate: on
2024.10.08 12:02:15 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate: on

Lt. File-Logs von der Wärmepumpe wurde um 12:00:04 sowie um 12:00:17 die Betriebsart gesendet.
Als "eingeschaltet" wurde die WW-Bereitung bereits um 12:00:06 zurückgemeldet.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

DS_Starter

Ok. Dann nutze zum Vergleich meine contrib-Version.
Sehe gerade auch, dass ich noch eine Debug-Zeile einbauen muß damit man sieht wann tatsächlich ein Schaltbefehl abgesetzt wird. Das fehlt noch.

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

TheTrumpeter

Zitat von: DS_Starter am 08 Oktober 2024, 12:54:51Dann nutze zum Vergleich meine contrib-Version.
Ist drin, Planung von Consumer04 dzt. für 11-12, Consumer10 für 12-13. Werde dann davor auch die Debug-Ausgaben wieder aktivieren.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

TheTrumpeter

Zitat von: TheTrumpeter am 09 Oktober 2024, 08:04:01
Zitat von: DS_Starter am 08 Oktober 2024, 12:54:51Dann nutze zum Vergleich meine contrib-Version.
Ist drin, Planung von Consumer04 dzt. für 11-12, Consumer10 für 12-13. Werde dann davor auch die Debug-Ausgaben wieder aktivieren.
Hier die Debug-Ausgabe:
2024.10.09 10:59:49 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - current planning state: planned
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate before switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate before switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 292 W, nompower: 3500, surplus: 4633 W, planstate: planned: 2024-10-09 11:00:00 - 2024-10-09 12:00:00, starttime: 09.10.2024 11:00:00
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - current planning state: planned
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate after switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate after switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 10:59:49 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate before switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate before switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 292 W, nompower: 2500, surplus: 4633 W, planstate: planned: 2024-10-09 12:00:00 - 2024-10-09 13:00:00, starttime: 09.10.2024 12:00:00
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate after switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate after switching: off
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 10:59:49 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:00:04 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - current planning state: planned
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate before switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate before switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 273 W, nompower: 3500, surplus: 4689 W, planstate: planned: 2024-10-09 11:00:00 - 2024-10-09 12:00:00, starttime: 09.10.2024 11:00:00
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.09 11:00:04 1: mySolarForecast DEBUG> Consumer switch enable by battery state: 1
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - send switch command now: "set Mythz pOpMode manual"
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - current planning state: starting
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate after switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate after switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:00:04 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate before switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate before switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 273 W, nompower: 2500, surplus: 4689 W, planstate: planned: 2024-10-09 12:00:00 - 2024-10-09 13:00:00, starttime: 09.10.2024 12:00:00
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate after switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate after switching: off
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:00:04 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:00:35 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - current planning state: starting
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate before switching: on
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate before switching: off
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 2594 W, nompower: 3500, surplus: 2321 W, planstate: switched on: 2024-10-09 11:00:34 - 2024-10-09 12:00:34, starttime: 09.10.2024 11:00:34
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 1
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - current planning state: started
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate after switching: on
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate after switching: off
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:00:35 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate before switching: on
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate before switching: off
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 2594 W, nompower: 2500, surplus: 2321 W, planstate: planned: 2024-10-09 12:00:00 - 2024-10-09 13:00:00, starttime: 09.10.2024 12:00:00
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate after switching: on
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate after switching: off
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:00:35 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:01:33 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - current planning state: started
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate before switching: on
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate before switching: off
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - general switching parameters => auto mode: 1, Current household consumption: 2746 W, nompower: 3500, surplus: 2771 W, planstate: switched on: 2024-10-09 11:00:34 - 2024-10-09 12:00:34, starttime: 09.10.2024 11:00:34
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - isInLocktime: 0
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - device 'Mythz' is used as switching device
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - current planning state: started
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - physical Switchstate after switching: on
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - logical Switchstate after switching: off
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - cycleDayNum: 0
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "04" - last cycle end time: 2024-10-08 12:25:51

2024.10.09 11:01:33 1: mySolarForecast DEBUG> ############### consumerSwitching consumer "10" ###############
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate before switching: on
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate before switching: off
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - general switching parameters => auto mode: 1, Current household consumption: 2746 W, nompower: 2500, surplus: 2771 W, planstate: planned: 2024-10-09 12:00:00 - 2024-10-09 13:00:00, starttime: 09.10.2024 12:00:00
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - isInLocktime: 0
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch on' => swoncond: 1, on-command: pOpMode manual
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - device 'Mythz' is used as switching device
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - in Context 'switch off' => swoffcond: 0, off-command:
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - current planning state: planned
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - physical Switchstate after switching: on
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - logical Switchstate after switching: off
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - cycleDayNum: 0
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - last cycle start time: 2024-10-08 12:02:15
2024.10.09 11:01:33 1: mySolarForecast DEBUG> consumer "10" - last cycle end time: 2024-10-08 12:25:51

Heute wurde lt. Wärmepumpen-Logs die Betriebsart nur 1x an die Wärmepumpe gesendet:
11:00:04 wurde die Betriebsart umgeschaltet
11:00:10 wurde der WW-Betrieb rückgemeldet

Ich habe auch zusätzlich in meine externe Abbruchfunktion (je nach Strombezug und Strompreis wird ab einer Speichertemperatur von 46,5 °C der WW-Betrieb potenziell beendet, ansonsten erst bei 51 °C) eine Überwachung eingebaut, um sicherzustellen, dass die nicht ggf. fälschlicherweise gleich nach dem Start wieder abbricht und es so zum weiteren Start aus SolarForecast heraus kommt. Das war aber auch nicht der Fall.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

DS_Starter

Das Ergebnis ist so wie ich es erwartet habe. Passt aus meiner Sicht.
Hatte den Change auch bei mir eine Weile unter verschiedenen Situationen simuliert und werde ihn jetzt in das kommende Release übernehmen.
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

Parallix

Wenn ich das richtig sehe, dann lässt sich aktuell nur eine "Battery Device" über das Attribut "setupBatteryDev" in FHEM integrieren.

Ist geplant, dass künftig auch mehrere "Battery Devices" anlegbar sind?

Das jedenfalls wäre super, da es (neben mir mit meinem Goodwe GW25K-ET) sicherlich einige Leute gibt, die System mit mehreren mehr als einem Speicher haben.
FHEM: Debian/Testing BananaPro - AVM: 7490 (7.59) und 7591 (8.02) - Goodwe: GW25K-ET (DSP V10 / ARM V12) - BYD: 2 x HVS 5.1 (BMS V3.29-A, BMU V3.23-A) - EnOcean - Z-Wave - FS20/HMS

DS_Starter

Hallo Parallix,
ZitatWenn ich das richtig sehe, dann lässt sich aktuell nur eine "Battery Device" über das Attribut "setupBatteryDev" in FHEM integrieren.

Ist geplant, dass künftig auch mehrere "Battery Devices" anlegbar sind?
Bisher bestand keine Veranlassung dafür. Wenn es aber den Bedarf gibt, kann ich es durchaus mit ins Auge fassen.
Für eine reine Anzeige kannst du bereits jetzt über einen Dummy mit entsprechenden Readings eine Integration vornehmen. Wie sinvoll es ist, hängt vom jeweiligen Anwendungsfall ab.
Zunächst gehe ich den bestehenden Plan weiter, mehrere Inverter mit ihren verschiedenen Abhängigkeiten im System zu integrieren. Dann können wir mal in Richtung Multibatterie schauen.

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

@all,
die Version 1.35.0 ist eingecheckt und wird morgen früh ausgeliefert.
Enthalten ist:

- in der Flußgrafik ist die Sonne durch ein FHEM SVG-Icon ersetzt. Im Standard wird am Tag eine Sonne,
  Nachts der Mond mit seiner aktuellen Phase dargestellt
- Im Attr setupInverterDev ist der Key icon zur indivudellen Gestaltung des Inverter-Icons nutzbar
- die Größe der Icons in der Flußgrafik werden zur Laufzeit einander angeglichen
- die Erkennung des Schaltstatus bei Consumern mit verzögerter Statusübermittlung ist verbessert
- die Readings pvCorrectionFactor_XX_autocalc werden nicht mehr benötigt und wurden entfernt
- kleinere Fixes und Verbesserungen (Debug-Infos, Logausgaben,...)

Liegt für eilige auch im contrib.

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

Parallix

#1153
Zitat von: DS_Starter am 09 Oktober 2024, 14:39:21Hallo Parallix,
ZitatWenn ich das richtig sehe, dann lässt sich aktuell nur eine "Battery Device" über das Attribut "setupBatteryDev" in FHEM integrieren.

Ist geplant, dass künftig auch mehrere "Battery Devices" anlegbar sind?
Bisher bestand keine Veranlassung dafür. Wenn es aber den Bedarf gibt, kann ich es durchaus mit ins Auge fassen.
...

Das wäre echt prima, denn (m)ein aktueller Weg über ein virtuelles Device, das die Werte von zwei Speichern fusioniert, ist nicht wirklich gut.
FHEM: Debian/Testing BananaPro - AVM: 7490 (7.59) und 7591 (8.02) - Goodwe: GW25K-ET (DSP V10 / ARM V12) - BYD: 2 x HVS 5.1 (BMS V3.29-A, BMU V3.23-A) - EnOcean - Z-Wave - FS20/HMS

300P

Zitat von: Parallix am 09 Oktober 2024, 14:11:29Wenn ich das richtig sehe, dann lässt sich aktuell nur eine "Battery Device" über das Attribut "setupBatteryDev" in FHEM integrieren.

Ist geplant, dass künftig auch mehrere "Battery Devices" anlegbar sind?

Das jedenfalls wäre super, da es (neben mir mit meinem Goodwe GW25K-ET) sicherlich einige Leute gibt, die System mit mehreren mehr als einem Speicher haben.

Das laßt sich bislang doch sauber über einen Dummy bewerkstelligen, der diese (s.u.) Reading durch eine zyklische Berechnung gefüllt bekommt. O:-)

Dummy-Device
defmod BatteryDummy dummy
attr BatteryDummy DbLogExclude .*
attr BatteryDummy event-on-change-reading .*
attr BatteryDummy group Energy Meter
attr BatteryDummy icon batterie@green
attr BatteryDummy room 020_PV,Energie
attr BatteryDummy stateFormat {ReadingsVal("$name","total_pac", undef)." kW ".\
" - total ".ReadingsVal("$name","bat_loadtotal", undef)." kWh (-in)".\
" - ".ReadingsVal("$name","bat_unloadtotal", undef)." kWh (out)".\
" - charged ".ReadingsVal("$name","chargestatus", undef)." % ".\
" - ".(ReadingsVal($name,"chargestatus",0)/100 * (ReadingsVal($name,"bat_rated_capacity",0))*1000)." Watt"}
attr BatteryDummy userReadings total_pac, power_out, power_in, chargestatus, bat_rated_capacity, bat_loadtotal, bat_unloadtotal
und hier z.B. eine (etwas längere) Notify-Berechnung mit diversen WR und 2 x Batteriewechselrichter (SBS25) auf Basis der immer vorhandenen Veränderung des allgemeinen Energymeter beim EVU-Zähler.
(Die BatterieDummy-Berechnung ist extra mit ####BatteryDummy#### gekennzeichnet)
defmod N.PV.TotalConsumption.Dum.Energy notify SMA_Energymeter:Saldo_Wirkleistung:.* {\
 # Energieverbrauch PV\
fhem "setreading Dum.Energy PV ".sprintf("%.1f",(ReadingsVal("SB25","total_pac",0)*1000));;\
my $tc = sprintf("%.1f",ReadingsVal("FCU","FCU-Strom-aktuelle-Leistung",0)+ReadingsVal("Dum.Energy","GridConsumption",0)-ReadingsVal("Dum.Energy","GridFeedIn",0));;\
fhem ("setreading Dum.Energy TotalConsumption ".sprintf("%.1f",$tc));;\
fhem "setreading Dum.Energy PV_2 ".sprintf("%.1f",(ReadingsVal("SB30","total_pac",0)*1000));;\
fhem "setreading Dum.Energy PV_40 ".sprintf("%.1f",(ReadingsVal("SB40","total_pac",0)*1000));;\
fhem "setreading Dum.Energy PV_20 ".sprintf("%.1f",(ReadingsVal("SB20","total_pac",0)*1000));;\
fhem "setreading Dum.Energy PV_30_M ".sprintf("%.1f",(ReadingsVal("SB30_M","total_pac",0)*1000));;\
fhem "setreading Dum.Energy GridFeedIn_30_M ".sprintf("%.1f",(ReadingsVal("SB30_M","Meter_Power_Grid_FeedIn",0)*1000));; \
fhem "setreading Dum.Energy GridFeedIn_20 ".sprintf("%.1f",(ReadingsVal("SB20","Meter_Power_Grid_FeedIn",0)*1000));; \
fhem "setreading Dum.Energy FCU ".sprintf("%.1f",(ReadingsVal("FCU","FCU-Strom-aktuelle-Leistung",0)));;\
fhem "setreading Dum.Energy DGYGridFeedIn ".sprintf("%.1f",(ReadingsVal("MyDiscovergyEVU","power",0)));; \
 # Batterie-Bezug -Batterieentnahme\
fhem "setreading Dum.Energy BattLoadIn ".sprintf("%.1f",(ReadingsVal("SBS25","power_out",0)));;\
 # Batterie-Beladung Batterie mit Strom füllen\
fhem "setreading Dum.Energy BattLoadOut ".sprintf("%.1f",(ReadingsVal("SBS25","power_in",0)));;\
 # Batteriestatus\
fhem "setreading Dum.Energy BattStatusP ".sprintf("%.1f",(ReadingsVal("SBS25","chargestatus",0)));;\
 # Batterie-Bezug -Batterieentnahme_2\
fhem "setreading Dum.Energy BattLoadIn_2 ".sprintf("%.1f",(ReadingsVal("SBS25_2","power_out",0)));;\
 # Batterie-Beladung_2 Batterie mit Strom füllen\
fhem "setreading Dum.Energy BattLoadOut_2 ".sprintf("%.1f",(ReadingsVal("SBS25_2","power_in",0)));;\
 # Batteriestatus_2\
fhem "setreading Dum.Energy BattStatusP_2 ".sprintf("%.1f",(ReadingsVal("SBS25_2","chargestatus",0)));;\
 # Forecast Invertererzeugung InverterDummy \
fhem "setreading InverterDummy Today_PVforecast ".sprintf("%.3f",(ReadingsNum("Forecast","Today_PVforecast",0)));;\
 # Invertererzeugung InverterDummy \
fhem "setreading InverterDummy etotal ".sprintf("%.3f",(ReadingsNum("SB25","etotal",0))+(ReadingsNum("SB30","etotal",0))+(ReadingsNum("SB40","etotal",0)));;\
 # Invertererzeugung InverterDummy \
fhem "setreading InverterDummy total_pac ".sprintf("%.3f",(ReadingsNum("SB25","total_pac",0))+(ReadingsNum("SB30","total_pac",0))+(ReadingsNum("SB40","total_pac",0)));;\
 # Invertererzeugung InverterDummy \
my $wert1234 = "0" ;;\
$wert1234 = sprintf("%.3f",(ReadingsNum("SB25","etoday",0))+(ReadingsNum("SB30","etoday",0))+(ReadingsNum("SB40","etoday",0)));; \
fhem ("setreading InverterDummy etoday ".sprintf("%.3f",$wert1234));;\
####BatteryDummy####\
####BatteryDummy####\
####BatteryDummy####\
 # Batterie-Bezug -Batterieentnahme BatteryDummy\
fhem "setreading BatteryDummy power_out ".sprintf("%.0f",(ReadingsNum("SBS25","power_out",0))+(ReadingsNum("SBS25_2","power_out",0)));;\
 # Batterie-Beladung BatteryDummy mit Strom füllen\
fhem "setreading BatteryDummy power_in ".sprintf("%.0f",(ReadingsNum("SBS25","power_in",0))+(ReadingsNum("SBS25_2","power_in",0)));;\
 # Batterie-Bezug -bat_loadtotal Batterieentnahme BatteryDummy\
fhem "setreading BatteryDummy bat_unloadtotal ".sprintf("%.3f",(ReadingsNum("SBS25","bat_unloadtotal",0))+(ReadingsNum("SBS25_2","bat_unloadtotal",0)));;\
 # Batterie-Beladung bat_loadtotal BatteryDummy mit Strom füllen\
fhem "setreading BatteryDummy bat_loadtotal ".sprintf("%.3f",(ReadingsNum("SBS25","bat_loadtotal",0))+(ReadingsNum("SBS25_2","bat_loadtotal",0)));;\
 # Batteriestatus BatteryDummy\
my $wert5 = sprintf("%.2f",(((ReadingsNum("SBS25","chargestatus",0))/2) + ((ReadingsNum("SBS25_2","chargestatus",0))/2)));; \
fhem ("setreading BatteryDummy chargestatus ".sprintf("%.2f",$wert5));;\
 # Batterie-total_pac  BatteryDummy\
my $wert6 = sprintf("%.3f",((ReadingsNum("SBS25","total_pac",0))+(ReadingsNum("SBS25_2","total_pac",0))));; \
fhem ("setreading BatteryDummy total_pac ".sprintf("%.3f",$wert6));;\
 # Batterie-bat_rated_capacity  BatteryDummy\
my $wert7 = sprintf("%.3f",((ReadingsNum("SBS25","bat_rated_capacity",0))+(ReadingsNum("SBS25_2","bat_rated_capacity",0))));; \
fhem ("setreading BatteryDummy bat_rated_capacity ".sprintf("%.3f",$wert7));;\
####BatteryDummy####\
####BatteryDummy####\
####BatteryDummy####\
SMABatteryChargewithTibber();;\
}
attr N.PV.TotalConsumption.Dum.Energy DbLogExclude .*
attr N.PV.TotalConsumption.Dum.Energy room Energie
attr N.PV.TotalConsumption.Dum.Energy verbose 2

Ich habe seit mehreren Jahren bislang keinerlei Probleme damit gehabt  ;D  - außer die Kommunikation zu den BWR war ausgefallen. :o

Gruß
300P
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.