Weiter zum Inhalt
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Hell
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dunkel
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2

NEWS

  • wichtiges UPDATE für controller 7.2.2 im stable
    HomoranH
    Homoran
    9
    1
    640

  • Neues YouTube-Video: Visualisierung im Devices-Adapter
    BluefoxB
    Bluefox
    16
    1
    3.0k

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    8
    1
    3.0k

Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2

Geplant Angeheftet Gesperrt Verschoben JavaScript
384 Beiträge 21 Kommentatoren 33.3k Aufrufe 19 Beobachtet
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • maxclaudiM maxclaudi

    @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:

    a958eeef-cf4c-401f-8ee7-ee4beb17666c-image.jpeg


    <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&amp;#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&amp;#10;outputLimit&amp;#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&amp;#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&amp;#10;Einspeisung: negativ W&amp;#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>
    
    maxclaudiM Offline
    maxclaudiM Offline
    maxclaudi
    schrieb zuletzt editiert von
    #381

    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:

    64cc5ed7-eb41-409a-84c4-d16e302b032b-image.jpeg

    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&amp;#10;gridMeterValue von Datenpunkt&amp;#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>
    

    Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2

    1 Antwort Letzte Antwort
    0
    • maxclaudiM maxclaudi

      @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:

      a958eeef-cf4c-401f-8ee7-ee4beb17666c-image.jpeg


      <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&amp;#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&amp;#10;outputLimit&amp;#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&amp;#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&amp;#10;Einspeisung: negativ W&amp;#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>
      
      J Offline
      J Offline
      Jockel_Bln
      schrieb zuletzt editiert von
      #382

      @maxclaudi sagte:

      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.

      @maxclaudi sagte:

      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

      maxclaudiM 1 Antwort Letzte Antwort
      0
      • J Jockel_Bln

        @maxclaudi sagte:

        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.

        @maxclaudi sagte:

        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

        maxclaudiM Offline
        maxclaudiM Offline
        maxclaudi
        schrieb zuletzt editiert von maxclaudi
        #383

        @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.

        Zendure zenSDK Lokal API, SmartMode, SolarFlow AC 800 Pro 2

        1 Antwort Letzte Antwort
        0
        • Murphy 0M Online
          Murphy 0M Online
          Murphy 0
          schrieb zuletzt editiert von
          #384

          @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.

          IMG_4059.png

          1 Antwort Letzte Antwort
          0

          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
          Antworten
          • In einem neuen Thema antworten
          Anmelden zum Antworten
          • Älteste zuerst
          • Neuste zuerst
          • Meiste Stimmen


          Support us

          ioBroker
          Community Adapters
          Donate

          201

          Online

          33.0k

          Benutzer

          83.3k

          Themen

          1.3m

          Beiträge
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
          ioBroker Community 2014-2026
          logo
          • Anmelden

          • Du hast noch kein Konto? Registrieren

          • Anmelden oder registrieren, um zu suchen
          • Erster Beitrag
            Letzter Beitrag
          0
          • Home
          • Aktuell
          • Tags
          • Ungelesen 0
          • Kategorien
          • Unreplied
          • Beliebt
          • GitHub
          • Docu
          • Hilfe