[gelöst] 76_SolarForecast.pm - Consumer Switching

Begonnen von Christian83, 13 Mai 2024, 08:41:17

Vorheriges Thema - Nächstes Thema

Christian83

Hallo,

nun geht die aktive Zeit der großen Verbraucher wieder los (Whirlpoolheizung).

Mein Consumer ist so definiert:

WhirlpoolESP type=other mode=must power=2000 auto=automatic mintime=SunPath on="heater on" off="heater off" interruptable=1 swstate=heater:on|standby:off icon=scene_pool pcurr=powercurr:W:100 asynchron=1
Im Log steht nach jedem Durchlauf:

2024.05.13 08:38:33 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 433 W, nompower: 2000, surplus: 4067 W, planstate: continuing:, starttime: 13.05.2024 05:37:10
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 08:38:33 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 08:39:08 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 440 W, nompower: 2000, surplus: 4082 W, planstate: continuing:, starttime: 13.05.2024 05:37:10
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 08:39:08 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 08:39:43 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 399 W, nompower: 2000, surplus: 4143 W, planstate: continuing:, starttime: 13.05.2024 05:37:10
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 08:39:43 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

Aber der Verbraucher geht nicht an.
Erst wieder, wenn ich explizit auf das Uhrensymbol klicke oder ihn manuell schalte.
Dann funktioniert es, bis er auf Grund fehlendem Überschuss ausgeht ("interrupting, interrupted"). Wenn dann wieder Überschuss da ist, geht er aber trotzdem nicht an.

Habe ich was falsch oder fehlendes konfiguriert?

Gruß,

Christian

DS_Starter

Hallo Christian,

ich glaube das System kann den Switch-Status nicht (richtig) ermitteln.
Du hast angegeben 

 swstate=heater:on|standby:off

Es bedeutet dass

  "on" wäre:   Device->WhirlpoolESP  Reading->heater  Wert-> "on" oder "standby"
  "off" wäre:  Device->WhirlpoolESP  Reading->heater  Wert-> "off"

Möglicherweise wäre es so besser:

  swstate=heater:.*on|standby.*:.*off.*

Sind die Schaltkommandos richtig, "WhirlpoolESP heater on" bzw. "WhirlpoolESP heater off" ?

Es fehlt im Prinzip der Wechsel von "current planning state: continuing" zu "current planning state: continued" nachdem der "on" Befehl abgesetzt wurde, der Verbraucher einschaltete und das Modul dann den Status "on" erkannt hat.

Grüße,
Heiko
ESXi@NUC+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

Christian83

Hallo Heiko,

ja Schaltkommandos passen so und funktionieren ja auch (das Ausschalten klappt ja immer).

swstate habe ich jetzt mal nach deinem Vorschlag angepasst.

Wie oft soll denn interrupting bzw. continuing auftreten, bis du schaltest? Oder wird das direkt beim Ersten Auftreten gemacht?

Gruß,

Christian

DS_Starter

#3
ZitatWie oft soll denn interrupting bzw. continuing auftreten, bis du schaltest? Oder wird das direkt beim Ersten Auftreten gemacht?
Im Normalfall passiert es sofort, ist aber abhängig vom Consumer(modul) und gerade bei asynchron, also wenn nicht auf die Antwort gewartet werden soll, kann es etwas länger dauern.
Zu asynchron fällt mir ein, dass WhirlpoolESP / heater auch einen Event bringen muss!
Du kannst asynchron=0 setzen falls das Consumermodul die Schaltantwort sofort zurück bringt.

Hier ein Beispiel von mir:

2024.05.13 10:01:21.687 1: SolCast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - general switching parameters => auto mode: 1, current Consumption: 760 W, nompower: 720, surplus: 2699 W, planstate: interrupted:, starttime: 13.05.2024 08:00:01
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - isInLocktime: 0
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - current Context is >switch on< => swoncond: 1, on-command: on
2024.05.13 10:01:21.689 1: SolCast DEBUG> consumer "04" - device >SolCastDummy3< is used as switching device
2024.05.13 10:01:21.804 2: SolCast - switching Consumer 'SolarForecast Consumer Dummy3' to 'on', cause: existing surplus
2024.05.13 10:01:21.804 1: SolCast DEBUG> consumer "04" - current Context is >switch off< => swoffcond: 0, off-command: off
2024.05.13 10:01:21.805 1: SolCast DEBUG> consumer "04" - current planning state: continuing

2024.05.13 10:01:21.806 2: SolCast - Consumer 'SolarForecast Consumer Dummy3' switched on (continued)
ESXi@NUC+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

Und noch eine Schlüsselvariante die mir besser gefällt:

   swstate=heater:.*(on|standby).*:.*off.*
ESXi@NUC+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

Christian83

Zitat von: DS_Starter am 13 Mai 2024, 10:13:31Im Normalfall passiert es sofort, ist aber abhängig vom Consumer(modul) und gerade bei asynchron, also wenn nicht auf die Antwort gewartet werden soll, kann es etwas länger dauern.
Zu asynchron fällt mir ein, dass WhirlpoolESP / heater auch einen Event bringen muss!
Du kannst asynchron=0 setzen falls das Consumermodul die Schaltantwort sofort zurück bringt.
Ist über MQTT. Da kommt die Antwort leider nicht sofort, deshalb habe ich das asynchron aktiviert. Event vom Consumer kommt, da ich das auch ins DbLog schreibe.

ZitatHier ein Beispiel von mir:

2024.05.13 10:01:21.687 1: SolCast DEBUG> ############### consumerSwitching consumer "04" ###############
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - general switching parameters => auto mode: 1, current Consumption: 760 W, nompower: 720, surplus: 2699 W, planstate: interrupted:, starttime: 13.05.2024 08:00:01
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - isInLocktime: 0
2024.05.13 10:01:21.688 1: SolCast DEBUG> consumer "04" - current Context is >switch on< => swoncond: 1, on-command: on
2024.05.13 10:01:21.689 1: SolCast DEBUG> consumer "04" - device >SolCastDummy3< is used as switching device
2024.05.13 10:01:21.804 2: SolCast - switching Consumer 'SolarForecast Consumer Dummy3' to 'on', cause: existing surplus
2024.05.13 10:01:21.804 1: SolCast DEBUG> consumer "04" - current Context is >switch off< => swoffcond: 0, off-command: off
2024.05.13 10:01:21.805 1: SolCast DEBUG> consumer "04" - current planning state: continuing

2024.05.13 10:01:21.806 2: SolCast - Consumer 'SolarForecast Consumer Dummy3' switched on (continued)

Welcher crtlDebug Eintrag schreibt denn das "switched on (continued)"? Das habe ich bei mir noch nie im Log gehabt.

DS_Starter

ZitatWelcher crtlDebug Eintrag schreibt denn das "switched on (continued)"? Das habe ich bei mir noch nie im Log gehabt.
Das ist ein normaler Log des Moduls mit verbose 2, also kein Debug (Log ohne "DEBUG>").
Siehst du nur wenn du mindestens verbose=2 im Device eingestellt hast.
ESXi@NUC+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

Christian83

Hi,

also das Ausschalten geht. Anschalten passiert nur einfach nicht mehr.

2024.05.13 10:45:27 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 2655 W, nompower: 2000, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 10:45:27 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 10:45:27 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 10:45:27 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)
2024.05.13 10:46:36 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 492 W, nompower: 2000, surplus: 1323 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 10:46:36 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupted

2024.05.13 10:47:46 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 484 W, nompower: 2000, surplus: 4045 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 10:47:46 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater on', cause: existing surplus
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 10:48:58 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 496 W, nompower: 2000, surplus: 5241 W, planstate: continuing:, starttime: 13.05.2024 08:52:18
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 10:48:58 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

DS_Starter

Was steht denn im Internal NOTIFYDEV des SF-Devices?
Dann setze zusätzlich noch den Debugschlüssel "notifyHandling".

Ich würde gerne sehen was nach dem Einschaltbefehl asynchron weiter passiert.

Der Einschaltbefehl und Status wird richtig vorgenommen:
2024.05.13 10:47:46 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater on', cause: existing surplus
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 10:47:46 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing
ESXi@NUC+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

Christian83

Hi,

im NOTIFYDEV steht "WhirlpoolESP".

jetzt hat es etwas gedauert, um das Aus- und Einschalten zu sehen.

2024.05.13 13:10:00 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 2472 W, nompower: 2000, surplus: 0 W, planstate: continued:, starttime: 13.05.2024 08:52:18
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:10:00 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 13:10:00 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 13:10:00 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 13:10:01 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 13:10:01 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: off
2024.05.13 13:10:01 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 2472 W, nompower: 2000, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:10:01 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 13:10:01 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 13:10:01 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 13:10:01 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)
2024.05.13 13:11:05 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 1103 W, nompower: 2000, surplus: 639 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:11:05 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupted

Dann wiederholt sich das "interrupted" solange der Überschuss nicht reicht. dann passiert dieses:

2024.05.13 13:17:32 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:17:32 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 297 W, nompower: 2000, surplus: 3457 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 13:17:32 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:17:32 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:17:32 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:17:32 3: MQTT2_DEVICE set WhirlpoolESP heater on
2024.05.13 13:17:33 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater on', cause: existing surplus
2024.05.13 13:17:33 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:17:33 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 13:18:38 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 321 W, nompower: 2000, surplus: 5688 W, planstate: continuing:, starttime: 13.05.2024 08:52:18
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:18:38 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 13:19:13 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 316 W, nompower: 2000, surplus: 5643 W, planstate: continuing:, starttime: 13.05.2024 08:52:18
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 13:19:13 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

Und der Whirlpool bleibt aus. Schaust du irgendwann, ob der Consumer eingeschalten ist oder vertrauen wir darauf, dass das funktioniert hat?

DS_Starter

ZitatSchaust du irgendwann, ob der Consumer eingeschalten ist oder vertrauen wir darauf, dass das funktioniert hat?
Es wird niemandem vertraut. ;) Es wird bei jedem Zyklus geschaut ob der Sollstatus (zB. continuing) durch der Check des On-Status umgesetzt wurde in "continued".

Was mir auffällt ist dass bei Ausschalten ein notifyHandling erfolgt:

2024.05.13 13:10:01 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 13:10:01 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: off
....

Dadurch wird auch der off-Status erkannt:

2024.05.13 13:10:01 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)

Beim Einschalten gibt es keinerlei notifyHandling. Das ist m.M. nach nicht in Ordnung.
Meine These ist jetzt, dass der Consumer mit einem einfachen on-Kommando nicht zufrieden ist und ggf. einen mehrfachen "Stups" benötigt.

Du kannst mal bitte parallel einen Eventmonitor bei dir öffnen und analysieren, ob zur der Zeit des Kommandos:

2024.05.13 13:17:32 3: MQTT2_DEVICE set WhirlpoolESP heater on
2024.05.13 13:17:33 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater on', cause: existing surplus

ein entsprechender Event bzgl. Reading "heater" auftaucht und wie der aussieht.
 
ESXi@NUC+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

Christian83

2024.05.13 14:54:20 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 3547 W, nompower: 500, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:20 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 14:54:20 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: off
2024.05.13 14:54:21 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 3547 W, nompower: 500, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:21 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 14:54:22 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 14:54:22 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 14:54:22 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)
2024.05.13 14:54:41 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 763 W, nompower: 500, surplus: 180 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:41 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupted

2024.05.13 14:54:52 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:54:57 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 606 W, nompower: 500, surplus: 314 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:57 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupted

2024.05.13 14:55:36 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 384 W, nompower: 500, surplus: 567 W, planstate: interrupted:, starttime: 13.05.2024 08:52:18
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:55:36 3: MQTT2_DEVICE set WhirlpoolESP heater on
2024.05.13 14:55:36 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater on', cause: existing surplus
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:55:36 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 14:55:38 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:55:38 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: on
2024.05.13 14:55:38 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 384 W, nompower: 500, surplus: 567 W, planstate: continuing:, starttime: 13.05.2024 08:52:18
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 14:55:38 2: Forecast3 - Consumer 'WhirlpoolESP' switched on (continued)

Event:
2024-05-13 14:55:38 MQTT2_DEVICE WhirlpoolESP heater: on
P.S. Habe nur die Power beim Consumer runtergesetzt, weil gerade bewölkt.

DS_Starter

Ja, jetzt sieht es so aus wie ich es erwarte:

2024.05.13 14:55:38 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:55:38 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: on
2024.05.13 14:55:38 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 384 W, nompower: 500, surplus: 567 W, planstate: continuing:, starttime: 13.05.2024 08:52:18
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:55:38 1: Forecast3 DEBUG> consumer "01" - current planning state: continuing

2024.05.13 14:55:38 2: Forecast3 - Consumer 'WhirlpoolESP' switched on (continued)


Du siehst was ich meine. Bei jedem Schaltvorgang gibt es ein notifyHandling. So muß es sein.
ESXi@NUC+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

Christian83

Warum wird dann zweimal das off command gesendet? Kommt das von dir, oder hängt mein mqtt da etwas und ist eigentlich das Problem?

2024.05.13 14:54:20 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 3547 W, nompower: 500, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:20 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 14:54:20 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: off
2024.05.13 14:54:21 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 3547 W, nompower: 500, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - isInLocktime: 0
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - current Context is >switch on< => swoncond: 1, on-command: heater on
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - device >WhirlpoolESP< is used as switching device
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - current Context is >switch off< => swoffcond: 0, off-command: heater off
2024.05.13 14:54:21 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 14:54:22 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 14:54:22 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 14:54:22 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)

DS_Starter

ZitatWarum wird dann zweimal das off command gesendet?
Das kommt durch die asynchrone Arbeitsweise. Es wird WhirlpoolESP -> off gesetzt und der status interrupting.
Der Consumer schaltet, löst den Event aus und die Prüfung läuft los. Da der Status zu dem Zeit punkt noch
interrupting ist, versucht das Modul durch nochmaligen Befehl den Consumer erneut zum "off" zu bewegen.
Danach wird der Status gecheckt und wenn der Regex matched wird der Status auf interrupted geändert und der Prozess ist erfolgreich erledigt.
So passt es.

2024.05.13 14:54:20 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
2024.05.13 14:54:20 1: Forecast3 DEBUG> consumer "01" - current planning state: interrupting

2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - Consumer >01< asynchronous mode: 1
2024.05.13 14:54:21 1: Forecast3 DEBUG> notifyHandling - start centralTask by Notify device: WhirlpoolESP, reading: heater, value: off
2024.05.13 14:54:21 1: Forecast3 DEBUG> ############### consumerSwitching consumer "01" ###############
2024.05.13 14:54:21 1: Forecast3 DEBUG> consumer "01" - general switching parameters => auto mode: 1, current Consumption: 3547 W, nompower: 500, surplus: 0 W, planstate: interrupting:, starttime: 13.05.2024 08:52:18
2024.05.13 14:54:21 3: MQTT2_DEVICE set WhirlpoolESP heater off
2024.05.13 14:54:22 2: Forecast3 - switching Consumer 'WhirlpoolESP' to 'heater off', cause: surplus shortage
...
2024.05.13 14:54:22 2: Forecast3 - Consumer 'WhirlpoolESP' switched off (interrupted)

ESXi@NUC+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