NEWS
Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2
-
@Jockel_Bln
hätte 2 Fragen, weil Du den 2400AC+ verwendest.- Welche Version verwendest Du?
siehe Bild, Beispiel für version: 2

- in früheren Firmware-Versionen unterscheiden sich die Geräte 24XX zu den anderen Solarflow 8xx
in den Datenpunkten für den Lüfter:
AC24XX hatten (haben noch?):
properties.fanSwitch: 1
properties.fanSpeed": 0
Bei den anderen Geräten SF8XX und 1600AC werden die Keys anders benannt:
properties.Fanmode: 1
properties.Fanspeed: 0siehe Bild:

@Jockel_Bln und Alle die ein Zendure 24XX oder höher verwenden:
Sind die Unterschiede noch vorhanden, oder wurden die keys bei den Geräten 24XX AC oder >2XXX nun angepasst und liefern auch:
properties.Fanmode: 1
properties.Fanspeed: 0
?Danke für jede Rückmeldung.
Hallo @maxclaudi
@Jockel_Bln
hätte 2 Fragen, weil Du den 2400AC+ verwendest.- Welche Version verwendest Du?
Da mich die App gleich nach der Installation zum Update genötigt hat, habe ich die Version 3 drauf.
Sind die Unterschiede noch vorhanden, oder wurden die keys bei den Geräten 24XX AC oder >2XXX nun angepasst und liefern auch:
properties.Fanmode: 1
properties.Fanspeed: 0Ich bekomme auch
properties.Fanmode: 1
properties.Fanspeed: 0
- Welche Version verwendest Du?
-
Hallo @maxclaudi
@Jockel_Bln
hätte 2 Fragen, weil Du den 2400AC+ verwendest.- Welche Version verwendest Du?
Da mich die App gleich nach der Installation zum Update genötigt hat, habe ich die Version 3 drauf.
Sind die Unterschiede noch vorhanden, oder wurden die keys bei den Geräten 24XX AC oder >2XXX nun angepasst und liefern auch:
properties.Fanmode: 1
properties.Fanspeed: 0Ich bekomme auch
properties.Fanmode: 1
properties.Fanspeed: 0
@Jockel_Bln
Danke für die schnelle Rückmeldung. -
@maxclaudi
Kannst du etwas zu dieser Beobachtung sagen, da du schon länger Erfahrung mit den Zendure Solarflow gemacht hast?Bis zum "socSet" (85 %) wird mit 800 W aus dem Netz geladen. Danach erhöht sich "electricLevel" alle 2 Stunden um 1 %, was zu der Angabe von "Battery pack power" = 9 W passt.
Werte unter "properties" sind dann allerdings gelogen:- "gridInputPower" = "gridOffPower" um 17 W (Mini-PC: 6 W + Router)
- "outputPackPower": 0 W
Gibt es eine Minimalleistungsaufnahme am Notstrom-Ausgang, damit nicht über den "socSet" hinaus geladen wird?
Als ich zu Beginn mal eine 75 W Glühlampe angeschlossen hatte, blieb der SOC auf 85 % konstant.gut beobachtet.
Das lässt sich elektrotechnisch und physikalisch gut erklären.
Die Werte sind nicht direkt „gelogen“, sondern unterliegen den typischen Grenzen der Sensoren bei Kleinstleistungen.Hier spielen mehrere Effekte zusammen, z. B.:
Sensor-Toleranz im Mikrobereich:
Die internen Stromsensoren (Shunts) des Geräts sind für hohe Ströme (z. B. beim Laden mit 800 W) optimiert.
Wenn das Gerät bei Erreichen des socSet (85 %) das Hauptladen beendet, schaltet es in den Standby-/Erhaltungsmodus.
Die dabei fließenden Ströme sind so minimal, dass die Software auf 0 W abgerundet wird, obwohl im Hintergrund minimale Erhaltungsimpulse fließen.Eigenverbrauch vs. Last am Notstrom-Ausgang:
Dein Mini-PC und der Router ziehen zusammen ca. 17 W.
Das ist extrem wenig.
Wenn das Gerät im Standby läuft, reicht diese geringe Last am Notstrom Ausgang (gridOffPower) bestimmt nicht aus, um die minimale Erhaltungsenergie, die das System intern regelt, vollständig zu verbrauchen,
Ein Teil sickert weiterhin in die Zellen, weshalb der SOC alle 2 Stunden um 1 % nach oben kriecht.Bei 75 W Last war der Verbrauch am Ausgang hoch genug, um die gesamte bereitgestellte Erhaltungsenergie sofort abzunehmen.
Der Akku musste nichts mehr aufnehmen und blieb stabil auf den konfigurierten 85 % stehen.Das ist m. M. n. kein Zendure-eigenes Problem sondern allgemein elektrotechnisch kaum anders möglich.
Abhängig von der Güte der Sensoren, BMS, den jeweiligen Messbereichen usw.
Vermutlich gibt es keine feste „Mindestleistungsaufnahme“, sondern es ist ein reines Balance-Spiel zwischen der minimalen Erhaltungsleistung des BMS und der angeschlossenen Grundlast im Standby.
Wie das genau von Zendure gelöst ist kann ich nicht beurteilen.
Die beobachteten Werte und Wertfindung sind dabei elektrotechnisch jedoch völlig plausibel.EDIT: Übrigens habe ich noch folgende Werte unter "properties", die nicht der Beschreibung entsprechen:
- "pass": 3
- "socLimit": 17
Das ist für mich neu.
Bei mir stimmen die Werte und die Beschreibung (noch).Hast Du die Firmware aktualisiert?
Wenn ja, hat Zendure im Hintergrund vermutlich etwas an den API-Objekten geändert oder es ist ein neuer Bug.
Das ist für mich im Moment auch ein Novum, über das ich aktuell noch keine näheren Informationen habe.@maxclaudi [sagte]: Die Werte sind nicht direkt „gelogen“
Stimmt. Ich messe jetzt mittels einer FRITZ!DECT 200 die Netzleistung des SF. Sie stimmt nahezu mit der "gridOffPower" überein (ca. 17 W), wenn "acMode" = 1 (Netzladen) und der SoC >= "socSet" ist.
Trotzdem steigt oberhalb von "socSet" der SoC um 1 % alle 2 Stunden, was einer Ladeleistung von 9 W entspricht, die auch im DP "Battery pack power" angezeigt wird. Woher kommt diese zusätzliche Leistung? Gibt es eine Zusatzbatterie? -
@maxclaudi [sagte]: Die Werte sind nicht direkt „gelogen“
Stimmt. Ich messe jetzt mittels einer FRITZ!DECT 200 die Netzleistung des SF. Sie stimmt nahezu mit der "gridOffPower" überein (ca. 17 W), wenn "acMode" = 1 (Netzladen) und der SoC >= "socSet" ist.
Trotzdem steigt oberhalb von "socSet" der SoC um 1 % alle 2 Stunden, was einer Ladeleistung von 9 W entspricht, die auch im DP "Battery pack power" angezeigt wird. Woher kommt diese zusätzliche Leistung? Gibt es eine Zusatzbatterie? -
Hallo @maxclaudi
@Jockel_Bln
hätte 2 Fragen, weil Du den 2400AC+ verwendest.- Welche Version verwendest Du?
Da mich die App gleich nach der Installation zum Update genötigt hat, habe ich die Version 3 drauf.
Sind die Unterschiede noch vorhanden, oder wurden die keys bei den Geräten 24XX AC oder >2XXX nun angepasst und liefern auch:
properties.Fanmode: 1
properties.Fanspeed: 0Ich bekomme auch
properties.Fanmode: 1
properties.Fanspeed: 0
Lüfter-Steuerung integriert; zum Script:
update 25.06.26 10.30h control FAN -
Lüfter-Steuerung integriert; zum Script:
update 25.06.26 10.30h control FANdas mit „< 96“ hast Du ja selbst schon korrigiert.
Ja, hat ein bischen gedauert, bis mir das aufgefallen ist

Ein paar Vorschläge:
Abfrage vor dem Senden:...
Gute Idee, das habe ich jetzt so gelöst:

Mehrere Batterien einplanen:
Dafür ... properties.electricLevel nutzen.Erledigt. Am Dienstag kam noch meine zusätzliche Batterie, da bin ich dann auch drauf gekommen, dass die erste Lösung nicht mehr greift.
Mindestdauer & Hysterese:
Man könnte eine Mindestdauer für geänderte Limits einsetzen, um schnelles Hin- und Herschalten zu vermeiden.
Dein Trigger ist zwar alle 10 sec, aber ein setzen von einem neuen Limit bis es ordentlich und ruhig anfängt zu wirken, benötigt allein schon diese Zeit.
Eine kleine Hysterese hilft ebenfalls:
outputLimit erst ändern, wenn der neue Wert um mindestens X Watt (z. B. deine 10W oder 20W) vom aktuellen Wert abweicht.Das mit der Mindestdauer bekomme ich momentan noch nicht gebacken. Bin ja schon Rentner und muss mir alles langsam erarbeiten, da ich mich nie mit Skripten befasst habe.
Was eine Hysterese betrifft, muss ich mal sehen, ob mir da was schlaues einfällt, die Werte am Zähler springen ja reichlich hin und her.
Ich teste jetzt gerade etwas Anderes. Ich lasse den Zähler im Sekundentakt senden und bilde dann einen gleitenden Mittelwert über 20 Sekunden.
Mit diesem Mittelwert lasse ich dann das Skript arbeiten. Mal gucken, wie sich das verhält.

Mehr habe ich bis jetzt noch nicht, aber es läuft schon ganz gut.
Vielen Dan für die Unterstützung!
PS: einen Lüfteranschluss hat der AC+ scheinbar nicht

-
das mit „< 96“ hast Du ja selbst schon korrigiert.
Ja, hat ein bischen gedauert, bis mir das aufgefallen ist

Ein paar Vorschläge:
Abfrage vor dem Senden:...
Gute Idee, das habe ich jetzt so gelöst:

Mehrere Batterien einplanen:
Dafür ... properties.electricLevel nutzen.Erledigt. Am Dienstag kam noch meine zusätzliche Batterie, da bin ich dann auch drauf gekommen, dass die erste Lösung nicht mehr greift.
Mindestdauer & Hysterese:
Man könnte eine Mindestdauer für geänderte Limits einsetzen, um schnelles Hin- und Herschalten zu vermeiden.
Dein Trigger ist zwar alle 10 sec, aber ein setzen von einem neuen Limit bis es ordentlich und ruhig anfängt zu wirken, benötigt allein schon diese Zeit.
Eine kleine Hysterese hilft ebenfalls:
outputLimit erst ändern, wenn der neue Wert um mindestens X Watt (z. B. deine 10W oder 20W) vom aktuellen Wert abweicht.Das mit der Mindestdauer bekomme ich momentan noch nicht gebacken. Bin ja schon Rentner und muss mir alles langsam erarbeiten, da ich mich nie mit Skripten befasst habe.
Was eine Hysterese betrifft, muss ich mal sehen, ob mir da was schlaues einfällt, die Werte am Zähler springen ja reichlich hin und her.
Ich teste jetzt gerade etwas Anderes. Ich lasse den Zähler im Sekundentakt senden und bilde dann einen gleitenden Mittelwert über 20 Sekunden.
Mit diesem Mittelwert lasse ich dann das Skript arbeiten. Mal gucken, wie sich das verhält.

Mehr habe ich bis jetzt noch nicht, aber es läuft schon ganz gut.
Vielen Dan für die Unterstützung!
PS: einen Lüfteranschluss hat der AC+ scheinbar nicht

@Jockel_Bln sagte:
Gute Idee, das habe ich jetzt so gelöst:

Guten Morgen,
bitte keine Auswertungen/Vergleiche auf die set Datenpunkte von control:
0_userdata.0.zendure.xxxxxxxxxx.controlDie control Datenpunkte werden zwar synchronisiert, sind jedoch zum reinen setzen von soll-Werten und senden vorgesehen.
Zum Auswerten, Vergleichen bitte die read-only Datenpunkte verwenden:
0_userdata.0.zendure.xxxxxxxxxx.properties
0_userdata.0.zendure.xxxxxxxxxx.packDataIn Deinem Beispiel:
falls output !== Wert von Objekt ID "properties.outputLimit"
mache steuere Set/in-Out_Limit-Automatic mit outputPS: einen Lüfteranschluss hat der AC+ scheinbar nicht

Ja, nicht alle Geräte haben einen dedizierten Lüfter-Anschluss. Die SF800 pro 2 Serie, 2400AC und einige andere haben einen Anschluss. Das Script soll alle Geräte unterstützen.
-
@Jockel_Bln sagte:
Gute Idee, das habe ich jetzt so gelöst:

Guten Morgen,
bitte keine Auswertungen/Vergleiche auf die set Datenpunkte von control:
0_userdata.0.zendure.xxxxxxxxxx.controlDie control Datenpunkte werden zwar synchronisiert, sind jedoch zum reinen setzen von soll-Werten und senden vorgesehen.
Zum Auswerten, Vergleichen bitte die read-only Datenpunkte verwenden:
0_userdata.0.zendure.xxxxxxxxxx.properties
0_userdata.0.zendure.xxxxxxxxxx.packDataIn Deinem Beispiel:
falls output !== Wert von Objekt ID "properties.outputLimit"
mache steuere Set/in-Out_Limit-Automatic mit outputPS: einen Lüfteranschluss hat der AC+ scheinbar nicht

Ja, nicht alle Geräte haben einen dedizierten Lüfter-Anschluss. Die SF800 pro 2 Serie, 2400AC und einige andere haben einen Anschluss. Das Script soll alle Geräte unterstützen.
Sorry, hab grad keine Möglichkeit, dass grafisch zu beschreiben:
Statt "Output =/= Wert"
könnte man doch sagen "Output < OutputLimit - 20 oder Output > OutputLimit + 20"
Dann hätte man doch eine Hysterese von 20W, oder nicht?Und nach erfolgter Anpassung müsste doch ein eingeschobener Timeout reichen, der dann als Blockzeit für zu schnelle Änderungen fungiert.
Mein SF800Pro2 ist zwar lezte Woche gekommen, aber ich hab (leider leider) noch keine Zeit gehabt, den in Betrieb zu nehmen, damit ich in die Script-Bastelei einsteigen kann

Gruß
-
@Jockel_Bln sagte:
Gute Idee, das habe ich jetzt so gelöst:

Guten Morgen,
bitte keine Auswertungen/Vergleiche auf die set Datenpunkte von control:
0_userdata.0.zendure.xxxxxxxxxx.controlDie control Datenpunkte werden zwar synchronisiert, sind jedoch zum reinen setzen von soll-Werten und senden vorgesehen.
Zum Auswerten, Vergleichen bitte die read-only Datenpunkte verwenden:
0_userdata.0.zendure.xxxxxxxxxx.properties
0_userdata.0.zendure.xxxxxxxxxx.packDataIn Deinem Beispiel:
falls output !== Wert von Objekt ID "properties.outputLimit"
mache steuere Set/in-Out_Limit-Automatic mit outputPS: einen Lüfteranschluss hat der AC+ scheinbar nicht

Ja, nicht alle Geräte haben einen dedizierten Lüfter-Anschluss. Die SF800 pro 2 Serie, 2400AC und einige andere haben einen Anschluss. Das Script soll alle Geräte unterstützen.
Zum Auswerten, Vergleichen bitte die read-only Datenpunkte verwenden:
0_userdata.0.zendure.xxxxxxxxxx.properties
0_userdata.0.zendure.xxxxxxxxxx.packDataDanke! Ja du hast Recht, da wird dann verglichen, ob der Wert auch wirklich "angenommen" wurde. Hätte ich auch selbst drauf kommen können.
Ja, nicht alle Geräte haben einen dedizierten Lüfter-Anschluss.
...
Das Script soll alle Geräte unterstützen.Schon klar. Ich wollte auch nur zum Ausdruck bringen, dass ich das Nichtvorhandensein beim AC+ schade finde.
Statt "Output =/= Wert"
könnte man doch sagen "Output < OutputLimit - 20 oder Output > OutputLimit + 20"Das müsste gehen. andersrum bin ich ganz froh, dass das System beim Zurückspeisen dann um den Nullpunkt herum recht genau regelt. Somit geht nachts fast nichts ins Netz.
Ich muss mir das nochmal durch den Kopf gehen lassen.Und nach erfolgter Anpassung müsste doch ein eingeschobener Timeout reichen,...
Da sprichst du einen blinden Punkt bei mir an. Wie man mit diesen Timeouts genau umgeht, habe ich bis heute nicht richtig kapiert. Wie gesagt ich bin ein älterer technischer Laie und versuche das alles im Selbststudium zu lernen

Mich würde mal interessieren in welchen Abständen das integrierte HEMS regeln würde und ob ich da mit meinen 20 Sekunden Intervall sehr weit entfernt bin. Ich kann das aber mangels passendem Smartmeter nicht selbst testen.@maxclaudi Ist das für dich in Ordnung, wenn wir hier weiter über das Skript reden, oder doch lieber in einem separaten Thema.
-
Zum Auswerten, Vergleichen bitte die read-only Datenpunkte verwenden:
0_userdata.0.zendure.xxxxxxxxxx.properties
0_userdata.0.zendure.xxxxxxxxxx.packDataDanke! Ja du hast Recht, da wird dann verglichen, ob der Wert auch wirklich "angenommen" wurde. Hätte ich auch selbst drauf kommen können.
Ja, nicht alle Geräte haben einen dedizierten Lüfter-Anschluss.
...
Das Script soll alle Geräte unterstützen.Schon klar. Ich wollte auch nur zum Ausdruck bringen, dass ich das Nichtvorhandensein beim AC+ schade finde.
Statt "Output =/= Wert"
könnte man doch sagen "Output < OutputLimit - 20 oder Output > OutputLimit + 20"Das müsste gehen. andersrum bin ich ganz froh, dass das System beim Zurückspeisen dann um den Nullpunkt herum recht genau regelt. Somit geht nachts fast nichts ins Netz.
Ich muss mir das nochmal durch den Kopf gehen lassen.Und nach erfolgter Anpassung müsste doch ein eingeschobener Timeout reichen,...
Da sprichst du einen blinden Punkt bei mir an. Wie man mit diesen Timeouts genau umgeht, habe ich bis heute nicht richtig kapiert. Wie gesagt ich bin ein älterer technischer Laie und versuche das alles im Selbststudium zu lernen

Mich würde mal interessieren in welchen Abständen das integrierte HEMS regeln würde und ob ich da mit meinen 20 Sekunden Intervall sehr weit entfernt bin. Ich kann das aber mangels passendem Smartmeter nicht selbst testen.@maxclaudi Ist das für dich in Ordnung, wenn wir hier weiter über das Skript reden, oder doch lieber in einem separaten Thema.
@Jockel_Bln sagte:
@maxclaudi Ist das für dich in Ordnung, wenn wir hier weiter über das Skript reden...ist doch gut. Bei einem Update werde ich im ersten Post (und im laufenden Thread) wieder auf das eigentliche Steuerungs-Script verlinken.
Edit: So bleibt alles beieinander und andere finden evtl. gleich was Nützliches für ihr eigenes Script.
Vielleicht wird dadurch ja auch eine allround Basis oder zumindest eine Hilfe für Einsteiger geschaffen.@Jockel_Bln sagte:
Das mit der Mindestdauer bekomme ich momentan noch nicht gebacken....
Was eine Hysterese betrifft, muss ich mal sehen, ob mir da was schlaues einfällt, die Werte am Zähler springen ja reichlich hin und her.lass sie springen ;-)
bin kein Freund von Timer und Timeouts, wenn sie nicht sein müssen.
Hier ein Beispiel, wie man das einfach über die Systemzeit realisieren kann:

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xY{w8?Sp~0Jea0SewLzs">batteryLock</variable> <variable id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</variable> <variable id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</variable> <variable id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</variable> <variable id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</variable> <variable id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</variable> <variable id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</variable> <variable id="6jV)pWhw1z4,L)/zXmp@">nowSec</variable> <variable id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</variable> <variable id="!f%Ln*^txgvN{P19_n`B">NewLimit</variable> </variables> <block type="comment" id="B`~2Lup]No@[ab~vG0Fv" x="88" y="10738"> <field name="COMMENT">batteryLock nur als Beispiel</field> <next> <block type="variables_set" id="DK?3qF6XQUkI+RaYng!,"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="e/wU{-WQGok:mx9Vj:zT"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="CjLEJvvem:j^rc|xQYIQ"> <field name="COMMENT">max. Einspeisung: negativ W&#10;max. Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="l1FQvOdlC:i?J$XdK:RZ"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> <value name="VALUE"> <block type="math_number" id="EB9;e!]z6P/nk;moQvA("> <field name="NUM">-20</field> </block> </value> <next> <block type="variables_set" id="//Q0KB!yBPC2IfF`ky4K"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> <value name="VALUE"> <block type="math_number" id="gtGa@*icFGlbmV]Any8f"> <field name="NUM">-5</field> </block> </value> <next> <block type="comment" id="7$Bsvz@k(wNFYy~,{|9i"> <field name="COMMENT">Sekunden wie lange&#10;outputLimit&#10;gehalten werden soll</field> <next> <block type="variables_set" id=":Hxw7.yl%,)*0G@.SrK5"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> <value name="VALUE"> <block type="math_number" id="UcYarz.]=Yc!)Zs+;nQf"> <field name="NUM">30</field> </block> </value> <next> <block type="variables_set" id="k2oe8wsrfMf6oIFe^|-6"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="math_number" id="2A@!w^;vKVrUAn1=A?Dy"> <field name="NUM">0</field> </block> </value> <next> <block type="comment" id="$a0*dJJf~721y76c*,#P"> <field name="COMMENT">max. outputLimit</field> <next> <block type="variables_set" id=")na@nqSqVAzH1]6-QQ)]"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> <value name="VALUE"> <block type="math_number" id="3BS=X#tit:R,9Gab^[Pb"> <field name="NUM">800</field> </block> </value> <next> <block type="comment" id="NkKWo}e@M=jRzestwaNO"> <field name="COMMENT">Trigger Stromzähler&#10;alle 5 sek.</field> <next> <block type="on_ext" id="P$}#rr[k?RyM|3ryd$}Y"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="[ODzzI~E=p^s1Q?JCZ)D"> <field name="oid">ID auswählen</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="4Q:SmVKFDh?q)=:x`:aN"> <field name="COMMENT">gridMeterValue&#10;Einspeisung: negativ W&#10;Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="%UJw9T^`i(MP(n6294wT"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> <value name="VALUE"> <block type="on_source" id="=Yu5Z-+Gy[Vp:)3#;fu+"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="comment" id="eb)%`~[NQkLRT,m`6dbu"> <field name="COMMENT">aktuelle Sekunden</field> <next> <block type="variables_set" id="IhJ54dcjRh,ck!GD=[ig"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="AuU:+}b=_Hx4id)5dci]"> <mutation name="getNowSec"></mutation> </block> </value> <next> <block type="comment" id="Re}zez)lzFB)hQ+fgHAU"> <field name="COMMENT">Logik- DPL</field> <next> <block type="controls_if" id="[2y44(h8!PsDDB~wlN-."> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_multi_and" id="?N`S2u#=+btllD!K,AU("> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <value name="AND0"> <block type="logic_compare" id="S6D(BrMSZT0ZrpgEbiNT"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="7j=nrChBIo]/Yz#^FVUy"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="C|dIdqh7(Jz!@Oho}6}$"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="|G*r@{Qv_|UC*N9iued)"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="Gpdu1~].Q0DOjwN];#w1"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="nSRZO:R~W/TtmwE^!og{"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> <value name="AND2"> <block type="logic_multi_or" id="*pR$P6VuS$ej|q($?Jzx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="`Gc0xr[]d0!2_!:#WIBb"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="7@4uHMmLjUdpHS{C22Zs"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id="yJIV6/[)R?n:kG*L7.9Q"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="ckZ*U:oi|arMmQ850.%a"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="HI9^GqB0[B.Zm/w27L!C"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id=".amyEk_$i)^(w7$gewot"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> </block> </value> </block> </value> </block> </value> <value name="AND3"> <block type="logic_compare" id="$iNq5:qW.#}l2]mh4hF?"> <field name="OP">GTE</field> <value name="A"> <block type="math_arithmetic" id="^q7uJ0}p5C3-{1[yzQ5F"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="HL4/1ObSbLA6gQ*^HLYH"> <field name="NUM">1</field> </shadow> <block type="variables_get" id=";`3)VMTB)}_KxO{NxJaT"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> <value name="B"> <shadow type="math_number" id="{Yl2NFYd7K:|7i0HLGH9"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="7]2u.SWTW6?^:N/?/8nf"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="KMFd8yAexy7%iYWk~L`A"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="IZLF52G11ONkAv|Sga,f"> <value name="IF0"> <block type="logic_compare" id="?n(rW+Oa5*tJ]Jdamz*V"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="QvK}D|H0S*iWK#Q[wvgg"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="w=$}9oCSuIs6*=uVv+03"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="u^o,~NZ#.CJg`9X?GOgc"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="Rd8:}^b90:)]LTi:]DB?"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id=":`0Y]j3lps51~0`EvC{n"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="@m,$e$k{2~e1x?n=LlHv"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="h85QZeI7p9D(:4)sfYF%"> <field name="NUM">1</field> </shadow> <block type="get_value" id="W=~+~})L~~UIJ;p_Y-3)"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="l|2B%;vkM[`U4%;n3|`t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="3P/l}|YyfrYV-$Eq{OkL"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="kH$OVvVc;6#@E[n@6cPx"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="8ma`kdUu~u0Vq.Gvy?+."> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <shadow type="math_number" id="-3_2YxLm_H#2y(+RY|sn"> <field name="NUM">1</field> </shadow> <block type="math_number" id="?z@zV#c1kJpQ8X||SP+K"> <field name="NUM">-1</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="+L:7:q{.6A{o!^xc*uG#"> <value name="IF0"> <block type="logic_compare" id="%{$[A{#7Yqnmh0sD($;^"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="$0bZ]4Lo)Y97+gWR!{fP"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="AS([9Q4+Iwu(z_#MIVzn"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="kmtV~]xVU/U2~mO?a**3"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="YwZ[g2yR,O101n3!!fN7"> <field name="OP">ROUNDUP</field> <value name="NUM"> <shadow type="math_number" id="RTIrDtXuT+g9p)~aUdfP"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="_2qIwS1+tX^xYaV`6S|,"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="t*o!./qY(-z]IyH3fDzi"> <field name="NUM">1</field> </shadow> <block type="get_value" id="ZsV.X[y0l|a/LE%[Lu/c"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="JFF^]=-=xFh@.Bkyx_(/"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="1R{0Aj@MY!g0Yze6CX_h"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="g@(vG]*OUy2JLf^=m6l+"> <mutation elseif="5" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id=".na%l!e0oSW!iK=o2G4!"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="a^:Ag8(3$$D34UA02Tf$"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jei?/sY|v-fpFNtU#[i`"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="ue1q+ExXrlL~]n9#$be2"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="V{HbiRMuhL.cqpReJl_4"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="M{Ii3sf2k1B4K%$4h]?q"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Ml9{!P#F*ihd_f3lfhaO"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="BqSelKS67-|JjO{2{67^"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="`L0^4z`.aBIT)Qx:./X4"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="Lg5w+8!XEN|N[RAaVM:W"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="C)ABAd]#v|iE26-O+Od~"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="+vER?,t9_GOUhX@))1Uj"> <field name="NUM">30</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="(,$CxCnJa.{dJ@EGA}*H"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="5]k`!yHNVUN05IQPoASi"> <field name="NUM">30</field> </block> </value> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="%|zlZsEgVwAFj(A[5N:_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="ye2n/~_wxvV0WO:Kf8[4"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="WS4FHhpB!/9!_NmTDYX*"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="TSpYTslU+[r{fuPk4b+p"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="_)ptql`crZGDydxtq;UI"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="VI.Zu*B*Rus[,xuF{:c:"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jH}z]*8WV5dR{Gi9_b(7"> <field name="NUM">60</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="variables_set" id="Vq:)#pNoH?sRu2EP41Vg"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id=";cfhl|ObEP$*s8}a5`.7"> <field name="NUM">60</field> </block> </value> </block> </statement> <value name="IF3"> <block type="logic_multi_and" id="3,m|@{YUB,%:HgF(n`^-"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="(imyvzh%bl$g(?!9M-~7"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="NH53D`G|wzRakp?4QaTC"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="*pg%r=mBnOLDKRRz#CD|"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="F6LGV[Bbts,F8HwB)?vj"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="#*MX3vPm4S5EkH=a2~Fi"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="V;b0Qla!ngk+UO03N.qb"> <field name="NUM">90</field> </block> </value> </block> </value> </block> </value> <statement name="DO3"> <block type="variables_set" id=",##sr}kLyc___`8-D2qS"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="~N*4e!@@kmJ4oB8(A:Bf"> <field name="NUM">90</field> </block> </value> </block> </statement> <value name="IF4"> <block type="logic_multi_and" id="ck=PtrH@1n6xT_Uy534_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="aQ)k!!mb30BmlEPT|!wn"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="geE(HzW0#vsil%#Yi9@J"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="2DFZ,,SaN.=f.u!O+gM_"> <field name="NUM">90</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="R-#e}^%,TZ=^(HHGg)3#"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="J!*3(X{=h%13jR7,{L7W"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="}ci)8/U@BS5ZG{`}:/Gd"> <field name="NUM">100</field> </block> </value> </block> </value> </block> </value> <statement name="DO4"> <block type="variables_set" id="xMaB1zs]gPmR;-QhiqTm"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="/xtk;Wn4;VC/S[gm.*5i"> <field name="NUM">100</field> </block> </value> </block> </statement> <value name="IF5"> <block type="logic_multi_and" id="/H?Jk#INlFRS26^o8Qh*"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="EnPfaM|-b}%bx89sQq(D"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="t]5w`blFMx~dRCXpS82Y"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="a4H:ynOe^z?HzI|*#6M%"> <field name="NUM">100</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="w]5-ZMz=+sKj+[lyfEcV"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id=":~!X@Da@mV3_%-nnt9|t"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="]`k}*$U[x8T)D;SFt2*T"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </value> <statement name="DO5"> <block type="variables_set" id="kE$KjD1sq`zo7N4XzO8W"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="variables_get" id="0N-L^1LGavYXMSGto#0i"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="h/k3;T$Ds?%`Dc2a]A(Y"> <value name="IF0"> <block type="logic_compare" id="s$$6hA]|wS^%v$azgbc("> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="D`R(6C9Whcox}UCLtHyk"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="LJ?k%c5.9@^Zb@GY59s."> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="%`Qf}#6ll+buxb1RrfO("> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_round" id="Aivr3_W]J?~H7PL-(Qn2"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="2q.OIETW9F$f8*^m.pR7"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="hkymtbi%V;Ewsb]HY@Tv"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id=":xA_/$utkabK$dY]WA;."> <value name="IF0"> <block type="logic_compare" id="gDbKvBq/8jNWZ$!Wgw06"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="$y7+$mq6[$4iP@HA;4(`"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <value name="B"> <block type="get_value" id="Kj[gA5EP!;[5lS238LJT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="sY3aT9oP|V=)M,RY?8n3"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.auto_in_out_Limit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="DVJGhR]|p#F92SS]O@}5"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <next> <block type="variables_set" id="wu6sI?s@RYKT0EO)I?T,"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="opGu^p^dmwOUCp|HvY(Z"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="M*u}`W8hfB51X2~XhP2="> <value name="IF0"> <block type="logic_multi_or" id="[Byq|Pc)]dzKtE.,_]ua"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="g0fwE?h]64A[vz*{vDBf"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="LMQfo^aZZ1!:Qn$Zg)[Q"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="hk4~(Oq,BcGk07:_TRQL"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="gH{YL=RD):.Xc1p}SES2"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="Xp-(zS;c@5moDZX*oidb"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="N!c2`[Ha2.6/4$m#p7IL"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="jsF+AiW#j=IEKW))-/Z]"> <field name="COMMENT">falls outputLimit nicht 0</field> <next> <block type="controls_if" id="zdAF~Zi(zQu!xfbcgiZx"> <value name="IF0"> <block type="logic_compare" id="d5juG(gsQkg5X5`Fm}3*"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="yw9NQ?TgGLT~uXu{*IuT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> <value name="B"> <block type="math_number" id="XBf`):7^MV]8u6jEcg3q"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="U[Hl|(_Y4FBQXR7CtRX_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.outputLimit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="gBw(glQzU|-9xx=%4~R5"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="EM*kUUw)$;Nwk]969aRX"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="e2gN_]V5p+W)G2ipaAhr"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id="*[JBn(Fqq9m3!8LlvpAh" x="588" y="10913"> <mutation statements="false"></mutation> <field name="NAME">getNowSec</field> <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoRGF0ZS5ub3coKSAvIDEwMDApOw0K</field> <comment pinned="false" h="80" w="160">liefert aktuelle Sekunden</comment> </block> </xml> -
@Jockel_Bln sagte:
@maxclaudi Ist das für dich in Ordnung, wenn wir hier weiter über das Skript reden...ist doch gut. Bei einem Update werde ich im ersten Post (und im laufenden Thread) wieder auf das eigentliche Steuerungs-Script verlinken.
Edit: So bleibt alles beieinander und andere finden evtl. gleich was Nützliches für ihr eigenes Script.
Vielleicht wird dadurch ja auch eine allround Basis oder zumindest eine Hilfe für Einsteiger geschaffen.@Jockel_Bln sagte:
Das mit der Mindestdauer bekomme ich momentan noch nicht gebacken....
Was eine Hysterese betrifft, muss ich mal sehen, ob mir da was schlaues einfällt, die Werte am Zähler springen ja reichlich hin und her.lass sie springen ;-)
bin kein Freund von Timer und Timeouts, wenn sie nicht sein müssen.
Hier ein Beispiel, wie man das einfach über die Systemzeit realisieren kann:

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xY{w8?Sp~0Jea0SewLzs">batteryLock</variable> <variable id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</variable> <variable id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</variable> <variable id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</variable> <variable id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</variable> <variable id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</variable> <variable id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</variable> <variable id="6jV)pWhw1z4,L)/zXmp@">nowSec</variable> <variable id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</variable> <variable id="!f%Ln*^txgvN{P19_n`B">NewLimit</variable> </variables> <block type="comment" id="B`~2Lup]No@[ab~vG0Fv" x="88" y="10738"> <field name="COMMENT">batteryLock nur als Beispiel</field> <next> <block type="variables_set" id="DK?3qF6XQUkI+RaYng!,"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="e/wU{-WQGok:mx9Vj:zT"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="CjLEJvvem:j^rc|xQYIQ"> <field name="COMMENT">max. Einspeisung: negativ W&#10;max. Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="l1FQvOdlC:i?J$XdK:RZ"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> <value name="VALUE"> <block type="math_number" id="EB9;e!]z6P/nk;moQvA("> <field name="NUM">-20</field> </block> </value> <next> <block type="variables_set" id="//Q0KB!yBPC2IfF`ky4K"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> <value name="VALUE"> <block type="math_number" id="gtGa@*icFGlbmV]Any8f"> <field name="NUM">-5</field> </block> </value> <next> <block type="comment" id="7$Bsvz@k(wNFYy~,{|9i"> <field name="COMMENT">Sekunden wie lange&#10;outputLimit&#10;gehalten werden soll</field> <next> <block type="variables_set" id=":Hxw7.yl%,)*0G@.SrK5"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> <value name="VALUE"> <block type="math_number" id="UcYarz.]=Yc!)Zs+;nQf"> <field name="NUM">30</field> </block> </value> <next> <block type="variables_set" id="k2oe8wsrfMf6oIFe^|-6"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="math_number" id="2A@!w^;vKVrUAn1=A?Dy"> <field name="NUM">0</field> </block> </value> <next> <block type="comment" id="$a0*dJJf~721y76c*,#P"> <field name="COMMENT">max. outputLimit</field> <next> <block type="variables_set" id=")na@nqSqVAzH1]6-QQ)]"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> <value name="VALUE"> <block type="math_number" id="3BS=X#tit:R,9Gab^[Pb"> <field name="NUM">800</field> </block> </value> <next> <block type="comment" id="NkKWo}e@M=jRzestwaNO"> <field name="COMMENT">Trigger Stromzähler&#10;alle 5 sek.</field> <next> <block type="on_ext" id="P$}#rr[k?RyM|3ryd$}Y"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="[ODzzI~E=p^s1Q?JCZ)D"> <field name="oid">ID auswählen</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="4Q:SmVKFDh?q)=:x`:aN"> <field name="COMMENT">gridMeterValue&#10;Einspeisung: negativ W&#10;Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="%UJw9T^`i(MP(n6294wT"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> <value name="VALUE"> <block type="on_source" id="=Yu5Z-+Gy[Vp:)3#;fu+"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="comment" id="eb)%`~[NQkLRT,m`6dbu"> <field name="COMMENT">aktuelle Sekunden</field> <next> <block type="variables_set" id="IhJ54dcjRh,ck!GD=[ig"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="AuU:+}b=_Hx4id)5dci]"> <mutation name="getNowSec"></mutation> </block> </value> <next> <block type="comment" id="Re}zez)lzFB)hQ+fgHAU"> <field name="COMMENT">Logik- DPL</field> <next> <block type="controls_if" id="[2y44(h8!PsDDB~wlN-."> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_multi_and" id="?N`S2u#=+btllD!K,AU("> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <value name="AND0"> <block type="logic_compare" id="S6D(BrMSZT0ZrpgEbiNT"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="7j=nrChBIo]/Yz#^FVUy"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="C|dIdqh7(Jz!@Oho}6}$"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="|G*r@{Qv_|UC*N9iued)"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="Gpdu1~].Q0DOjwN];#w1"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="nSRZO:R~W/TtmwE^!og{"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> <value name="AND2"> <block type="logic_multi_or" id="*pR$P6VuS$ej|q($?Jzx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="`Gc0xr[]d0!2_!:#WIBb"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="7@4uHMmLjUdpHS{C22Zs"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id="yJIV6/[)R?n:kG*L7.9Q"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="ckZ*U:oi|arMmQ850.%a"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="HI9^GqB0[B.Zm/w27L!C"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id=".amyEk_$i)^(w7$gewot"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> </block> </value> </block> </value> </block> </value> <value name="AND3"> <block type="logic_compare" id="$iNq5:qW.#}l2]mh4hF?"> <field name="OP">GTE</field> <value name="A"> <block type="math_arithmetic" id="^q7uJ0}p5C3-{1[yzQ5F"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="HL4/1ObSbLA6gQ*^HLYH"> <field name="NUM">1</field> </shadow> <block type="variables_get" id=";`3)VMTB)}_KxO{NxJaT"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> <value name="B"> <shadow type="math_number" id="{Yl2NFYd7K:|7i0HLGH9"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="7]2u.SWTW6?^:N/?/8nf"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="KMFd8yAexy7%iYWk~L`A"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="IZLF52G11ONkAv|Sga,f"> <value name="IF0"> <block type="logic_compare" id="?n(rW+Oa5*tJ]Jdamz*V"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="QvK}D|H0S*iWK#Q[wvgg"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="w=$}9oCSuIs6*=uVv+03"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="u^o,~NZ#.CJg`9X?GOgc"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="Rd8:}^b90:)]LTi:]DB?"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id=":`0Y]j3lps51~0`EvC{n"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="@m,$e$k{2~e1x?n=LlHv"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="h85QZeI7p9D(:4)sfYF%"> <field name="NUM">1</field> </shadow> <block type="get_value" id="W=~+~})L~~UIJ;p_Y-3)"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="l|2B%;vkM[`U4%;n3|`t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="3P/l}|YyfrYV-$Eq{OkL"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="kH$OVvVc;6#@E[n@6cPx"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="8ma`kdUu~u0Vq.Gvy?+."> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <shadow type="math_number" id="-3_2YxLm_H#2y(+RY|sn"> <field name="NUM">1</field> </shadow> <block type="math_number" id="?z@zV#c1kJpQ8X||SP+K"> <field name="NUM">-1</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="+L:7:q{.6A{o!^xc*uG#"> <value name="IF0"> <block type="logic_compare" id="%{$[A{#7Yqnmh0sD($;^"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="$0bZ]4Lo)Y97+gWR!{fP"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="AS([9Q4+Iwu(z_#MIVzn"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="kmtV~]xVU/U2~mO?a**3"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="YwZ[g2yR,O101n3!!fN7"> <field name="OP">ROUNDUP</field> <value name="NUM"> <shadow type="math_number" id="RTIrDtXuT+g9p)~aUdfP"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="_2qIwS1+tX^xYaV`6S|,"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="t*o!./qY(-z]IyH3fDzi"> <field name="NUM">1</field> </shadow> <block type="get_value" id="ZsV.X[y0l|a/LE%[Lu/c"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="JFF^]=-=xFh@.Bkyx_(/"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="1R{0Aj@MY!g0Yze6CX_h"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="g@(vG]*OUy2JLf^=m6l+"> <mutation elseif="5" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id=".na%l!e0oSW!iK=o2G4!"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="a^:Ag8(3$$D34UA02Tf$"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jei?/sY|v-fpFNtU#[i`"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="ue1q+ExXrlL~]n9#$be2"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="V{HbiRMuhL.cqpReJl_4"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="M{Ii3sf2k1B4K%$4h]?q"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Ml9{!P#F*ihd_f3lfhaO"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="BqSelKS67-|JjO{2{67^"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="`L0^4z`.aBIT)Qx:./X4"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="Lg5w+8!XEN|N[RAaVM:W"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="C)ABAd]#v|iE26-O+Od~"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="+vER?,t9_GOUhX@))1Uj"> <field name="NUM">30</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="(,$CxCnJa.{dJ@EGA}*H"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="5]k`!yHNVUN05IQPoASi"> <field name="NUM">30</field> </block> </value> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="%|zlZsEgVwAFj(A[5N:_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="ye2n/~_wxvV0WO:Kf8[4"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="WS4FHhpB!/9!_NmTDYX*"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="TSpYTslU+[r{fuPk4b+p"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="_)ptql`crZGDydxtq;UI"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="VI.Zu*B*Rus[,xuF{:c:"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jH}z]*8WV5dR{Gi9_b(7"> <field name="NUM">60</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="variables_set" id="Vq:)#pNoH?sRu2EP41Vg"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id=";cfhl|ObEP$*s8}a5`.7"> <field name="NUM">60</field> </block> </value> </block> </statement> <value name="IF3"> <block type="logic_multi_and" id="3,m|@{YUB,%:HgF(n`^-"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="(imyvzh%bl$g(?!9M-~7"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="NH53D`G|wzRakp?4QaTC"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="*pg%r=mBnOLDKRRz#CD|"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="F6LGV[Bbts,F8HwB)?vj"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="#*MX3vPm4S5EkH=a2~Fi"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="V;b0Qla!ngk+UO03N.qb"> <field name="NUM">90</field> </block> </value> </block> </value> </block> </value> <statement name="DO3"> <block type="variables_set" id=",##sr}kLyc___`8-D2qS"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="~N*4e!@@kmJ4oB8(A:Bf"> <field name="NUM">90</field> </block> </value> </block> </statement> <value name="IF4"> <block type="logic_multi_and" id="ck=PtrH@1n6xT_Uy534_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="aQ)k!!mb30BmlEPT|!wn"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="geE(HzW0#vsil%#Yi9@J"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="2DFZ,,SaN.=f.u!O+gM_"> <field name="NUM">90</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="R-#e}^%,TZ=^(HHGg)3#"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="J!*3(X{=h%13jR7,{L7W"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="}ci)8/U@BS5ZG{`}:/Gd"> <field name="NUM">100</field> </block> </value> </block> </value> </block> </value> <statement name="DO4"> <block type="variables_set" id="xMaB1zs]gPmR;-QhiqTm"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="/xtk;Wn4;VC/S[gm.*5i"> <field name="NUM">100</field> </block> </value> </block> </statement> <value name="IF5"> <block type="logic_multi_and" id="/H?Jk#INlFRS26^o8Qh*"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="EnPfaM|-b}%bx89sQq(D"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="t]5w`blFMx~dRCXpS82Y"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="a4H:ynOe^z?HzI|*#6M%"> <field name="NUM">100</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="w]5-ZMz=+sKj+[lyfEcV"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id=":~!X@Da@mV3_%-nnt9|t"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="]`k}*$U[x8T)D;SFt2*T"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </value> <statement name="DO5"> <block type="variables_set" id="kE$KjD1sq`zo7N4XzO8W"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="variables_get" id="0N-L^1LGavYXMSGto#0i"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="h/k3;T$Ds?%`Dc2a]A(Y"> <value name="IF0"> <block type="logic_compare" id="s$$6hA]|wS^%v$azgbc("> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="D`R(6C9Whcox}UCLtHyk"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="LJ?k%c5.9@^Zb@GY59s."> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="%`Qf}#6ll+buxb1RrfO("> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_round" id="Aivr3_W]J?~H7PL-(Qn2"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="2q.OIETW9F$f8*^m.pR7"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="hkymtbi%V;Ewsb]HY@Tv"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id=":xA_/$utkabK$dY]WA;."> <value name="IF0"> <block type="logic_compare" id="gDbKvBq/8jNWZ$!Wgw06"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="$y7+$mq6[$4iP@HA;4(`"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <value name="B"> <block type="get_value" id="Kj[gA5EP!;[5lS238LJT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="sY3aT9oP|V=)M,RY?8n3"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.auto_in_out_Limit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="DVJGhR]|p#F92SS]O@}5"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <next> <block type="variables_set" id="wu6sI?s@RYKT0EO)I?T,"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="opGu^p^dmwOUCp|HvY(Z"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="M*u}`W8hfB51X2~XhP2="> <value name="IF0"> <block type="logic_multi_or" id="[Byq|Pc)]dzKtE.,_]ua"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="g0fwE?h]64A[vz*{vDBf"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="LMQfo^aZZ1!:Qn$Zg)[Q"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="hk4~(Oq,BcGk07:_TRQL"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="gH{YL=RD):.Xc1p}SES2"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="Xp-(zS;c@5moDZX*oidb"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="N!c2`[Ha2.6/4$m#p7IL"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="jsF+AiW#j=IEKW))-/Z]"> <field name="COMMENT">falls outputLimit nicht 0</field> <next> <block type="controls_if" id="zdAF~Zi(zQu!xfbcgiZx"> <value name="IF0"> <block type="logic_compare" id="d5juG(gsQkg5X5`Fm}3*"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="yw9NQ?TgGLT~uXu{*IuT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> <value name="B"> <block type="math_number" id="XBf`):7^MV]8u6jEcg3q"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="U[Hl|(_Y4FBQXR7CtRX_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.outputLimit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="gBw(glQzU|-9xx=%4~R5"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="EM*kUUw)$;Nwk]969aRX"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="e2gN_]V5p+W)G2ipaAhr"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id="*[JBn(Fqq9m3!8LlvpAh" x="588" y="10913"> <mutation statements="false"></mutation> <field name="NAME">getNowSec</field> <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoRGF0ZS5ub3coKSAvIDEwMDApOw0K</field> <comment pinned="false" h="80" w="160">liefert aktuelle Sekunden</comment> </block> </xml>Falls auf einen Datenpunkt getriggert wird, der JSON liefert z. B. Shelly Pro 3EM, dann muss der Wert für gridMeterValue natürlich extrahiert werden.
Beispiel Shelly Pro 3EM:

Beispiel-Blockly:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</variable> </variables> <block type="comment" id="bia-OdV((e``^uH.Q1b}" x="-512" y="588"> <field name="COMMENT">Beispiel&#10;gridMeterValue von Datenpunkt&#10;Shelly Pro 3EM verwenden</field> <next> <block type="on_ext" id="1KU][$ifvW@Ue#^`,47#"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="546O][1$JvDaG{d2Chp+"> <field name="oid">ID auswählen</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id=")|ZkbL/^zn+w%rs8o!#4"> <value name="IF0"> <block type="logic_compare" id=".CxtNU#9|?9:,.JL@|oB"> <field name="OP">NEQ</field> <value name="A"> <block type="get_attr" id=")%0ynekYQHb;?RRkz+$Q"> <value name="PATH"> <shadow type="text" id="d[Jo*+EZL07LymUsB~A]"> <field name="TEXT">params.em:0.total_act_power</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="-0z4Kc,^bhWc_ULuy2R%"> <field name="OID">Object ID</field> </shadow> <block type="convert_json2object" id="uf+YXQ-Fr$/++hm2-Rih"> <value name="VALUE"> <block type="on_source" id="vc]v`TpUrA7q0`3_DBA6"> <field name="ATTR">state.val</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_null" id="!%1$]%5nAZo|[pz255[$"></block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="k3{0sEJOom4M7tPY48Bq"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> <value name="VALUE"> <block type="get_attr" id="m;$C$O.VS#IGbQn8~aIM"> <value name="PATH"> <shadow type="text" id="p^p=!NuU^brh=(YWhL{E"> <field name="TEXT">params.em:0.total_act_power</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="-0z4Kc,^bhWc_ULuy2R%"> <field name="OID">Object ID</field> </shadow> <block type="convert_json2object" id="tlvVJ;+mfdP:zFGKhVBu"> <value name="VALUE"> <block type="on_source" id="I1jwI1_*f{Op@S16}6@!"> <field name="ATTR">state.val</field> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </xml> -
@Jockel_Bln sagte:
@maxclaudi Ist das für dich in Ordnung, wenn wir hier weiter über das Skript reden...ist doch gut. Bei einem Update werde ich im ersten Post (und im laufenden Thread) wieder auf das eigentliche Steuerungs-Script verlinken.
Edit: So bleibt alles beieinander und andere finden evtl. gleich was Nützliches für ihr eigenes Script.
Vielleicht wird dadurch ja auch eine allround Basis oder zumindest eine Hilfe für Einsteiger geschaffen.@Jockel_Bln sagte:
Das mit der Mindestdauer bekomme ich momentan noch nicht gebacken....
Was eine Hysterese betrifft, muss ich mal sehen, ob mir da was schlaues einfällt, die Werte am Zähler springen ja reichlich hin und her.lass sie springen ;-)
bin kein Freund von Timer und Timeouts, wenn sie nicht sein müssen.
Hier ein Beispiel, wie man das einfach über die Systemzeit realisieren kann:

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xY{w8?Sp~0Jea0SewLzs">batteryLock</variable> <variable id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</variable> <variable id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</variable> <variable id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</variable> <variable id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</variable> <variable id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</variable> <variable id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</variable> <variable id="6jV)pWhw1z4,L)/zXmp@">nowSec</variable> <variable id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</variable> <variable id="!f%Ln*^txgvN{P19_n`B">NewLimit</variable> </variables> <block type="comment" id="B`~2Lup]No@[ab~vG0Fv" x="88" y="10738"> <field name="COMMENT">batteryLock nur als Beispiel</field> <next> <block type="variables_set" id="DK?3qF6XQUkI+RaYng!,"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="e/wU{-WQGok:mx9Vj:zT"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="CjLEJvvem:j^rc|xQYIQ"> <field name="COMMENT">max. Einspeisung: negativ W&#10;max. Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="l1FQvOdlC:i?J$XdK:RZ"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> <value name="VALUE"> <block type="math_number" id="EB9;e!]z6P/nk;moQvA("> <field name="NUM">-20</field> </block> </value> <next> <block type="variables_set" id="//Q0KB!yBPC2IfF`ky4K"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> <value name="VALUE"> <block type="math_number" id="gtGa@*icFGlbmV]Any8f"> <field name="NUM">-5</field> </block> </value> <next> <block type="comment" id="7$Bsvz@k(wNFYy~,{|9i"> <field name="COMMENT">Sekunden wie lange&#10;outputLimit&#10;gehalten werden soll</field> <next> <block type="variables_set" id=":Hxw7.yl%,)*0G@.SrK5"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> <value name="VALUE"> <block type="math_number" id="UcYarz.]=Yc!)Zs+;nQf"> <field name="NUM">30</field> </block> </value> <next> <block type="variables_set" id="k2oe8wsrfMf6oIFe^|-6"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="math_number" id="2A@!w^;vKVrUAn1=A?Dy"> <field name="NUM">0</field> </block> </value> <next> <block type="comment" id="$a0*dJJf~721y76c*,#P"> <field name="COMMENT">max. outputLimit</field> <next> <block type="variables_set" id=")na@nqSqVAzH1]6-QQ)]"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> <value name="VALUE"> <block type="math_number" id="3BS=X#tit:R,9Gab^[Pb"> <field name="NUM">800</field> </block> </value> <next> <block type="comment" id="NkKWo}e@M=jRzestwaNO"> <field name="COMMENT">Trigger Stromzähler&#10;alle 5 sek.</field> <next> <block type="on_ext" id="P$}#rr[k?RyM|3ryd$}Y"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="[ODzzI~E=p^s1Q?JCZ)D"> <field name="oid">ID auswählen</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="4Q:SmVKFDh?q)=:x`:aN"> <field name="COMMENT">gridMeterValue&#10;Einspeisung: negativ W&#10;Verbrauch/Bezug: positiv W</field> <next> <block type="variables_set" id="%UJw9T^`i(MP(n6294wT"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> <value name="VALUE"> <block type="on_source" id="=Yu5Z-+Gy[Vp:)3#;fu+"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="comment" id="eb)%`~[NQkLRT,m`6dbu"> <field name="COMMENT">aktuelle Sekunden</field> <next> <block type="variables_set" id="IhJ54dcjRh,ck!GD=[ig"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="AuU:+}b=_Hx4id)5dci]"> <mutation name="getNowSec"></mutation> </block> </value> <next> <block type="comment" id="Re}zez)lzFB)hQ+fgHAU"> <field name="COMMENT">Logik- DPL</field> <next> <block type="controls_if" id="[2y44(h8!PsDDB~wlN-."> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_multi_and" id="?N`S2u#=+btllD!K,AU("> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <value name="AND0"> <block type="logic_compare" id="S6D(BrMSZT0ZrpgEbiNT"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="7j=nrChBIo]/Yz#^FVUy"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="C|dIdqh7(Jz!@Oho}6}$"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="|G*r@{Qv_|UC*N9iued)"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="Gpdu1~].Q0DOjwN];#w1"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="nSRZO:R~W/TtmwE^!og{"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> <value name="AND2"> <block type="logic_multi_or" id="*pR$P6VuS$ej|q($?Jzx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="`Gc0xr[]d0!2_!:#WIBb"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="7@4uHMmLjUdpHS{C22Zs"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id="yJIV6/[)R?n:kG*L7.9Q"> <field name="VAR" id="L4Kl4HR.8?-e%/|X+3#^">maximalerVerbrauch</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="ckZ*U:oi|arMmQ850.%a"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="HI9^GqB0[B.Zm/w27L!C"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="variables_get" id=".amyEk_$i)^(w7$gewot"> <field name="VAR" id="g$a:H%7_Jpio;o5{xv^?">maximaleEinspeisung</field> </block> </value> </block> </value> </block> </value> <value name="AND3"> <block type="logic_compare" id="$iNq5:qW.#}l2]mh4hF?"> <field name="OP">GTE</field> <value name="A"> <block type="math_arithmetic" id="^q7uJ0}p5C3-{1[yzQ5F"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="HL4/1ObSbLA6gQ*^HLYH"> <field name="NUM">1</field> </shadow> <block type="variables_get" id=";`3)VMTB)}_KxO{NxJaT"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> <value name="B"> <shadow type="math_number" id="{Yl2NFYd7K:|7i0HLGH9"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="7]2u.SWTW6?^:N/?/8nf"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="KMFd8yAexy7%iYWk~L`A"> <field name="VAR" id="{!,E;kT^]ZSj55z[QQL4">intervalSec_OutputLimit</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="IZLF52G11ONkAv|Sga,f"> <value name="IF0"> <block type="logic_compare" id="?n(rW+Oa5*tJ]Jdamz*V"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="QvK}D|H0S*iWK#Q[wvgg"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="w=$}9oCSuIs6*=uVv+03"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="u^o,~NZ#.CJg`9X?GOgc"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="Rd8:}^b90:)]LTi:]DB?"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id=":`0Y]j3lps51~0`EvC{n"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="@m,$e$k{2~e1x?n=LlHv"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="h85QZeI7p9D(:4)sfYF%"> <field name="NUM">1</field> </shadow> <block type="get_value" id="W=~+~})L~~UIJ;p_Y-3)"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="l|2B%;vkM[`U4%;n3|`t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="3P/l}|YyfrYV-$Eq{OkL"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="kH$OVvVc;6#@E[n@6cPx"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="8ma`kdUu~u0Vq.Gvy?+."> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <shadow type="math_number" id="-3_2YxLm_H#2y(+RY|sn"> <field name="NUM">1</field> </shadow> <block type="math_number" id="?z@zV#c1kJpQ8X||SP+K"> <field name="NUM">-1</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="+L:7:q{.6A{o!^xc*uG#"> <value name="IF0"> <block type="logic_compare" id="%{$[A{#7Yqnmh0sD($;^"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="$0bZ]4Lo)Y97+gWR!{fP"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> <value name="B"> <block type="math_number" id="AS([9Q4+Iwu(z_#MIVzn"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="kmtV~]xVU/U2~mO?a**3"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> <value name="VALUE"> <block type="math_round" id="YwZ[g2yR,O101n3!!fN7"> <field name="OP">ROUNDUP</field> <value name="NUM"> <shadow type="math_number" id="RTIrDtXuT+g9p)~aUdfP"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="_2qIwS1+tX^xYaV`6S|,"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="t*o!./qY(-z]IyH3fDzi"> <field name="NUM">1</field> </shadow> <block type="get_value" id="ZsV.X[y0l|a/LE%[Lu/c"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Datenpunkte.zendureSolarFlow.HUB2000.properties.outputLimit</field> </block> </value> <value name="B"> <shadow type="math_number" id="JFF^]=-=xFh@.Bkyx_(/"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="1R{0Aj@MY!g0Yze6CX_h"> <field name="VAR" id="|j(8@5}5qB63}(}(g4IM">gridMeterValue</field> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="controls_if" id="g@(vG]*OUy2JLf^=m6l+"> <mutation elseif="5" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id=".na%l!e0oSW!iK=o2G4!"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="a^:Ag8(3$$D34UA02Tf$"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jei?/sY|v-fpFNtU#[i`"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="ue1q+ExXrlL~]n9#$be2"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="V{HbiRMuhL.cqpReJl_4"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="M{Ii3sf2k1B4K%$4h]?q"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Ml9{!P#F*ihd_f3lfhaO"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="BqSelKS67-|JjO{2{67^"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="`L0^4z`.aBIT)Qx:./X4"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="Lg5w+8!XEN|N[RAaVM:W"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="C)ABAd]#v|iE26-O+Od~"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="+vER?,t9_GOUhX@))1Uj"> <field name="NUM">30</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="(,$CxCnJa.{dJ@EGA}*H"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="5]k`!yHNVUN05IQPoASi"> <field name="NUM">30</field> </block> </value> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="%|zlZsEgVwAFj(A[5N:_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="ye2n/~_wxvV0WO:Kf8[4"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="WS4FHhpB!/9!_NmTDYX*"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="TSpYTslU+[r{fuPk4b+p"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="_)ptql`crZGDydxtq;UI"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="VI.Zu*B*Rus[,xuF{:c:"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="jH}z]*8WV5dR{Gi9_b(7"> <field name="NUM">60</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="variables_set" id="Vq:)#pNoH?sRu2EP41Vg"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id=";cfhl|ObEP$*s8}a5`.7"> <field name="NUM">60</field> </block> </value> </block> </statement> <value name="IF3"> <block type="logic_multi_and" id="3,m|@{YUB,%:HgF(n`^-"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="(imyvzh%bl$g(?!9M-~7"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="NH53D`G|wzRakp?4QaTC"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="*pg%r=mBnOLDKRRz#CD|"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="F6LGV[Bbts,F8HwB)?vj"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="#*MX3vPm4S5EkH=a2~Fi"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="V;b0Qla!ngk+UO03N.qb"> <field name="NUM">90</field> </block> </value> </block> </value> </block> </value> <statement name="DO3"> <block type="variables_set" id=",##sr}kLyc___`8-D2qS"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="~N*4e!@@kmJ4oB8(A:Bf"> <field name="NUM">90</field> </block> </value> </block> </statement> <value name="IF4"> <block type="logic_multi_and" id="ck=PtrH@1n6xT_Uy534_"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="aQ)k!!mb30BmlEPT|!wn"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="geE(HzW0#vsil%#Yi9@J"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="2DFZ,,SaN.=f.u!O+gM_"> <field name="NUM">90</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="R-#e}^%,TZ=^(HHGg)3#"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="J!*3(X{=h%13jR7,{L7W"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="}ci)8/U@BS5ZG{`}:/Gd"> <field name="NUM">100</field> </block> </value> </block> </value> </block> </value> <statement name="DO4"> <block type="variables_set" id="xMaB1zs]gPmR;-QhiqTm"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_number" id="/xtk;Wn4;VC/S[gm.*5i"> <field name="NUM">100</field> </block> </value> </block> </statement> <value name="IF5"> <block type="logic_multi_and" id="/H?Jk#INlFRS26^o8Qh*"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="EnPfaM|-b}%bx89sQq(D"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="t]5w`blFMx~dRCXpS82Y"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="math_number" id="a4H:ynOe^z?HzI|*#6M%"> <field name="NUM">100</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="w]5-ZMz=+sKj+[lyfEcV"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id=":~!X@Da@mV3_%-nnt9|t"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="]`k}*$U[x8T)D;SFt2*T"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </value> <statement name="DO5"> <block type="variables_set" id="kE$KjD1sq`zo7N4XzO8W"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="variables_get" id="0N-L^1LGavYXMSGto#0i"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="h/k3;T$Ds?%`Dc2a]A(Y"> <value name="IF0"> <block type="logic_compare" id="s$$6hA]|wS^%v$azgbc("> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="D`R(6C9Whcox}UCLtHyk"> <field name="VAR" id="Ow]uuXe;Gu%,E$/#xi|l">todoLimit</field> </block> </value> <value name="B"> <block type="variables_get" id="LJ?k%c5.9@^Zb@GY59s."> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="%`Qf}#6ll+buxb1RrfO("> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> <value name="VALUE"> <block type="math_round" id="Aivr3_W]J?~H7PL-(Qn2"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="2q.OIETW9F$f8*^m.pR7"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="hkymtbi%V;Ewsb]HY@Tv"> <field name="VAR" id="5`a%+HAVV:gN)b}Sv`H,">maxOutputValue</field> </block> </value> </block> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id=":xA_/$utkabK$dY]WA;."> <value name="IF0"> <block type="logic_compare" id="gDbKvBq/8jNWZ$!Wgw06"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="$y7+$mq6[$4iP@HA;4(`"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <value name="B"> <block type="get_value" id="Kj[gA5EP!;[5lS238LJT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="sY3aT9oP|V=)M,RY?8n3"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.auto_in_out_Limit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="DVJGhR]|p#F92SS]O@}5"> <field name="VAR" id="!f%Ln*^txgvN{P19_n`B">NewLimit</field> </block> </value> <next> <block type="variables_set" id="wu6sI?s@RYKT0EO)I?T,"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="opGu^p^dmwOUCp|HvY(Z"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="M*u}`W8hfB51X2~XhP2="> <value name="IF0"> <block type="logic_multi_or" id="[Byq|Pc)]dzKtE.,_]ua"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="g0fwE?h]64A[vz*{vDBf"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="LMQfo^aZZ1!:Qn$Zg)[Q"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="hk4~(Oq,BcGk07:_TRQL"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="gH{YL=RD):.Xc1p}SES2"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="Xp-(zS;c@5moDZX*oidb"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.electricLevel</field> </block> </value> <value name="B"> <block type="get_value" id="N!c2`[Ha2.6/4$m#p7IL"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.minSoc</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="jsF+AiW#j=IEKW))-/Z]"> <field name="COMMENT">falls outputLimit nicht 0</field> <next> <block type="controls_if" id="zdAF~Zi(zQu!xfbcgiZx"> <value name="IF0"> <block type="logic_compare" id="d5juG(gsQkg5X5`Fm}3*"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="yw9NQ?TgGLT~uXu{*IuT"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.outputLimit</field> </block> </value> <value name="B"> <block type="math_number" id="XBf`):7^MV]8u6jEcg3q"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="U[Hl|(_Y4FBQXR7CtRX_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.zendure.1600ACplus.control.outputLimit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="gBw(glQzU|-9xx=%4~R5"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="EM*kUUw)$;Nwk]969aRX"> <field name="VAR" id="M-7vYXCKRFdMvUW8k03v">lastSec_outputLimit</field> <value name="VALUE"> <block type="variables_get" id="e2gN_]V5p+W)G2ipaAhr"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id="*[JBn(Fqq9m3!8LlvpAh" x="588" y="10913"> <mutation statements="false"></mutation> <field name="NAME">getNowSec</field> <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoRGF0ZS5ub3coKSAvIDEwMDApOw0K</field> <comment pinned="false" h="80" w="160">liefert aktuelle Sekunden</comment> </block> </xml>Hier ein Beispiel, wie man das einfach über die Systemzeit realisieren kann:
Danke, das muss ich mir erstmal langsam auf der Zunge zergehen lassen und versuchen zu verstehen.
Da werde ich wohl erst richtig zu kommen, wenn meine Regierung nächste Woche wieder auf Arbeit ist. Wenn ich das am Wochenende mache, gibt es sicher Mecker.Falls auf einen Datenpunkt getriggert wird, der JSON liefert ...
Ich habe zwar einen IR Lesekopf, dessen Daten alle einzeln im iobroker landen, aber ich werde mir das mal speichern für eventuell zukünftige Fälle.
LG und schönes WE
Jörg -
Hier ein Beispiel, wie man das einfach über die Systemzeit realisieren kann:
Danke, das muss ich mir erstmal langsam auf der Zunge zergehen lassen und versuchen zu verstehen.
Da werde ich wohl erst richtig zu kommen, wenn meine Regierung nächste Woche wieder auf Arbeit ist. Wenn ich das am Wochenende mache, gibt es sicher Mecker.Falls auf einen Datenpunkt getriggert wird, der JSON liefert ...
Ich habe zwar einen IR Lesekopf, dessen Daten alle einzeln im iobroker landen, aber ich werde mir das mal speichern für eventuell zukünftige Fälle.
LG und schönes WE
Jörg@Jockel_Bln sagte:
versuchen zu verstehen.Verstehst Du schon, da bin ich mir sicher :-)
In Variable nowSec wird die aktuelle Systemzeit in Sekunden gesetzt.
intervalSec_OutputLimit = 30; sind die Sekunden, die mindestens vergehen müssen.
lastSec_outputLimit wird nur bei Skriptstart (außerhalb des Triggers) einmalig mit 0 initialisiert.
Der Vergleich:
Falls nowSec (aktuelle Zeit in Sek.) minus lastSec_outputLimit (bei Start: 0) >= intervalSec_OutputLimit (30 Sek.) ist, dann mach weiter.Zum Startzeitpunkt ist das sofort der Fall, da der hohe Wert der aktuellen Systemzeit minus 0 natürlich immer größer als 30 ist.
Wenn die Bedingung erfüllt ist und die Regelung durchläuft, wird am Schluss:
lastSec_outputLimit auf die aktuelle Zeit (nowSec) gesetzt.Bei weiteren Triggern und Zähler-Abfragen passiert also so lange überhaupt nichts, bis die Bedingung wieder erfüllt ist:
aktuelle Zeit (nowSec) minus alte Zeit (lastSec_outputLimit) > 30 Sek. (intervalSec_OutputLimit)
Erst dann geht es weiter, das Limit wird angepasst, lastSec_outputLimit wird wieder auf die aktuelle Systemzeit gesetzt und das Spiel beginnt von vorne.
Ich habe zwar einen IR Lesekopf, dessen Daten alle einzeln im iobroker landen...
ja, ich auch. UART-Lesekopf Tasmota (wt32-eth01 LAN)
LG und schönes WE
wünsche ich Dir auch.
-
@jockel_bln
nach ausgiebigen Tests steuere ich meinen Hyper2000 per Blockly im 20 Sekunden Abstand
und einer Hysterese mit 30 Watt. Also Änderungen nur wenn mehr oder weniger 30 Watt anstehen.Den Versuch mit einer Liste und Mittelwert habe ich auch gemacht. Hat für mich keinen Vorteil gebracht. Die Regelung war dann zu träge.
Tagsüber ist mein Zielwert -30 Watt, also einspeisen und Nachts 0 Watt.
Die Lade- und Entladegrenze bestimme ich nach Zellspannung, nicht nach SOC.
So sieht meine Regelung mit diesen Werten aus. War ein Tag mit viel Sonne, wenig Wolken.

Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden