76_SolarForecast - Informationen/Ideen zu Weiterentwicklung und Support

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

Vorheriges Thema - Nächstes Thema

peterboeckmann

Zitat von: DS_Starter am 02 August 2026, 14:41:15Aber grundsätzlich wäre deine Erwartung auch hier, dass der AUS-Zustand den du manuell herbeigeführt hast, beibehalten wird und NICHT wieder automatisch eingeschaltet, richtig?

Zumindest hatte ich deine Beschreibung weiter oben so verstanden.
Aus Anwendersicht fände ich es auch verständlich, wenn die Automatik immer schaltet, wenn sie aktiviert ist - unabhängig von irgendwelchen manuellen bzw. externen Schaltvorgängen.

Ich will nur verstehen, wie SF tickt. Leben kann ich mit beiden Varianten.

Viele Grüße,
Peter
MQTT,Modbus,HTTPMod,DbLog,LaCrosse,SolarForecast,TelegramBot,Twilight,vitoconnect,withings
fhem,fhempy,debmatic
Debian
RaspberryPi5,HomeMatic,HomeMaticIP,Shelly,JeeLink,SignalDuino,ZWDongle,SONOS,alexa,Hue,tradfri,MobileAlerts,Siemens Home Connect,Roborock S50,Wallbox,Harmony,Tuya Smartlife

DS_Starter

#6781
Hallo Peter,

jetzt ist mir dein Fall klar geworden und es ist strukturell bedingt.

Du hast den Consumer ausgeschaltet und er war bis 13:55:10 im Status continued:

2026.08.02 13:55:10 1: SolarForecast DEBUG> ############### consumerSwitching consumer "03" ###############
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - ConsumptionRecommended calc method: default, surplus: 8575
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - current Grid power consumption: 0 W
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - Power splitting - Grid: 0 W, PV: 300 W
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - additional consumption after switching on (if currently 'off'): 300 W
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - current planning state: continued
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - physical Switchstate before switching: off
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - logical Switchstate before switching: off
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - priority=0
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - general switching parameters => auto mode=1, Household con=-5367 W, nompower=300 W, surplus=8575 W, Mode=can, planstate=continued:, starttime=02.08.2026 06:26:10
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - isInLocktime=0
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch on' => swoncond=1, on-command=on
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOnCond Info=value "0" matches the Regex "0"
-> Check successful
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info=value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - device 'MQTT2_Spelunkenentfeuchter' is used as switching device
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - Interrupt Characteristic value: 1 -> simple true
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch off' => swoffcond: 0, off-command: off
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - is Consumption recommended: 1
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info: value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - current planning state: continued
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - physical Switchstate after switching: off
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - logical Switchstate after switching: off
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - cycleDayNum: 18
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - last cycle start time: 2026-08-02 13:41:52
2026.08.02 13:55:10 1: SolarForecast DEBUG> consumer "03" - last cycle end time: 2026-08-02 13:46:59


Dann 13:55:18 geht er in den Status interrupting wegen Unterschreitung Überschuß (effective surplus 0 W < required 300 W) -> SF sendet Ausschaltkommando:

2026.08.02 13:55:18 1: SolarForecast DEBUG> ############### consumerSwitching consumer "03" ###############
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - ConsumptionRecommended calc method: default, surplus: 0
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - current Grid power consumption: 3930 W
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - Power splitting - Grid: 0 W, PV: 300 W
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - additional consumption after switching on (if currently 'off'): 300 W
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - current planning state: interrupting
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - physical Switchstate before switching: off
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - logical Switchstate before switching: off
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - priority=0
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - general switching parameters => auto mode=1, Household con=8255 W, nompower=300 W, surplus=0 W, Mode=can, planstate=interrupting:, starttime=02.08.2026 06:26:10
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - isInLocktime=0
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch on' => swoncond=1, on-command=on
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOnCond Info=value "0" matches the Regex "0"
-> Check successful
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info=value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - device 'MQTT2_Spelunkenentfeuchter' is used as switching device
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - Interrupt Characteristic value: 1 -> simple true
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - start deferred: effective surplus 0 W < required 300 W (committed: 0 W)
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch off' => swoffcond: 0, off-command: off
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - is Consumption recommended: 0
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info: value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - send switch command now: "set MQTT2_Spelunkenentfeuchter off"
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - current planning state: interrupting
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - physical Switchstate after switching: off
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - logical Switchstate after switching: off
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - cycleDayNum: 18
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - last cycle start time: 2026-08-02 13:41:52
2026.08.02 13:55:18 1: SolarForecast DEBUG> consumer "03" - last cycle end time: 2026-08-02 13:46:59

Nebenbei, es kommt sehr oft das Ausschaltkommando bis 13:55:42:
send switch command now: "set MQTT2_Spelunkenentfeuchter off"aber dein Consumer wird nicht als off erkannt (oder schaltet nicht), der Befehl feuert immer wieder. Vllt. mal checken.

Dann kommt 13:55:47 der Wechsel weil wieder genug Überschuß da ist und die Automatik schaltet ein:

2026.08.02 13:55:42 1: SolarForecast DEBUG> ############### consumerSwitching consumer "03" ###############
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - ConsumptionRecommended calc method: default, surplus: 0
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - current Grid power consumption: 2391 W
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - Power splitting - Grid: 0 W, PV: 300 W
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - additional consumption after switching on (if currently 'off'): 300 W
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - current planning state: interrupting
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - physical Switchstate before switching: off
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - logical Switchstate before switching: off
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - priority=0
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - general switching parameters => auto mode=1, Household con=8810 W, nompower=300 W, surplus=0 W, Mode=can, planstate=interrupting:, starttime=02.08.2026 06:26:10
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - isInLocktime=0
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch on' => swoncond=1, on-command=on
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOnCond Info=value "0" matches the Regex "0"
-> Check successful
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info=value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - device 'MQTT2_Spelunkenentfeuchter' is used as switching device
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - Interrupt Characteristic value: 1 -> simple true
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - start deferred: effective surplus 0 W < required 300 W (committed: 0 W)
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch off' => swoffcond: 0, off-command: off
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - is Consumption recommended: 0
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info: value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - send switch command now: "set MQTT2_Spelunkenentfeuchter off"
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - current planning state: interrupting
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - physical Switchstate after switching: off
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - logical Switchstate after switching: off
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - cycleDayNum: 18
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - last cycle start time: 2026-08-02 13:41:52
2026.08.02 13:55:42 1: SolarForecast DEBUG> consumer "03" - last cycle end time: 2026-08-02 13:46:59

....

2026.08.02 13:55:47 1: SolarForecast DEBUG> ############### consumerSwitching consumer "03" ###############
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - ConsumptionRecommended calc method: default, surplus: 1024
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - current Grid power consumption: 0 W
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - Power splitting - Grid: 0 W, PV: 300 W
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - additional consumption after switching on (if currently 'off'): 300 W
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - current planning state: interrupting
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - physical Switchstate before switching: off
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - logical Switchstate before switching: off
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - priority=0
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - general switching parameters => auto mode=1, Household con=5798 W, nompower=300 W, surplus=1024 W, Mode=can, planstate=interrupting:, starttime=02.08.2026 06:26:10
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - isInLocktime=0
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch on' => swoncond=1, on-command=on
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOnCond Info=value "0" matches the Regex "0"
-> Check successful
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info=value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - device 'MQTT2_Spelunkenentfeuchter' is used as switching device
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - Interrupt Characteristic value: 1 -> simple true
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - send switch command: "set MQTT2_Spelunkenentfeuchter on"
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - Check Context 'switch off' => swoffcond: 0, off-command: off
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - is Consumption recommended: 1
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - isAddSwitchOffCond Info: value "0" doesn't match the Regex "1"
(the effect depends on the switch context)
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - current planning state: continuing
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - physical Switchstate after switching: off
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - logical Switchstate after switching: off
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - cycleDayNum: 18
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - last cycle start time: 2026-08-02 13:41:52
2026.08.02 13:55:47 1: SolarForecast DEBUG> consumer "03" - last cycle end time: 2026-08-02 13:46:59

Der Punkt ist, dass es einen weiteren wesentlichen Fakt gibt.
Der entscheidende Mechanismus: Sobald die Automatik den Consumer einmal selbst "berührt" – und sei es nur, weil 
er wegen zu wenig Überschuß unterbrochen wird - und dadurch der manuell herbeigeführte Status (AUS) gleich dem automatischen SF-Sollstatus (AUS) ist (implizierter internen Tabellensynch), übernimmt die Automatik wieder wenn sie aktiv ist. Genau das war bei dir der Fall.

Ich muß also die Fälle der Automatikeinrastung ergänzen:

- wenn NACH manueller Schaltung der Zustand VOR dem manuellen Eingriff wiederhergestellt wird, wobei die
  Automatik nicht deaktiviert wurde (wie bisher)

- Sobald die Automatik den Consumer einmal selbst "berührt" – und sei es nur, weil 
  er wegen zu wenig Überschuß kurz unterbrochen wird - und dadurch der manuell herbeigeführte Status (z.B. AUS)
  gleich dem automatischen SF-Sollstatus (z.B. AUS) gleich ist (implizierter internen Tabellensynch),
  übernimmt die Automatik wieder wenn sie aktiv ist.

- bei einer AUS-> EIN Flanke des Automatikmodus, unabhängig ob der Schaltzustand vor dem manuellen
  Eingriff wiederhergestellt wurde

Ich denke das vergisst man. Werde es im Wiki passend hinterlegen zum Nachlesen.

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

peterboeckmann

Hallo Heiko,

Danke für den Hinweis bzgl. des verzögerten Schaltens.
Das device selbst wird per MQTT über WLAN gesteuert. Die WLAN-Verbindung ist zu diesem device vielleicht nicht die beste.
Wenn ich das richtig überblicke, steht das device solange auf set_on bzw. set_off.
Prüft SF diesen Status oder nur on und off?

Viele Grüße,
Peter
MQTT,Modbus,HTTPMod,DbLog,LaCrosse,SolarForecast,TelegramBot,Twilight,vitoconnect,withings
fhem,fhempy,debmatic
Debian
RaspberryPi5,HomeMatic,HomeMaticIP,Shelly,JeeLink,SignalDuino,ZWDongle,SONOS,alexa,Hue,tradfri,MobileAlerts,Siemens Home Connect,Roborock S50,Wallbox,Harmony,Tuya Smartlife

DS_Starter

ZitatWenn ich das richtig überblicke, steht das device solange auf set_on bzw. set_off.
Prüft SF diesen Status oder nur on und off?
Es wird geprüft was du als Regex im Schlüssel swstate für on bzw. off angibst.
Per default ist es on und off.
Aber bei dir wäre es vermutlich so abzuändern:

swstate=state:.*on:.*off
wenn das nicht reicht:

swstate=state:.*on.*:.*off.*
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