NEWS
Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2
-
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.

-
Mir geht es soweit sehr gut. Und bei dir auch alles in Ordnung?
Ja das ist auch eine Idee mit dem Entladeachutz. Das könnte ich ja auch mit soc triggern. Du machst das ganze ja mit volt. Bin nur noch nicht ganz schlau geworden was du mit deinen internen Variablen da alles abfragst. Ich denke du triggerst auf Volt oder?
Dann mĂŒsste ich nur mein ganzes Script umbauen, da ich ĂŒberall mir soc getrickert habe wann er aufhören soll zu entladen und starten soll. Sollte aber nicht das groĂe Problem sein.@Daniel-8 sagte:
Ja das ist auch eine Idee mit dem Entladeachutz. ... Du machst das ganze ja mit volt. Bin nur noch nicht ganz schlau geworden was du mit deinen internen Variablen da alles abfragst. Ich denke du triggerst auf Volt oder?Blockly-Beispiel fĂŒr einen Batterie-Entladeschutz (3 Batterien) mit Ruhephase.
Logik steuert den Entladeschutz (batteryLock) basierend auf der niedrigsten Zellspannung (minVol) von 3 Batterien oder/und dem Status socLimit (Wert 2: Entladelimit erreicht).
Einschaltbedingung (batteryLock = true)
Entladeschutz wird aktiv, wenn:- socLimit 2: Discharge limit reached vom System gesetzt wurde.
ODER wenn: - die niedrigste Zellspannung (minVol) irgendeiner Batterie die Sperrspannung batteryLockMinCellVoltage erreicht oder unterschreitet
- und die Batterien aktuell nicht geladen werden.
(Die Bedingung "und Wert vom Objekt ID packStae" !== 1 kann bei Bedarf entfernt werden.
Wird die Bedingung packState !== 1 entfernt, greift der Entladeschutz bei Unterspannung auch wÀhrend eines aktiven Ladevorgangs.)Ausschaltbedingung (batteryLock = false)
Entladeschutz wird erst wieder freigegeben, wenn:- minVol-Spannungen aller Batterien die Freigabespannung batteryUnlockMinCellVoltage erreicht haben
- und diese Bedingung nach Ablauf der Ruhezeit batteryRecoveryTimeSec (im Beispiel 300 Sek.) weiterhin erfĂŒllt ist.
Blockierung der Freigabe
Sinkt die minVol-Spannung auch nur einer einzigen Batterie (bis die Ruhephase beendet ist) unter batteryUnlockMinCellVoltage, bleibt der Entladeschutz aktiv.
Die Blockierung löst sich erst, wenn alle minVol-Spannungen nach der Ruhephase >= batteryUnlockMinCellVoltage sind.
Blockly:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="|jA}O24Zru$2XpwXW9oM">batteryLockMinCellVoltage</variable> <variable id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</variable> <variable id="@Atp40732e@i1#ciD6Vf">batteryRecoveryStartSec</variable> <variable id="xY{w8?Sp~0Jea0SewLzs">batteryLock</variable> <variable id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</variable> <variable id="sP`Q7/BVq;3R/4DW.u.r">batteryRecoveryTimeSec</variable> <variable id="6jV)pWhw1z4,L)/zXmp@">nowSec</variable> </variables> <block type="comment" id="q%5A|9!9VEO/[RIxyyxk" x="-487" y="7288"> <field name="COMMENT">Batterie-EntladeSchutz</field> <next> <block type="variables_set" id="2:Gt3XKhq!Tv%P|FIPHL"> <field name="VAR" id="|jA}O24Zru$2XpwXW9oM">batteryLockMinCellVoltage</field> <value name="VALUE"> <block type="math_number" id="exRP{MzsuzPDK%##_eWf"> <field name="NUM">3.16</field> </block> </value> <next> <block type="variables_set" id="5S-e!(n,h3);}|jBV1o1"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> <value name="VALUE"> <block type="math_number" id="e?Sm3LluJI7G!Wy3ssg8"> <field name="NUM">3.25</field> </block> </value> <next> <block type="variables_set" id="6LJ1}M`-WMN(Mc:9JpAS"> <field name="VAR" id="@Atp40732e@i1#ciD6Vf">batteryRecoveryStartSec</field> <value name="VALUE"> <block type="math_number" id="i`KrHC_9AY@Do0oNq5qr"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="{n`pU`kxEM/P^m_(B}^C"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="ihR.E7~nU1_7?e7vv_e!"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="o]O/6V?.;?LlU%.)p80Y"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> <value name="VALUE"> <block type="math_number" id="it+qm2_0U.N;4qhi|xpn"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="~Redn5|k~t|9;@8LIg-#"> <field name="VAR" id="sP`Q7/BVq;3R/4DW.u.r">batteryRecoveryTimeSec</field> <value name="VALUE"> <block type="math_number" id="YoM,?ty6Y`uv}XM{b~!?"> <field name="NUM">300</field> </block> </value> <next> <block type="comment" id="DGde)CSQo@lMo!CLi5mz"> <field name="COMMENT">------</field> <next> <block type="comment" id="wktby7iKttVv%Tb|TDb*"> <field name="COMMENT">Trigger auf ZÀhlerwert, &#10;der im 5 sek Intervall aktualisiert wird</field> <next> <block type="on_ext" id="_(9^AZcnK}=,Ei_Kv[LC"> <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="Lm`Zdj39dhg+OGr~]zO_"> <field name="oid">ID auswÀhlen</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="cr/vPHG5wrI/)s2dFh#O"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="G)tyOY[1!o6OfU!_Ca2["> <mutation name="getNowSec"></mutation> </block> </value> <next> <block type="comment" id="K~m7(ghLFmTYDE`MYJ;A"> <field name="COMMENT">Batterie-Entladeschutz</field> <next> <block type="controls_if" id="UZF)Vdt[Ka6uG9uuTY~t"> <value name="IF0"> <block type="logic_multi_or" id="|)s|Y;@N@hJ2-s52mBa5"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="45G,;?OwD8%h~ldSS8w="> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="Q[b$!$kp?6{n%Has47[k"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.socLimit</field> </block> </value> <value name="B"> <block type="math_number" id="T:XU,@?lf-r/[QvwJjqh"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_multi_and" id="D9h16~UW5]UXhC//fv3d"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_multi_or" id="XVDcsJf=)+p;zDD/-wjf"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation> <value name="OR0"> <block type="logic_compare" id="cw/|eVq~ILYKhKZKYBcT"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="/UQ+w-%gCevTP-JZN0ZL"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX1.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="w.Tc[CRU!3PsOIN3I96l"> <field name="VAR" id="|jA}O24Zru$2XpwXW9oM">batteryLockMinCellVoltage</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="6Ek.ijD@y([?LgQtHNWj"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="9nI%HL}@-%HkC7!JLDHV"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX2.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="fcy{slPU}X^{,mUQ$~cb"> <field name="VAR" id="|jA}O24Zru$2XpwXW9oM">batteryLockMinCellVoltage</field> </block> </value> </block> </value> <value name="OR2"> <block type="logic_compare" id="bj?!GD(bZG^Mzt1ck{E7"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="}=n%TD4gwM/y`O).YYd0"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX3.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="UZYC~yvF_#D(K.R$[uF^"> <field name="VAR" id="|jA}O24Zru$2XpwXW9oM">batteryLockMinCellVoltage</field> </block> </value> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="*5nHL,zgPP^,t!DE%(`]"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="?U4REz3Eh]R}cZB.rz=d"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.packState</field> </block> </value> <value name="B"> <block type="math_number" id="UvwDD_A8LY|EfJZ,:F@3"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="VTf!*(b/CJ-qLxv7lEr%"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="|AQTUnl~BPG}LM;OSess"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <next> <block type="comment" id="R-D?;8wK0j]puzzvPuoB"> <field name="COMMENT">Batterie-Entladeschutz-freigeben</field> <next> <block type="controls_if" id="+dF*{iMDKGY#Qvvy(*zY"> <value name="IF0"> <block type="logic_multi_and" id="p^3K59JHzdibBf;t+U+-"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="6"></mutation> <value name="AND0"> <block type="logic_compare" id="?6%=)T79u``im$;+*Tq^"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="iWO4}oEf66q-/Cvc0oQ_"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX1.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="8_PNms`XF9jdQz6@L:mn"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="zz*tv82dEU$|~mV3%P9d"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id=":FA.`M/x%:gTaZPWYVG)"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX2.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="$ssLTQL#Fl%Z*?/{C{b|"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> <value name="AND2"> <block type="logic_compare" id="c:*S{CB}Gfi423l/f)kE"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="cnz=%3!yKuH}4VCt$?bY"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX3.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="uG+bBCL]gsN@S7_RVDB3"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> <value name="AND3"> <block type="logic_compare" id="3nEr+~W9j)kQ^nV+[N?!"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="C8`BTyNs%NAg7kMvlUYm"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> </block> </value> <value name="B"> <block type="logic_boolean" id="EJ-sB9syx#_9qvUU42Ok"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="AND4"> <block type="logic_compare" id="J_^0kKM_$W+*f9UIwiyf"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="-c[Boi^=f_L@o89d%-1+"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> </block> </value> <value name="B"> <block type="math_number" id="b5BNuEF[c)|OA(`I$hzR"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="AND5"> <block type="logic_compare" id="JYHVI=$XZd4yT.5JKa/I"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="M0NaYd_42,lyBW26ph50"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.socLimit</field> </block> </value> <value name="B"> <block type="math_number" id="`YcCAe+4Bo~V+AJ_SFPa"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="MppP4%F=t?^QdUdX|zK)"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> <value name="VALUE"> <block type="math_number" id="xTb?%j~?eG%|)~I%~$H;"> <field name="NUM">1</field> </block> </value> <next> <block type="variables_set" id="~y-;{aekR5u=)Lcjcmq7"> <field name="VAR" id="@Atp40732e@i1#ciD6Vf">batteryRecoveryStartSec</field> <value name="VALUE"> <block type="variables_get" id="/Pvokl7!J/UxnpNV)RXd"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="L9+R34gAdvFlQQFvyb[("> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_multi_and" id="d8f?pBj$Dhhw:H]:!cx+"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation> <value name="AND0"> <block type="logic_compare" id="~+edNWwk8KDUFrRV@`0u"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id=":+*{_E|:-XeEo]FO(Hzw"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> </block> </value> <value name="B"> <block type="math_number" id="e*.V!rE--SqqwdH,]TLj"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="O1S7=i|fU1An_ZGvUjN_"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="jpu3K06Q`F#X0CZ.^@vg"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.properties.socLimit</field> </block> </value> <value name="B"> <block type="math_number" id="B{_Iq[gX0]n}6QpaG{4U"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="AND2"> <block type="logic_compare" id="7ke.udnkXtjy~0D#+vpG"> <field name="OP">GTE</field> <value name="A"> <block type="math_arithmetic" id="tgk~6%GON^}e*W)5cyBp"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="5JJe0WCM{:gX,j+ZMcW{"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="q~X8Qpdd(wDYVv;YR]+I"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> <value name="B"> <shadow type="math_number" id="#}t|j-lK_nM;ymfEr{9z"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Tli~uzyBY4VQ[^#*cv9$"> <field name="VAR" id="@Atp40732e@i1#ciD6Vf">batteryRecoveryStartSec</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="SVqkf}0d(8nFzZY%(47:"> <field name="VAR" id="sP`Q7/BVq;3R/4DW.u.r">batteryRecoveryTimeSec</field> </block> </value> </block> </value> <value name="AND3"> <block type="logic_multi_or" id="J@;UdnB}q!)tnRf:yXv*"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation> <value name="OR0"> <block type="logic_compare" id="U:YtHF4peVzU.~#)A+hG"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="#K.wNl~TMX4}CC]s-,Y%"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX1.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="w6]SU{cLrBFyif%~*Bn3"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="haB3_nxso1wmaAY4sy_Q"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="*l93=O|DLf^p.HfyWj@0"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX2.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="MRk-4KFQ.dlaWRW5u@T_"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> <value name="OR2"> <block type="logic_compare" id="J(y~EhV185@jV/}`T3N9"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="W2FrEZO//03{^s;OEDT|"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.zendure.1600ACplus.packData.CXXXXXXXXXXXXX3.minVol</field> </block> </value> <value name="B"> <block type="variables_get" id="3q-J9rr)jaD41*zXn[OF"> <field name="VAR" id="GVuE})ec/#[QQ!56ZE6s">batteryUnlockMinCellVoltage</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id=";S$}/6P*I?j6ny(S(`iR"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> <value name="VALUE"> <block type="math_number" id="h|;yAP]o_qb23pp9p|yu"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="H*62i9g%uL:$:).rK@dJ"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Ucu9qyHMv]:bco9l?#hM"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="3YWdK;66aezB[5HNWw}?"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> </block> </value> <value name="B"> <block type="math_number" id="jqHjEZ/9BJ4[}NEV$zy@"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="5t^QB+7eR?G]$oVwO5c?"> <field name="OP">GTE</field> <value name="A"> <block type="math_arithmetic" id=";FSTa2:!uguH_zU2;4zw"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="5JJe0WCM{:gX,j+ZMcW{"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Q-0~AIKA4tZ:tC4jj6}t"> <field name="VAR" id="6jV)pWhw1z4,L)/zXmp@">nowSec</field> </block> </value> <value name="B"> <shadow type="math_number" id="#}t|j-lK_nM;ymfEr{9z"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="SrkxeO`G,/gpyE^=}`l%"> <field name="VAR" id="@Atp40732e@i1#ciD6Vf">batteryRecoveryStartSec</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="cjZr;!,[V](9`|)`:W-_"> <field name="VAR" id="sP`Q7/BVq;3R/4DW.u.r">batteryRecoveryTimeSec</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="#tjc#5}4O:eLNM.0X%Dp"> <field name="VAR" id="xY{w8?Sp~0Jea0SewLzs">batteryLock</field> <value name="VALUE"> <block type="logic_boolean" id="zLM.lu~5sBG8k@}m.[f2"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="*c?l}!|ZKKoGPe#!EEqw"> <field name="VAR" id="]@mNu993N=|~3.$l@Acs">batteryRecoveryPending</field> <value name="VALUE"> <block type="math_number" id="W(%Wnq=,*LUd^npC:*)~"> <field name="NUM">0</field> </block> </value> </block> </next> </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> <block type="procedures_defcustomreturn" id="*[JBn(Fqq9m3!8LlvpAh" x="-87" y="7463"> <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> - socLimit 2: Discharge limit reached vom System gesetzt wurde.
-
@maxclaudi
Jetzt bin ich bisserl neidisch.
Dein Blockly ist so schön strukturiert. Chapeau !
Meins sieht mehr nach Spaghetti aus, du weist was ich meine. đ€Ș
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