Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. "Stotternde" Ausführung bei Markisensteuerung

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    "Stotternde" Ausführung bei Markisensteuerung

    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      ZEE last edited by ZEE

      Hallo,
      ich habe mir ein Blockly gebastelt, um unsere Markise abhängig von verschiedenen Faktoren aus- und einfahren zu lassen.
      Kurz: wenn über einen definierten Zeitraum viel Sonne (PV-Produktion), bestimmter Sonnenstand erreicht und Markisenposition "oben", fahr sie per Shelly heraus, gib mir Nachricht via Signal (nur anfangs zur Kontrolle) und setze Datenpunkt Markisenposition auf "unten".
      Nach gleichem Prinzip bei wenig Sonne/Sturmwarnung/Abenddämmerung wieder hochfahren.

      Problem:
      Markise fährt zwar runter und rauf, jedoch nicht durchgängig, sondern mit lauter kurzen Unterbrechungen. Und jedesmal eine neue Nachricht, es waren heute einige zig Stück für einmal herunterfahren und später nochmal so viele fürs rauffahren.

      Nun habe ich noch ein zweites Script, welches den Datenpunkt Markisenposition bei Änderung schreibt, denn die Markise lässt sich ja auch noch per Wandschalter bedienen und dann würde der Wert ja nicht mehr stimmen.

      Kommen die Scripts sich irgendwie ins Gehege? Oder habe ich einen anderen Denkfehler?

      hier das markisen-Script:

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout_Markise_zu">timeout_Markise_zu</variable>
          <variable type="timeout" id="timeout_Markise_auf">timeout_Markise_auf</variable>
        </variables>
        <block type="on_ext" id="5wT4AB9MkGgX?:-;23ve" x="-662" y="-787">
          <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="Y-xLP3NAf,C.Dg7rAFbl">
              <field name="oid">modbus.0.holdingRegisters.40068_PV_Leistung</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="comment" id=":ePybjmYbj5kSU2v:}sE">
              <field name="COMMENT">Markise sonnengesteuert runterfahren</field>
              <next>
                <block type="controls_if" id="K;VZl!BC3u@]?4F0oZ.Z">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="logic_operation" id="lvf]iX6kR;_LdQgMCwvC" inline="false">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_operation" id="FUv_^0RtG6ykyg%Xyu(Q" inline="false">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_compare" id="pkLr{S}|Po9j0y:,^}c?">
                              <field name="OP">GT</field>
                              <value name="A">
                                <block type="on_source" id="sP(vuTnHsE.g||^UAT}~">
                                  <field name="ATTR">state.val</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="H^*N=cy*k8.oyjH:DM$4">
                                  <field name="NUM">4000</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="(L}__zukIDRKTIF|VV$_">
                              <field name="OP">GTE</field>
                              <value name="A">
                                <block type="get_value" id="bv-]2~e]6_:.!OBDY]cx">
                                  <field name="ATTR">val</field>
                                  <field name="OID">followthesun.0.current.azimuth</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="88em3=ToFEI8uFl{Ev8R">
                                  <field name="NUM">170</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="8fz*fU1qlV{mGPOk?EDN">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="sts-$*CY7},RJe3yfx_#">
                              <field name="ATTR">val</field>
                              <field name="OID">0_userdata.0.Markise_Position</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="text" id="POa#[5Rv*zfl^}p)~lmV">
                              <field name="TEXT">oben</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="timeouts_settimeout" id="b^%J=z6h(%K]lV]5%_8w">
                      <field name="NAME">timeout_Markise_zu</field>
                      <field name="DELAY">5</field>
                      <field name="UNIT">min</field>
                      <statement name="STATEMENT">
                        <block type="control_ex" id="gfXx%+%0Arod@j#pnnzl">
                          <field name="TYPE">false</field>
                          <field name="CLEAR_RUNNING">FALSE</field>
                          <value name="OID">
                            <shadow type="field_oid" id="8E53896/#{wTzBd3Z`NT">
                              <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Close</field>
                            </shadow>
                          </value>
                          <value name="VALUE">
                            <shadow type="logic_boolean" id="KW)yq@+6o4UM?PsyZHe{">
                              <field name="BOOL">TRUE</field>
                            </shadow>
                          </value>
                          <value name="DELAY_MS">
                            <shadow type="math_number" id=".FvT2S!4]M`M~3gy8y*O">
                              <field name="NUM">0</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="control_ex" id=")Hy~8B0UC~pS0)0DfZ:7">
                              <field name="TYPE">false</field>
                              <field name="CLEAR_RUNNING">FALSE</field>
                              <value name="OID">
                                <shadow type="field_oid" id="wq7]2Lj1a,^Q/Zn3HXfI">
                                  <field name="oid">0_userdata.0.Markise_Position</field>
                                </shadow>
                              </value>
                              <value name="VALUE">
                                <shadow type="logic_boolean" id="S7m-(ol3G2#hp`eLNw8q">
                                  <field name="BOOL">TRUE</field>
                                </shadow>
                                <block type="text" id="Vs=l_}g*-KpvtdgDc.{0">
                                  <field name="TEXT">unten</field>
                                </block>
                              </value>
                              <value name="DELAY_MS">
                                <shadow type="math_number" id="!rRF$pP(YmEzgRm6/r:=">
                                  <field name="NUM">0</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="signal-cmb" id="y.ZKM(aQl%UT7Hnvw]?N">
                                  <field name="INSTANCE"></field>
                                  <field name="LOG"></field>
                                  <value name="MESSAGE">
                                    <shadow type="text" id="N@Wqb#moNG[q1OTFGbsx">
                                      <field name="TEXT">Markise fährt runter, die Sonne scheint!</field>
                                    </shadow>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="timeouts_cleartimeout" id="RHwt*5F6iXS(G}8l@1Du">
                      <field name="NAME">timeout_Markise_zu</field>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="4gZ8ihRxtUC^iK2P#yU+">
                      <field name="COMMENT">Markise sonnengesteuert hochfahren</field>
                      <next>
                        <block type="controls_if" id="*}OhLvIg]1Ym)o]xAwyI">
                          <mutation else="1"></mutation>
                          <value name="IF0">
                            <block type="logic_operation" id="23+^NNyA:zZLWp7u0wu~" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_compare" id="m|QC~.pN`rrG]Q?;=k4!">
                                  <field name="OP">LT</field>
                                  <value name="A">
                                    <block type="on_source" id="vo]*gELDTLN)c4l_nqZ.">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="umy$j,1m(i[zhR,S`Agp">
                                      <field name="NUM">2500</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id=".mnKd~zsZ_TGohWGKN|0">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="{+?.;0Aj/kQSyn/iFNsJ">
                                      <field name="ATTR">val</field>
                                      <field name="OID">0_userdata.0.Markise_Position</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="text" id="o`zbQF%Yo8-[@[`KkC*X">
                                      <field name="TEXT">unten</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="timeouts_settimeout" id="1kw7+{UyU^J_7$t1v`{t">
                              <field name="NAME">timeout_Markise_auf</field>
                              <field name="DELAY">5</field>
                              <field name="UNIT">min</field>
                              <statement name="STATEMENT">
                                <block type="control_ex" id="|^jj3lgD).:VG;XXz#/O">
                                  <field name="TYPE">false</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="OID">
                                    <shadow type="field_oid" id="3!=!d2?d%MjQT{2H9D?I">
                                      <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Open</field>
                                    </shadow>
                                  </value>
                                  <value name="VALUE">
                                    <shadow type="logic_boolean" id=",GNQn(.1SyUC$/Aw$%2,">
                                      <field name="BOOL">TRUE</field>
                                    </shadow>
                                  </value>
                                  <value name="DELAY_MS">
                                    <shadow type="math_number" id="CP;noZ^b}sqs7-|]iV^9">
                                      <field name="NUM">0</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="control_ex" id=":P`%hfA{r)-B{fH=X,%x">
                                      <field name="TYPE">false</field>
                                      <field name="CLEAR_RUNNING">FALSE</field>
                                      <value name="OID">
                                        <shadow type="field_oid" id="X3^`!{A2*cxvh}Fy4zo`">
                                          <field name="oid">0_userdata.0.Markise_Position</field>
                                        </shadow>
                                      </value>
                                      <value name="VALUE">
                                        <shadow type="logic_boolean">
                                          <field name="BOOL">TRUE</field>
                                        </shadow>
                                        <block type="text" id="mJm]Zz1QPUfoMF1jD9rZ">
                                          <field name="TEXT">oben</field>
                                        </block>
                                      </value>
                                      <value name="DELAY_MS">
                                        <shadow type="math_number" id="i`%lfdiYE=$r:A/[1S4U">
                                          <field name="NUM">0</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="signal-cmb" id="E,KtFkmul~FzZnFI?D8T">
                                          <field name="INSTANCE"></field>
                                          <field name="LOG"></field>
                                          <value name="MESSAGE">
                                            <shadow type="text" id="DRiLop*uDg-97[r7!Vr=">
                                              <field name="TEXT">Markise fährt wieder hoch, das Wetter ist doch nicht so geil....</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </statement>
                          <statement name="ELSE">
                            <block type="timeouts_cleartimeout" id="b3}$}_?}mM.7O{1#NJ0G">
                              <field name="NAME">timeout_Markise_auf</field>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
          <next>
            <block type="comment" id=")*v#EIRd(.oQZd5K^X^!">
              <field name="COMMENT">Markise bei Sturm hochfahren</field>
              <next>
                <block type="on_ext" id="PIM71mleh}*nw(c|jfxs">
                  <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="qH:8Fnd`rYqd$OW:5L1C">
                      <field name="oid">dwd.0.warning.type</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="3j5bzsl-Cip^Ynf/#^Pv">
                      <value name="IF0">
                        <block type="logic_operation" id="zvl3+^D(:x))uM}pJ[B@" inline="false">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_operation" id="y~$g,#:RqO[af=a?zB#E" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_operation" id="8hV;;:mC1-}v.M70Mq?F" inline="false">
                                  <field name="OP">OR</field>
                                  <value name="A">
                                    <block type="logic_compare" id="k@fH+T$mPT+QHDd`wtlI">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="on_source" id="0BcUH[l}UmV7s6UOktqn">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="text" id="(a7$gra:,a[7gu{;o3qo">
                                          <field name="TEXT">Wind/Storm</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_compare" id="Z`yxG_n[}bJUJL140lwN">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="on_source" id="%xXWcc|;RCQQ|suC~3l1">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="text" id="OCx?R,S*X=:`KwpZ{P`,">
                                          <field name="TEXT">Thunderstorm</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_operation" id="u{6e8pT2]U-~qB!hiY|3" inline="false">
                                  <field name="OP">OR</field>
                                  <value name="A">
                                    <block type="logic_compare" id="kr`)}9Rm1IT25qssC+jH">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="@s:Lm0W[_ADj0{i~0G(@">
                                          <field name="ATTR">val</field>
                                          <field name="OID">dwd.0.warning.severity</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="text" id="CYajj:S`{ZuHY`zK=UWm">
                                          <field name="TEXT">Severe</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_compare" id="kr;/1hMv$4hwEC~|3Zwg">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="eu;j#KdNB)T|@V/K;SD=">
                                          <field name="ATTR">val</field>
                                          <field name="OID">dwd.0.warning.severity</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="text" id="GN~Ish}5$:]Z9~{d}g`g">
                                          <field name="TEXT">Extreme</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="^MLA?^w|@=-*n;xSFC%3">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="[omM,Q%$D.h}_a,t[HON">
                                  <field name="ATTR">val</field>
                                  <field name="OID">0_userdata.0.Markise_Position</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="text" id="IE9lhA(BS9ZeNgV.2y[z">
                                  <field name="TEXT">unten</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="control_ex" id="wZ@9xr):;BpK]hkvl[3|">
                          <field name="TYPE">false</field>
                          <field name="CLEAR_RUNNING">TRUE</field>
                          <value name="OID">
                            <shadow type="field_oid" id="j2Vm/tqt1F)DXg)yac??">
                              <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Open</field>
                            </shadow>
                          </value>
                          <value name="VALUE">
                            <shadow type="logic_boolean" id="#{Eq^/-b8a`mmL,vma$L">
                              <field name="BOOL">TRUE</field>
                            </shadow>
                          </value>
                          <value name="DELAY_MS">
                            <shadow type="math_number" id="/FD_c0LCc9i/#.m8Ho|O">
                              <field name="NUM">0</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="control_ex" id="wgi:|y_TdK2#xvg8N(Mq">
                              <field name="TYPE">false</field>
                              <field name="CLEAR_RUNNING">FALSE</field>
                              <value name="OID">
                                <shadow type="field_oid" id="G(]Z{k3})R/~oZ7*0SKP">
                                  <field name="oid">0_userdata.0.Markise_Position</field>
                                </shadow>
                              </value>
                              <value name="VALUE">
                                <shadow type="logic_boolean">
                                  <field name="BOOL">TRUE</field>
                                </shadow>
                                <block type="text" id="AyVHLrn14E{fmM}Ea@$;">
                                  <field name="TEXT">oben</field>
                                </block>
                              </value>
                              <value name="DELAY_MS">
                                <shadow type="math_number" id="~z^%U.+ienO0e:-1PVPc">
                                  <field name="NUM">0</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="signal-cmb" id="5nDt)Q/*GJwYOhK8is_M">
                                  <field name="INSTANCE"></field>
                                  <field name="LOG"></field>
                                  <value name="MESSAGE">
                                    <shadow type="text" id="kr($^L=J7CS/xPI{e*,9">
                                      <field name="TEXT">Markise fährt wegen Sturmwarnung hoch!</field>
                                    </shadow>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="pN#[}Ic=}/,|C~MZC^g;">
                      <field name="COMMENT">Markise abends hochfahren</field>
                      <next>
                        <block type="astro" id="B;CSF,[XRu)Bez}Sho*Q">
                          <field name="TYPE">dusk</field>
                          <field name="OFFSET">0</field>
                          <statement name="STATEMENT">
                            <block type="controls_if" id="d*YiGBk;_O#3PZ${YL);">
                              <value name="IF0">
                                <block type="logic_compare" id="$UbpS=f#ULQPa-5dnRQ!">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="^a=kdPi;,TeS_/+O,a#?">
                                      <field name="ATTR">val</field>
                                      <field name="OID">0_userdata.0.Markise_Position</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="text" id="6Znk59D{?{k`}9d3+r=U">
                                      <field name="TEXT">unten</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="control_ex" id="@2`e(uUyDNU4_nitseXB">
                                  <field name="TYPE">false</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="OID">
                                    <shadow type="field_oid" id="+b%y]1{MJ9uXqYL[@`xm">
                                      <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Open</field>
                                    </shadow>
                                  </value>
                                  <value name="VALUE">
                                    <shadow type="logic_boolean" id="Ei)MlK?;Eti44j7b6qau">
                                      <field name="BOOL">TRUE</field>
                                    </shadow>
                                  </value>
                                  <value name="DELAY_MS">
                                    <shadow type="math_number" id="}dipI6Wr^+qupS`{MFrL">
                                      <field name="NUM">0</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="control_ex" id="`,3drq(%TUV_8$/K5O(-">
                                      <field name="TYPE">false</field>
                                      <field name="CLEAR_RUNNING">FALSE</field>
                                      <value name="OID">
                                        <shadow type="field_oid" id="|gShO:@S?]sJFP*s47sM">
                                          <field name="oid">0_userdata.0.Markise_Position</field>
                                        </shadow>
                                      </value>
                                      <value name="VALUE">
                                        <shadow type="logic_boolean">
                                          <field name="BOOL">TRUE</field>
                                        </shadow>
                                        <block type="text" id="#BdSBC#vX.#R!.PL)}0z">
                                          <field name="TEXT">oben</field>
                                        </block>
                                      </value>
                                      <value name="DELAY_MS">
                                        <shadow type="math_number" id="Z?M#%J8!OvvSy|%xb:56">
                                          <field name="NUM">0</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="signal-cmb" id=")/h~2j*VVdpc^WekZUL9">
                                          <field name="INSTANCE"></field>
                                          <field name="LOG"></field>
                                          <value name="MESSAGE">
                                            <shadow type="text" id="I!nJkBMaKQFm+pm11+`f">
                                              <field name="TEXT">Abenddämmerung, Markise fährt hoch.</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </next>
        </block>
      </xml>
      

      und hier das für die Markisenposition:

      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="F75s^rK=m5h:2BYA19Os" x="-638" y="-237">
          <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="gE|YbF5koV]YHOwb|aP/">
              <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.state</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="F4DjqP#Bs/gM*xG11*0s">
              <value name="IF0">
                <block type="logic_compare" id="Iva;H}XOqo4An9DYA+[c">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="on_source" id="DC`^e`7{G+6Ut!+q47;(">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="text" id="*U[N|qd;dRB*BjZx@N/h">
                      <field name="TEXT">open</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="control_ex" id="n1JGrHi$2B,8~s$G!/`N">
                  <field name="TYPE">false</field>
                  <field name="CLEAR_RUNNING">FALSE</field>
                  <value name="OID">
                    <shadow type="field_oid" id="pdT9[d:N~w;LjyYYi,;)">
                      <field name="oid">0_userdata.0.Markise_Position</field>
                    </shadow>
                  </value>
                  <value name="VALUE">
                    <shadow type="logic_boolean" id="A1hiF,THR]fzsHD6YH|l">
                      <field name="BOOL">TRUE</field>
                    </shadow>
                    <block type="text" id="a,2SK.w8pcEgJQ?,JsK)">
                      <field name="TEXT">oben</field>
                    </block>
                  </value>
                  <value name="DELAY_MS">
                    <shadow type="math_number" id="4OoSMc=j~U[bAudY%(T/">
                      <field name="NUM">0</field>
                    </shadow>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
          <next>
            <block type="on_ext" id="^Bo_*nL)3KTSv;ETT{.d">
              <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="$pl|Cl8`U,H`*%p/0UdH">
                  <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.state</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="controls_if" id="pH2d6t6$;yOk1JJ^[koM">
                  <value name="IF0">
                    <block type="logic_compare" id="6,SfPAzP4]=V)OfgNUDF">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="on_source" id="0wdv1ybwl^eyF}H`%VzE">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="text" id="Ve$2FD:nx[}w}qd^uRAW">
                          <field name="TEXT">close</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="control_ex" id="Ti%f5Dn!;ri!wU@Oe}eX">
                      <field name="TYPE">false</field>
                      <field name="CLEAR_RUNNING">FALSE</field>
                      <value name="OID">
                        <shadow type="field_oid" id="EN+k||;qxIp97GQ)EJ{e">
                          <field name="oid">0_userdata.0.Markise_Position</field>
                        </shadow>
                      </value>
                      <value name="VALUE">
                        <shadow type="logic_boolean">
                          <field name="BOOL">TRUE</field>
                        </shadow>
                        <block type="text" id="F+HZhi@(R6bfYDBV=ol-">
                          <field name="TEXT">unten</field>
                        </block>
                      </value>
                      <value name="DELAY_MS">
                        <shadow type="math_number" id="yR}qL[(%Z:b{N=;e0U=Q">
                          <field name="NUM">0</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </next>
        </block>
      </xml>
      
      Z paul53 2 Replies Last reply Reply Quote 0
      • Z
        ZEE @ZEE last edited by

        Hier noch Screenshots der Scripts:
        Bildschirmfoto 2022-04-12 um 20.54.45.png
        Bildschirmfoto 2022-04-12 um 20.57.17.png usw...

        Markisenposition schreiben:
        Bildschirmfoto 2022-04-12 um 20.58.36.png

        1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @ZEE last edited by

          @zee sagte: hier das markisen-Script:

          Es muss verhindert werden, dass mehrere Timer gestartet werden, die sich dann nicht mehr stoppen lassen.

          Bild_2022-04-12_210537276.png

          Z 2 Replies Last reply Reply Quote 0
          • Z
            ZEE @paul53 last edited by

            @paul53
            ah, jetzt ja! 🤦‍♂️ 😀

            werde es gleich ändern.
            Vielen Dank für die Hilfe!!!

            Gruß, Frank

            1 Reply Last reply Reply Quote 0
            • Z
              ZEE @paul53 last edited by ZEE

              @paul53

              sagst Du mir Anfänger bitte noch, welchen Baustein Du hinter "nicht" genommen hast? Ist das nicht ein Trigger? Nur wie kommt das "timeout_Markise_zu" dahin?

              edit:
              gefunden - ist ne Variable! 😄

              1 Reply Last reply Reply Quote 0
              • Z
                ZEE last edited by

                Frohe Ostern allerseits!

                Tja, irgendwie klappt es immer noch nicht. 😞
                Ich habe das Ganze jetzt mal entzerrt, da nur die Trigger mit timeout zicken.
                Wenn ich das "nicht timeout..." weglasse, habe ich mein altes Problem, dass der Trigger jede Sekunde neu auslöst. Aber so, wie von @paul53 vorgeschlagen, passiert gar nichts.
                Der lila Baustein "timeout_Markise_zu" ist doch eine Variable, oder habe ich es falsch interpretiert?! Ich habe nichts anderes gefunden...
                Hat noch jemand nen Tipp für mich?

                Bildschirmfoto 2022-04-18 um 12.54.10.png

                <xml xmlns="https://developers.google.com/blockly/xml">
                  <variables>
                    <variable type="timeout" id="timeout_Markise_zu">timeout_Markise_zu</variable>
                  </variables>
                  <block type="on" id="Jk@R-l-iJ#U(C;ceyR6J" x="-838" y="-1037">
                    <field name="OID">modbus.0.holdingRegisters.40068_PV_Leistung</field>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="K;VZl!BC3u@]?4F0oZ.Z">
                        <mutation else="1"></mutation>
                        <value name="IF0">
                          <block type="logic_operation" id="lvf]iX6kR;_LdQgMCwvC" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_operation" id=",SyC.0G`#Cn}1?[ZI8v$" inline="false">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="logic_compare" id="pkLr{S}|Po9j0y:,^}c?">
                                    <field name="OP">GT</field>
                                    <value name="A">
                                      <block type="on_source" id="sP(vuTnHsE.g||^UAT}~">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="H^*N=cy*k8.oyjH:DM$4">
                                        <field name="NUM">4000</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_compare" id="8fz*fU1qlV{mGPOk?EDN">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="sts-$*CY7},RJe3yfx_#">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.Markise_Position</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="text" id="POa#[5Rv*zfl^}p)~lmV">
                                        <field name="TEXT">oben</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_operation" id="8D6R!,q7lUPo2.l*CRDp" inline="false">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="logic_operation" id="FAojrIBIwCZ5t2aKuap:">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="logic_compare" id="2-YbHw^XZ5~WWwb450#K">
                                        <field name="OP">NEQ</field>
                                        <value name="A">
                                          <block type="get_value" id="o@kQawf4=xbi#?q)fvZK">
                                            <field name="ATTR">val</field>
                                            <field name="OID">dwd.0.warning.type</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="text" id="VeG]k[VC#JyT(+`h!v@I">
                                            <field name="TEXT">Thunderstorm</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_compare" id="f}TJ6NxseZT*3o@gd/(I">
                                        <field name="OP">NEQ</field>
                                        <value name="A">
                                          <block type="get_value" id="YzX.exbJG%,)ORaBCRD$">
                                            <field name="ATTR">val</field>
                                            <field name="OID">dwd.0.warning.type</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="text" id="zRgr?P3MukK%HWlw)J/F">
                                            <field name="TEXT">Wind/Storm</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_negate" id="P,-8WVey4#8I::C%#23N">
                                    <value name="BOOL">
                                      <block type="variables_get" id="zy$.5Cq.cKMr%@{JnTZh">
                                        <field name="VAR" id="timeout_Markise_zu" variabletype="timeout">timeout_Markise_zu</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="timeouts_settimeout" id="b^%J=z6h(%K]lV]5%_8w">
                            <field name="NAME">timeout_Markise_zu</field>
                            <field name="DELAY">10</field>
                            <field name="UNIT">sec</field>
                            <statement name="STATEMENT">
                              <block type="control_ex" id="gfXx%+%0Arod@j#pnnzl">
                                <field name="TYPE">false</field>
                                <field name="CLEAR_RUNNING">FALSE</field>
                                <value name="OID">
                                  <shadow type="field_oid" id="8E53896/#{wTzBd3Z`NT">
                                    <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Close</field>
                                  </shadow>
                                </value>
                                <value name="VALUE">
                                  <shadow type="logic_boolean" id="KW)yq@+6o4UM?PsyZHe{">
                                    <field name="BOOL">TRUE</field>
                                  </shadow>
                                </value>
                                <value name="DELAY_MS">
                                  <shadow type="math_number" id=".FvT2S!4]M`M~3gy8y*O">
                                    <field name="NUM">0</field>
                                  </shadow>
                                </value>
                                <next>
                                  <block type="signal-cmb" id="y.ZKM(aQl%UT7Hnvw]?N">
                                    <field name="INSTANCE"></field>
                                    <field name="LOG"></field>
                                    <value name="MESSAGE">
                                      <shadow type="text" id="N@Wqb#moNG[q1OTFGbsx">
                                        <field name="TEXT">Markise fährt runter, die Sonne scheint!</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                        <statement name="ELSE">
                          <block type="timeouts_cleartimeout" id="RHwt*5F6iXS(G}8l@1Du">
                            <field name="NAME">timeout_Markise_zu</field>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </xml>
                
                paul53 1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @ZEE last edited by paul53

                  @zee
                  Du verwendest nicht die Timer-Variable timeout_Markise_zu als Sperre, sondern eine zusätzlich erstellte mit dem gleichen Bezeichner.

                  Bild_2022-04-18_133238024.png

                  Selektiere die andere Variable und verifiziere in der Javascript-Ansicht, dass nur eine Variable timeout_Markise_zu existiert.

                  Verwende anstelle des "und" einen zusätzlichen falls-Block, da sonst der Timeout gleich wieder gestoppt wird, was jegliche Nachricht verhindert:

                  Bild_2022-04-18_133757398.png

                  Z 1 Reply Last reply Reply Quote 0
                  • Z
                    ZEE @paul53 last edited by

                    @paul53
                    tut mir leid, ich raff's einfach nicht. 🤦‍♂️

                    Wenn ich eine Variable erstelle, und nenne sie "timer_Markise_zu", bekomme ich die Fehlermeldung, dass diese bereits existiert. Nenne ich sie anders, kann ich anschliessend den Namen "timer_Markise_zu" auswählen. Das ist dann aber trotzdem nicht das richtige Objekt??

                    Wie bekomme ich denn dann den richtigen Baustein hinter das "nicht"?

                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @ZEE last edited by paul53

                      @zee
                      Importiere das Blockly mit umgekehrter Logik.

                      Bild_2022-04-18_140243642.png

                      <xml xmlns="https://developers.google.com/blockly/xml">
                       <variables>
                         <variable type="timeout" id="timeout_Markise_zu">timeout_Markise_zu</variable>
                       </variables>
                       <block type="on" id="Jk@R-l-iJ#U(C;ceyR6J" x="-838" y="-1037">
                         <field name="OID">modbus.0.holdingRegisters.40068_PV_Leistung</field>
                         <field name="CONDITION">ne</field>
                         <field name="ACK_CONDITION"></field>
                         <statement name="STATEMENT">
                           <block type="controls_if" id="K;VZl!BC3u@]?4F0oZ.Z">
                             <mutation elseif="1"></mutation>
                             <value name="IF0">
                               <block type="logic_operation" id="lvf]iX6kR;_LdQgMCwvC" inline="false">
                                 <field name="OP">OR</field>
                                 <value name="A">
                                   <block type="logic_compare" id="pkLr{S}|Po9j0y:,^}c?">
                                     <field name="OP">LT</field>
                                     <value name="A">
                                       <block type="on_source" id="sP(vuTnHsE.g||^UAT}~">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="math_number" id="H^*N=cy*k8.oyjH:DM$4">
                                         <field name="NUM">4000</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="logic_operation" id="FAojrIBIwCZ5t2aKuap:" inline="false">
                                     <field name="OP">OR</field>
                                     <value name="A">
                                       <block type="logic_compare" id="2-YbHw^XZ5~WWwb450#K">
                                         <field name="OP">EQ</field>
                                         <value name="A">
                                           <block type="get_value" id="o@kQawf4=xbi#?q)fvZK">
                                             <field name="ATTR">val</field>
                                             <field name="OID">dwd.0.warning.type</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="text" id="VeG]k[VC#JyT(+`h!v@I">
                                             <field name="TEXT">Thunderstorm</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_compare" id="f}TJ6NxseZT*3o@gd/(I">
                                         <field name="OP">EQ</field>
                                         <value name="A">
                                           <block type="get_value" id="YzX.exbJG%,)ORaBCRD$">
                                             <field name="ATTR">val</field>
                                             <field name="OID">dwd.0.warning.type</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="text" id="zRgr?P3MukK%HWlw)J/F">
                                             <field name="TEXT">Wind/Storm</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="timeouts_cleartimeout" id="RHwt*5F6iXS(G}8l@1Du">
                                 <field name="NAME">timeout_Markise_zu</field>
                               </block>
                             </statement>
                             <value name="IF1">
                               <block type="logic_operation" id="q-$t}_VB#/{WfiJ;x;]@" inline="false">
                                 <field name="OP">AND</field>
                                 <value name="A">
                                   <block type="logic_compare" id="8fz*fU1qlV{mGPOk?EDN">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="get_value" id="sts-$*CY7},RJe3yfx_#">
                                         <field name="ATTR">val</field>
                                         <field name="OID">0_userdata.0.Markise_Position</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="text" id="POa#[5Rv*zfl^}p)~lmV">
                                         <field name="TEXT">oben</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="logic_negate" id="P,-8WVey4#8I::C%#23N">
                                     <value name="BOOL">
                                       <block type="variables_get" id="zy$.5Cq.cKMr%@{JnTZh">
                                         <field name="VAR" id="timeout_Markise_zu" variabletype="timeout">timeout_Markise_zu</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO1">
                               <block type="timeouts_settimeout" id="b^%J=z6h(%K]lV]5%_8w">
                                 <field name="NAME">timeout_Markise_zu</field>
                                 <field name="DELAY">10</field>
                                 <field name="UNIT">sec</field>
                                 <statement name="STATEMENT">
                                   <block type="control_ex" id="gfXx%+%0Arod@j#pnnzl">
                                     <field name="TYPE">false</field>
                                     <field name="CLEAR_RUNNING">FALSE</field>
                                     <value name="OID">
                                       <shadow type="field_oid" id="8E53896/#{wTzBd3Z`NT">
                                         <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Close</field>
                                       </shadow>
                                     </value>
                                     <value name="VALUE">
                                       <shadow type="logic_boolean" id="KW)yq@+6o4UM?PsyZHe{">
                                         <field name="BOOL">TRUE</field>
                                       </shadow>
                                     </value>
                                     <value name="DELAY_MS">
                                       <shadow type="math_number" id=".FvT2S!4]M`M~3gy8y*O">
                                         <field name="NUM">0</field>
                                       </shadow>
                                     </value>
                                     <next>
                                       <block type="signal-cmb" id="y.ZKM(aQl%UT7Hnvw]?N">
                                         <field name="INSTANCE"></field>
                                         <field name="LOG"></field>
                                         <value name="MESSAGE">
                                           <shadow type="text" id="N@Wqb#moNG[q1OTFGbsx">
                                             <field name="TEXT">Markise fährt runter, die Sonne scheint!</field>
                                           </shadow>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                             </statement>
                           </block>
                         </statement>
                       </block>
                      </xml>
                      

                      Anmerkung: Man sollte nicht zwei Trigger auf den gleichen Datenpunkt (PV-Leistung) verwenden.

                      Z 1 Reply Last reply Reply Quote 0
                      • Z
                        ZEE @paul53 last edited by ZEE

                        @paul53

                        geht jetzt. Du hattest Deine vorige Antwort editiert, danach hab ich es verstanden.
                        Nochmals danke für die Hilfe!
                        Jetzt sieht es so aus (und kann weiter verfeinert werden):

                        <block xmlns="https://developers.google.com/blockly/xml" type="timeouts_settimeout" id="RJB*KJGHzo,mgn|HG`}R" x="-636.1221618652344" y="-719.71875">
                          <field name="NAME">timeout_Markise_zu</field>
                          <field name="DELAY">5</field>
                          <field name="UNIT">min</field>
                          <statement name="STATEMENT">
                            <block type="control_ex" id="D,aYfncvo]~6;:x=Et4|">
                              <field name="TYPE">false</field>
                              <field name="CLEAR_RUNNING">FALSE</field>
                              <value name="OID">
                                <shadow type="field_oid" id="LUNO:zcC,;yfWN7^)8^f">
                                  <field name="oid">shelly.0.SHSW-25#10521C07A436#1.Shutter.Close</field>
                                </shadow>
                              </value>
                              <value name="VALUE">
                                <shadow type="logic_boolean" id="qUK=D@vU[k`lTR[oldsX">
                                  <field name="BOOL">TRUE</field>
                                </shadow>
                              </value>
                              <value name="DELAY_MS">
                                <shadow type="math_number" id="2yKv|Q$gdS}|jcQvTD]|">
                                  <field name="NUM">0</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="signal-cmb" id="eGElm@Y$%Aq(h1{CeCV:">
                                  <field name="INSTANCE"></field>
                                  <field name="LOG"></field>
                                  <value name="MESSAGE">
                                    <shadow type="text" id="FLh@K=]vhN/HICKhtwlO">
                                      <field name="TEXT">Markise fährt runter, die Sonne scheint!</field>
                                    </shadow>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                        

                        edit: ich setze Deinen letzten Tipp auch noch um!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        529
                        Online

                        32.0k
                        Users

                        80.5k
                        Topics

                        1.3m
                        Posts

                        2
                        10
                        375
                        Loading More Posts
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes
                        Reply
                        • Reply as topic
                        Log in to reply
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                        The ioBroker Community 2014-2023
                        logo