Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blocky variable

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Blocky variable

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

      @booehmemaik:

      Mir fehlt noch das Verständnis für die Timeouts und den reset für die Timeouts. Verstanden habe ich das alles so lange innerhalb des Timeouts ausgeführt wird, bis die Zeit abgelaufen ist, und danach außerhalb vom Timeout weiter gemacht wird. `
      So ist es eben nicht.

      "Timeout in 1 Minute" bedeutet, dass die Befehle in dem Timeout NACH 1 Minute ausgeführt werden.

      Ein Timeout kann mehrmals ausgeführt werden.

      Jedes mal wenn ein Timeout gestartet wird, wird ein kleines "Unterprogramm" generiert, das nach der angegebenen Zeit abläuft.

      Wenn ein Timeout, während er noch aktiv ist, 2x, 5x oder 5000x aufgerufen wird, gibt es eben 2,5 oder 5000 "Unterprogramme".

      Und JEDES "Unterprogramm" wird dann auch abgearbeitet.

      Mit einem VORHERIGEN "Stop Timeout" kann man das verhindern.

      1 Reply Last reply Reply Quote 0
      • B
        booehmemaik last edited by

        ok, ist dann mein Verständnis im Bezug auf das Bild richtig ?

        3916_2timeout.jpg

        Die 1 im Bild ist der Trigger für den Timeout

        Die 2 ist der Code welcher durch den Timeout verzögert ausgeführt wird (wie eine Pause/wait)

        Das Fragezeichen, ist meine noch immer unklarheit, wo müsste der clear timeout sitzen um den Code innerhalb vom Timeout nur einmal auszuführen ? vor dem Update "Waschmaschine_opState" ?

        1 Reply Last reply Reply Quote 0
        • rantanplan
          rantanplan last edited by

          Sorry, aber liest Du auch was ich schreibe?
          @booehmemaik:

          Die 1 im Bild ist der Trigger für den Timeout `
          Das ist KEIN Trigger, sondern eine Bedingungsabfrage.

          @booehmemaik:

          Die 2 ist der Code welcher durch den Timeout verzögert ausgeführt wird (wie eine Pause/wait) `
          Es gibt keine Pause/wait !!!!!!

          @Rantanplan:

          Zu Timeout:

          1.

          Ein Timeout macht KEINE Programmpause. Die Aktionen in dem Timeout werden nur später ausgeführt.

          Das Script führt den nächsten Baustein direkt danach aus.

          Wird ein Timer gestoppt, werden die Aktionen in dem Timer NICHT ausgeführt. `

          @booehmemaik:

          Das Fragezeichen, ist meine noch immer unklarheit, wo müsste der clear timeout sitzen um den Code innerhalb vom Timeout nur einmal auszuführen ? vor dem Update "Waschmaschine_opState" ? `

          @Rantanplan:

          Du startest einen Timer und direkt danach stoppst Du ihn wieder.

          Wenn Du verhindern willst, dass ein Timer mehrfach gestartet wird, musst Du VOR dem Timer das Stop setzen.

          Das Stoppen eines Timers der noch nicht aktiv ist, macht keinen Fehler. `

          Grüße

          1 Reply Last reply Reply Quote 0
          • B
            booehmemaik last edited by

            vielleicht liegt mein Verständnis problem darin, das ich einfach meine Regel nicht zum laufen bekomme und ich somit noch kein funktionierentes Beispiel gesehen habe.

            1 Reply Last reply Reply Quote 0
            • rantanplan
              rantanplan last edited by

              @booehmemaik:

              vielleicht liegt mein Verständnis problem darin, das ich einfach meine Regel nicht zum laufen bekomme und ich somit noch kein funktionierentes Beispiel gesehen habe. `
              Was ist den an dem Wort "VOR" so schwer zu verstehen? :roll:
              147_beispiel.png

              1 Reply Last reply Reply Quote 0
              • B
                booehmemaik last edited by

                @rantanplan:

                @booehmemaik:

                vielleicht liegt mein Verständnis problem darin, das ich einfach meine Regel nicht zum laufen bekomme und ich somit noch kein funktionierentes Beispiel gesehen habe. `
                Was ist den an dem Wort "VOR" so schwer zu verstehen? :roll:

                Beispiel.png `

                🙂 daran nix… ich seh das nur im ganzen mit dem rest der regel.

                1 Reply Last reply Reply Quote 0
                • rantanplan
                  rantanplan last edited by

                  Habe gerade mal kurz drüber geschaut.

                  Tausche mal Deine "aktualisiere" Bausteine mit "steuere".

                  Und setze auch mal den "Debug" Baustein ein. Damit kannst Du den Ablauf kontrollieren.

                  1 Reply Last reply Reply Quote 0
                  • B
                    booehmemaik last edited by

                    @rantanplan:

                    Habe gerade mal kurz drüber geschaut.

                    Tausche mal Deine "aktualisiere" Bausteine mit "steuere".

                    Und setze auch mal den "Debug" Baustein ein. Damit kannst Du den Ablauf kontrollieren. `

                    ich hatte inzwischen "aktualisiere" und "steuere" schon eingebaut , einfach um zu sehen welche den State mir wirklich liefert.

                    Funktioniert auch beides…., debug werd ich noch einbauen.

                    3916_2timeout.jpg

                    ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
                    ! <block type="comment" id="dSPKkOyhX}?G~[J2mE2]" x="-1112" y="-788"><field name="COMMENT">MODE_OFF = 0</field>
                    ! <next><block type="comment" id="0S0Djo%,r7#k#X5l0HDx"><field name="COMMENT">MODE_STANDBY = 1</field>
                    ! <next><block type="comment" id="pLA/1T=%jR7=^DFLstDJ"><field name="COMMENT">MODE_ACTIVE = 2</field>
                    ! <next><block type="comment" id="9d(yu6o[H2Q418yB_I06"><field name="COMMENT">MODE_FINISHED = 3</field>
                    ! <next><block type="on_ext" id=":sAVuX[w}R/PP[=SJUT2"><mutation items="1"></mutation>
                    ! <field name="CONDITION">any</field>
                    ! <value name="OID0"><shadow type="field_oid" id="v!+{Y#3p8koW_FgRiI6"><field name="oid">default</field></shadow>
                    ! <block type="field_oid" id="j/|i)|3M(,}FC%D;l=b+"><field name="oid">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <statement name="STATEMENT"><block type="controls_if" id="t}E2eO70~q;%8]7nvhq/"><mutation elseif="2"></mutation>
                    ! <value name="IF0"><block type="logic_compare" id="7zF5#!E,7f3w@}U~?YMi"><field name="OP">LT</field>
                    ! <value name="A"><block type="get_value" id=":@3z=%Ry8X+=Q61lYCz}"><field name="ATTR">val</field>
                    ! <field name="OID">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <value name="B"><block type="math_number" id="TR|e:8:CS1q,tr([3V#
                    "><field name="NUM">0.4</field></block></value></block></value>
                    ! <statement name="DO0"><block type="update" id="+WIg0(Gfx6tzU=V^umAS"><mutation delay_input="false"></mutation>
                    ! <field name="OID">javascript.0.waschmaschine_op.state</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block type="math_number" id="MUNN3sf/Gz!N:8/AfiLA"><field name="NUM">0</field></block></value>
                    ! <next><block type="control" id="[]{76vXag]HR3Q@iYTi/"><mutation delay_input="false"></mutation>
                    ! <field name="OID">javascript.0.scriptEnabled.global.2a_Wasch,aschine_OpNumber_new</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block type="math_number" id="[EE.b7Hi8tc|baG6PI."><field name="NUM">0</field></block></value> ! <next><block type="comment" id="8{wRH2_LR;FE-?p5e-cJ"><field name="COMMENT">Mode Off</field> ! <next><block type="debug" id="},#H]%N1_lXvE(gp0*0e"><field name="Severity">log</field> ! <value name="TEXT"><shadow type="text" id="3YWGLJ]h,P6J]@FI31N/"><field name="TEXT">Mode off</field></shadow></value></block></next></block></next></block></next></block></statement> ! <value name="IF1"><block type="logic_compare" id="5IA9)|M?W;pHnu/Y?(vn"><field name="OP">GT</field> ! <value name="A"><block type="get_value" id="9WqzmQ;x?k[?mNFN3d"><field name="ATTR">val</field>
                    ! <field name="OID">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <value name="B"><block type="math_number" id="Y~3
                    KYaH|091xFsC6zoR"><field name="NUM">4.5</field></block></value></block></value>
                    ! <statement name="DO1"><block type="update" id="sN|K6jYB6u]/)J#3O,34"><mutation delay_input="false"></mutation>
                    ! <field name="OID">javascript.0.waschmaschine_op.state</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block type="math_number" id="PKCq3pIqe:JdUXF4@FsK"><field name="NUM">2</field></block></value>
                    ! <next><block type="control" id="zLuQ1~SzhN1i[nR}m-2Q"><mutation delay_input="false"></mutation>
                    ! <field name="OID">javascript.0.scriptEnabled.global.2a_Wasch,aschine_OpNumber_new</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block type="math_number" id="=Qjt9Qqf~mS:8wk(iU.V"><field name="NUM">2</field></block></value>
                    ! <next><block type="comment" id="{d8S;K6ICF?Je:sn+{Zl"><field name="COMMENT">Mode Active</field>
                    ! <next><block type="debug" id="wpKndF*i{uKM%K1oe^^"><field name="Severity">log</field> ! <value name="TEXT"><shadow type="text" id=":}{!K9X;!o2v_mD8]bp"><field name="TEXT">Mode active</field></shadow></value></block></next></block></next></block></next></block></statement>
                    ! <value name="IF2"><block type="logic_compare" id="=c|A#3Oi!P0Ge^3ApMb6"><field name="OP">LT</field>
                    ! <value name="A"><block type="get_value" id="9F/03XdLM^Zw(CpclOqj"><field name="ATTR">val</field>
                    ! <field name="OID">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <value name="B"><block type="math_number" id="K1LE4SSO|glxOI}vPm+p"><field name="NUM">1.5</field></block></value></block></value>
                    ! <statement name="DO2"><block type="controls_if" id="G,F-R%qcd^Vq;bx;1_3|"><mutation elseif="1"></mutation>
                    ! <value name="IF0"><block type="logic_compare" id="=kDan7Ln)9vw~7Mu-NQ^"><field name="OP">EQ</field>
                    ! <value name="A"><block type="get_value" id="ynt@[YBT3f|Xi.jRwp2"><field name="ATTR">val</field>
                    ! <field name="OID">javascript.0.waschmaschine_op.state</field></block></value>
                    ! <value name="B"><block type="math_number" id=":A^VDVi:tB]gqWb:ud{I"><field name="NUM">0</field></block></value></block></value>
                    ! <statement name="DO0"><block type="update" id="+{;s{i.N3~C[7}Hs.?1"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.waschmaschine_op.state</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="math_number" id="0wcd~9j-{U!50L1/W!b*"><field name="NUM">1</field></block></value> ! <next><block type="control" id="{xEX=qRT9ZvVL5W,a31R"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.scriptEnabled.global.2a_Wasch,aschine_OpNumber_new</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="math_number" id="z1]yqC^jxy;:Lfma4{lh"><field name="NUM">1</field></block></value> ! <next><block type="comment" id="8-)uyIeko_2M5KNc!esi"><field name="COMMENT">Mode Standby</field> ! <next><block type="debug" id="j#Gofrw_7UD-Bo+%LA:q"><field name="Severity">log</field> ! <value name="TEXT"><shadow type="text" id="X[Rxq4=tHecmfR+XWMG8"><field name="TEXT">Mode standby</field></shadow></value></block></next></block></next></block></next></block></statement> ! <value name="IF1"><block type="logic_compare" id="z^n*.sK4S9wlmjoyS]/k"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="2@%fd*xOjAOG4NkbB/Gb"><field name="ATTR">val</field> ! <field name="OID">javascript.0.waschmaschine_op.state</field></block></value> ! <value name="B"><block type="math_number" id="wDYmioBTedF|c76.+I3t"><field name="NUM">1</field> ! <comment pinned="false" h="80" w="160">Mode Active</comment></block></value></block></value> ! <statement name="DO1"><block type="controls_if" id="#hH2Di[K~CM(]u~A!8B."><value name="IF0"><block type="logic_compare" id="XN6{]Tmi{3,VC}mh4]G"><field name="OP">LT</field>
                    ! <value name="A"><block type="get_value" id=":7i[1HVgfeB;[ob6G].g"><field name="ATTR">val</field>
                    ! <field name="OID">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <value name="B"><block type="math_number" id="NDw_^~E3Dnkn)ZoA?6Cs"><field name="NUM">1.5</field></block></value></block></value>
                    ! <statement name="DO0"><block type="update" id="pyk
                    G.5@g?Ou)Ir%@apQ"><mutation delay_input="false"></mutation>
                    ! <field name="OID">javascript.0.waschmaschine_op.state</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block type="math_number" id="SJhyy6u_{1VYlD/UP|["><field name="NUM">3</field></block></value>
                    ! <next><block type="control" id="q,p-%[o@1Jy9p]6U#s_"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.scriptEnabled.global.2a_Wasch,aschine_OpNumber_new</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="math_number" id="=5w~t)+JV4xOE{DRA_nO"><field name="NUM">3</field></block></value> ! <next><block type="comment" id="0TgNhvF+-Veuy,HeIj4e"><field name="COMMENT">Mode Finish</field> ! <next><block type="debug" id=":T?5M|Q!pn@n,R)y953i"><field name="Severity">log</field> ! <value name="TEXT"><shadow type="text" id="Qp0R|]z{id,-Q20[A4-"><field name="TEXT">Mode finished check 2</field></shadow></value>
                    ! <next><block type="timeouts_cleartimeout" id="Byr}O[P;2=ZhEYvr_k2H"><field name="NAME">timeout</field>
                    ! <next><block type="controls_if" id="3A_(#Qm.ZuYYN@y@.5RK"><value name="IF0"><block type="logic_compare" id="LSkN)~vW
                    #hc)Gc|R;#S"><field name="OP">LT</field>
                    ! <value name="A"><block type="get_value" id="6}.qPR2fC{|gM-(c|rem"><field name="ATTR">val</field>
                    ! <field name="OID">fritzdect.0.DECT200_087610322462.power</field></block></value>
                    ! <value name="B"><block type="math_number" id="gqB.YDSR(GVs%77uE7Eu"><field name="NUM">1.5</field></block></value></block></value>
                    ! <statement name="DO0"><block type="timeouts_settimeout" id="/=^2CceB!FZr=5PA6Lr"><field name="NAME">timeout</field> ! <field name="DELAY">120</field> ! <field name="UNIT">sec</field> ! <statement name="STATEMENT"><block type="comment" id="jD)j(Jj*6TSQGoNmvxvL"><field name="COMMENT">checke again before setting to 3 (finished)</field> ! <next><block type="debug" id="-ibtS=Az#uwAI[|0D.r0"><field name="Severity">log</field> ! <value name="TEXT"><shadow type="text" id="_)C96:eU!J0%CBLaF].K"><field name="TEXT">Mode finished check 1</field></shadow></value></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement></block></statement></block></statement></block></next></block></next></block></next></block></next></block> ! <block type="variables_set" id="=15IclI=P@_lPxd26.pD" x="-437" y="-763"><field name="VAR">Light_ON</field> ! <value name="VALUE"><block type="math_number" id="sBKZm:SPObJMIUUV}nQS"><field name="NUM">254</field></block></value> ! <next><block type="variables_set" id="orP.=7Kv|CN~!V6ZrZx_"><field name="VAR">Light_OFF</field> ! <value name="VALUE"><block type="math_number" id="H9QkV|Ug23Z2zkvS}n@h"><field name="NUM">0</field></block></value> ! <next><block type="variables_set" id="zToY@;-rR0G9Uxv#2rT^"><field name="VAR">RED</field> ! <value name="VALUE"><block type="math_number" id="VMmAf]Hz|OM/V{d4E*mG"><field name="NUM">65338</field></block></value> ! <next><block type="variables_set" id="W0DR5=o*v,?q2t-iK^M9"><field name="VAR">GREEN</field> ! <value name="VALUE"><block type="math_number" id="%RD6_1h;9mX1vDcPy2#E"><field name="NUM">22568</field></block></value> ! <next><block type="on_ext" id="P7/EY_dv(nXovf:L:3*Z"><mutation items="1"></mutation> ! <field name="CONDITION">any</field> ! <value name="OID0"><shadow type="field_oid" id="lNnipdtFnT9LmUm)-1su"><field name="oid">default</field></shadow> ! <block type="field_oid" id="3l.@,?db)[9h?^LG4j3z"><field name="oid">javascript.0.waschmaschine_op.state</field></block></value> ! <statement name="STATEMENT"><block type="controls_if" id="C;OINX!bjjd/Xs8C==3T"><value name="IF0"><block type="logic_compare" id="5zEz}Q*R6KIF39aBQbf4"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="+5eb3_E,6l=2fIA)Z@5O"><field name="ATTR">val</field> ! <field name="OID">javascript.0.waschmaschine_op.state</field></block></value> ! <value name="B"><block type="math_number" id="!SGF4FmqsRp3Kf0,!m~)"><field name="NUM">3</field></block></value></block></value> ! <statement name="DO0"><block type="controls_repeat_ext" id="c0uk,,hP~wq@OOqoK0ia"><value name="TIMES"><shadow type="math_number" id="vdPlQdck4V9V(nTlGOo"><field name="NUM">10</field></shadow></value>
                    ! <statement name="DO"><block type="control" id="u^6zMrmEci/(N4Y5,U@"><mutation delay_input="false"></mutation> ! <field name="OID">hue.0.Philips_hue.BueroHueStripeRGB.hue</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="variables_get" id="yqL09;[,K)u.tHmFy*_X"><field name="VAR">RED</field></block></value> ! <next><block type="control" id="[Eu{OccL!Ls~dKx:^e"><mutation delay_input="true"></mutation>
                    ! <field name="OID">hue.0.Philips_hue.BueroHueStripeRGB.bri</field>
                    ! <field name="WITH_DELAY">TRUE</field>
                    ! <field name="DELAY_MS">500</field>
                    ! <field name="UNIT">ms</field>
                    ! <field name="CLEAR_RUNNING">FALSE</field>
                    ! <value name="VALUE"><block type="variables_get" id="CYc.?u%rEskT9,zK`i=9"><field name="VAR">Light_ON</field></block></value>
                    ! <next><block type="control" id="HQ32t;s,||B@W}]uTNw)"><mutation delay_input="true"></mutation>
                    ! <field name="OID">hue.0.Philips_hue.BueroHueStripeRGB.bri</field>
                    ! <field name="WITH_DELAY">TRUE</field>
                    ! <field name="DELAY_MS">1</field>
                    ! <field name="UNIT">sec</field>
                    ! <field name="CLEAR_RUNNING">FALSE</field>
                    ! <value name="VALUE"><block type="variables_get" id="BvBn-8QJ;o2B847Npq^?"><field name="VAR">Light_OFF</field></block></value></block></next></block></next></block></statement>
                    ! <next><block type="email" id="h?-f~!mQ}+I3=??qruJ9"><field name="INSTANCE">.0</field>
                    ! <field name="IS_HTML">FALSE</field>
                    ! <field name="LOG">log</field>
                    ! <value name="TO</field></shadow></value>
                    ! <value name="TEXT"><shadow type="text" id=".QCu]jvy~6#dTiJ]FP|W"></shadow></value>
                    ! <value name="SUBJECT"><shadow type="text" id="TG%{4k;~DE0O{n^/r11
                    "><field name="TEXT">Waschmaschine Fertig</field></shadow></value></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></xml>

                    1 Reply Last reply Reply Quote 0
                    • rantanplan
                      rantanplan last edited by

                      Nun, Probelauf kannst nur Du machen.

                      "steuere" ist sicherer als "aktualisiere".

                      Der "Stop" ist immer noch an der falschen Stelle.

                      1 Reply Last reply Reply Quote 0
                      • rantanplan
                        rantanplan last edited by

                        Und Dein Problem passt nicht mehr zum Thema "Blockly variable".

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        647
                        Online

                        31.7k
                        Users

                        79.8k
                        Topics

                        1.3m
                        Posts

                        4
                        22
                        2979
                        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