Navigation

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

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Sequenz abarbeiten

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

      Hallo,
      ich bin relativ neu in ioBroker und Blockly und versuche meine Pimatic Steuerung zu migrieren.
      Für meine Gartenbewässerung habe ich mehrere Magnetventile (switch - object) die ich gerne nacheinander abarbeitet haben möchte.
      Zusätzlich habe ich mir einen Datenpunkt angelegt, der bestimmen soll, wie lange jedes Ventil geöffnet sein soll.
      Irgendwie sowas:
      var timeout = 10
      var active = false

      if $active = true {
      set ventil1 = true for $timeout
      then
      set ventil2 = true for $timeout
      then
      set ventil3 = true for $timeout
      then
      set active = false}

      Hat jemand ein Tipp für mich wie ich das in Blockly lösen kann? Ich hab mal mit Timeouts herumgespielt, bin aber nicht wirklich zum Ziel gekommen...

      1 Reply Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky last edited by liv-in-sky

        ich geh mal davon aus, dass sich das ganze am besten mit minuten steuert und das der einschaltzeitpunkt fix ist - was noch fehlt ist die abfrage, ob es regnet oder überhaupt notwendig ist - das ist aber extra zu machen

        ich setze oben eine variable auf die minuten zahl - du kannst dafür einen datenpunkt benutzen - timeouter mit datenpunkt ersetzen! (in minuten eingeben)

        für import: 'wenn du blockly importierst siehst du noch mehr kommentare zum besseren verständnis


        <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
        <variable type="" id="YL]V6]vaikZ3lQPI%$;">fertig</variable>
        <variable type="" id="bJ{+YHbm0WD]$^junmN">timeouter</variable>
        <variable type="undefined" id="Intervall4">Intervall4</variable>
        <variable type="undefined" id="Intervall2">Intervall2</variable>
        <variable type="undefined" id="Intervall">Intervall</variable>
        </variables>
        <block type="comment" id="5^5k$CM%f;[T@;]XgnVx" x="163" y="-812">
        <field name="COMMENT">statt timeouter kann man festen datenpunkt </field>
        <next>
        <block type="comment" id="9pm6,.K]~$p[EjxZd{r"> <field name="COMMENT"> bestimmen</field> <next> <block type="comment" id="s8Jv%zMg%kaCY/l,/=mV"> <field name="COMMENT">einstellen von start mit fester zeit</field> <next> <block type="schedule" id="9#?::@aoRM%U;xoae4aj"> <field name="SCHEDULE">34 15 * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="0wAV!:ISR#(e3x(COGM("> <field name="VAR" id="bJ{+YH*bm0WD]$^junmN" variabletype="">timeouter</field> <value name="VALUE"> <block type="math_number" id="9kDs:TV71bf3aWxOzwQ">
        <field name="NUM">3</field>
        </block>
        </value>
        <next>
        <block type="controls_if" id="p2#J#,:mz8R=F)4AR1W"> <value name="IF0"> <block type="logic_compare" id="Yj2=x,10}hNC~[a!v-V["> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="Qdt4M8F4Qb^+Y!n6Em6P"> <field name="ATTR">val</field> <field name="OID">controll-own.0.AtesterEin</field> </block> </value> <value name="B"> <block type="logic_boolean" id="[;{#hVCedKt$LHLbF-EM"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callnoreturn" id="w;aUiy(h,?W#e{n9]D7p"> <mutation name="starte block 1"></mutation> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defnoreturn" id="$rUSo4b.JLKN6uZicJF" x="938" y="-713">
        <field name="NAME">starte block 3</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
        <block type="debug" id="Gxf9iAh#S~$s9u,ZBL0f">
        <field name="Severity">log</field>
        <value name="TEXT">
        <shadow type="text" id="V^2}DS~!z.bUGZoJg?
        $">
        <field name="TEXT">3 geht an</field>
        </shadow>
        </value>
        <next>
        <block type="control" id="hxex7qm,lUXT?/(j{Kd|">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.Atesten</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="8UCA6AmD_AOhCcgmMmhO">
        <field name="BOOL">TRUE</field>
        </block>
        </value>
        <next>
        <block type="variables_set" id="j-rg}bvR07mLw3u]M%!U">
        <field name="VAR" id="YL]V6]vaikZ3lQPI%$;" variabletype="">fertig</field>
        <value name="VALUE">
        <block type="math_arithmetic" id="A3}lDETP+Z_Q@DhW2Q[e">
        <field name="OP">ADD</field>
        <value name="A">
        <shadow type="math_number" id="
        ]e~hS_dKInT:hvP]M7"> <field name="NUM">1</field> </shadow> <block type="time_get" id="Y4~gcyJQ.Bplwd-$(lQf"> <mutation format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="W@I=}snh9IJdlDkVL10a"> <field name="NUM">120</field> </shadow> <block type="math_arithmetic" id="8$,R4lXljhuEXTmoMmi#"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="FnTCr6h_-W8DtMY55Ny+"> <field name="NUM">125</field> </shadow> <block type="variables_get" id="g!{2bW*w#]9uZ5a?i]ny"> <field name="VAR" id="bJ{+YH*bm0WD]$^junmN" variabletype="">timeouter</field> </block> </value> <value name="B"> <shadow type="math_number" id="YtPTY47SwXI2TJFh8v?~"> <field name="NUM">60000</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="timeouts_setinterval" id="L@(.i4L/QHHB0o}j.m)X"> <field name="NAME">Intervall4</field> <field name="INTERVAL">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="Cy0(@E_:gI9sg)^FxO=M"> <value name="IF0"> <block type="logic_compare" id="BoZ?s4/%cXf/G5?4{YdM"> <field name="OP">GT</field> <value name="A"> <block type="time_get" id=",PkBU*aW1A4)}0DTXS-">
        <mutation format="false" language="false"></mutation>
        <field name="OPTION">object</field>
        </block>
        </value>
        <value name="B">
        <block type="variables_get" id="$c}Ve7Dy++M-N(VLo--b">
        <field name="VAR" id="YL]V6]vaikZ3lQPI%$;" variabletype="">fertig</field>
        </block>
        </value>
        </block>
        </value>
        <statement name="DO0">
        <block type="control" id="ftShw8BOXTld0
        ~A_Kql">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.Atesten</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="pNpaH?/ovY(GVmn[a7+k">
        <field name="BOOL">FALSE</field>
        </block>
        </value>
        <next>
        <block type="debug" id="^]B#|)v[m-R#^frtV#u"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="=aw]y7$Y5DZQszmQ=E6w"> <field name="TEXT">3 geht aus</field> </shadow> </value> <next> <block type="timeouts_clearinterval" id="zW~cfO}am7$sCmOy_XMV"> <field name="NAME">Intervall4</field> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="comment" id="oS)t5$ITF$?bbdAN2Jk" x="562" y="-612">
        <field name="COMMENT">startet wenn object true ist</field>
        <next>
        <block type="comment" id="a}BY0?oSr
        Z,)EixU~H"> <field name="COMMENT">object musst du definieren</field> <next> <block type="on_ext" id="HC!-![x~Q68c7@:}o.R*"> <mutation items="1"></mutation> <field name="CONDITION">true</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="ADjENhKH%=+6r!G{,qVE"> <field name="oid">controll-own.0.AtesterEin</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="aW|0^bs.R|E2qaBCTwL("> <field name="VAR" id="bJ{+YH*bm0WD]$^junmN" variabletype="">timeouter</field> <value name="VALUE"> <block type="math_number" id="5F(NuM1VBe#~d?m_,G2">
        <field name="NUM">7</field>
        </block>
        </value>
        <next>
        <block type="procedures_callnoreturn" id="}o:]y8sb]t]|/ySMc}hT">
        <mutation name="starte block 1"></mutation>
        </block>
        </next>
        </block>
        </statement>
        </block>
        </next>
        </block>
        </next>
        </block>
        <block type="procedures_defnoreturn" id="gx9s2iqvhxRn7C#UX@d" x="137" y="-513"> <field name="NAME">starte block 1</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="debug" id=".nI.8[(3!J:x8V;*u_Hr"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="v~@V}[G.LJHj0FnjtrW8"> <field name="TEXT">geht an</field> </shadow> </value> <next> <block type="comment" id="[{AR+ki{C#/:8tz5Xyt">
        <field name="COMMENT">setzt auslöser wieder auf falsch</field>
        <next>
        <block type="control" id="@r=;7L3CADRkPhwG7Qk">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.AtesterEin</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="?Y,uW3k8BBZ14_mVemw"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="6f#wB3syOC_([]Nn=WxU"> <field name="COMMENT">1 wird eingeschaltet</field> <next> <block type="comment" id="txOe2ZauYz;2Z7tM!_4)"> <field name="COMMENT">muss in jedem block gesetzt werden</field> <next> <block type="control" id="O$Gz%j1@qi#NXQqLl(k2"> <mutation delay_input="false"></mutation> <field name="OID">controll-own.0.Atesten</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="UArp-ZW2Hdhph5H6B)fM"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="comment" id="Puas9_P6Hb^@7X;2,:sh"> <field name="COMMENT">hier kann man timeouter ersetzen !! mit datenpunkt</field> <next> <block type="variables_set" id="h-vv3p1~[$wgoahn:r%P"> <field name="VAR" id="YL]V6]_vaikZ3lQPI%$;" variabletype="">fertig</field> <value name="VALUE"> <block type="math_arithmetic" id="eXTLH.2e71/7x,tNHnXO"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="_]e~hS_dKInT:hvP]M7">
        <field name="NUM">1</field>
        </shadow>
        <block type="time_get" id="v|K+Ns3VIYoc[H}50l^">
        <mutation format="false" language="false"></mutation>
        <field name="OPTION">object</field>
        </block>
        </value>
        <value name="B">
        <shadow type="math_number" id="W@I=}snh9IJdlDkVL10a">
        <field name="NUM">120</field>
        </shadow>
        <block type="math_arithmetic" id="IuO6-3c^X_+rM:n[Y,2(">
        <field name="OP">MULTIPLY</field>
        <value name="A">
        <shadow type="math_number" id="FnTCr6h_-W8DtMY55Ny+">
        <field name="NUM">125</field>
        </shadow>
        <block type="variables_get" id="_EN4#5P@2gdJV0jE4V?t">
        <field name="VAR" id="bJ{+YH
        bm0WD]$^junmN" variabletype="">timeouter</field>
        </block>
        </value>
        <value name="B">
        <shadow type="math_number" id="9l%!M0Ew2t%.u1eg3(YX">
        <field name="NUM">60000</field>
        </shadow>
        </value>
        </block>
        </value>
        </block>
        </value>
        <next>
        <block type="comment" id="vB~KXdG8olPlfU:k.cWn">
        <field name="COMMENT">wird jede minute ausgeführt </field>
        <next>
        <block type="comment" id="m+;ICU}eer4V$M_Q?L3}">
        <field name="COMMENT">und gestoppt wenn gewünschte min erreicht</field>
        <next>
        <block type="timeouts_setinterval" id="Ex0aH+i(tJY{9,~CNw
        g">
        <field name="NAME">Intervall</field>
        <field name="INTERVAL">1</field>
        <field name="UNIT">min</field>
        <statement name="STATEMENT">
        <block type="controls_if" id="@ZdhXa#s,Pym(JfvZr2"> <value name="IF0"> <block type="logic_compare" id="GAL(IJb5/5730sXx.~|">
        <field name="OP">GT</field>
        <value name="A">
        <block type="time_get" id="ju0EIYKleBg]6g@Wj-=9">
        <mutation format="false" language="false"></mutation>
        <field name="OPTION">object</field>
        </block>
        </value>
        <value name="B">
        <block type="variables_get" id="+pGW=!R{ymX]gSwK^/q{">
        <field name="VAR" id="YL]V6]vaikZ3lQPI%$;" variabletype="">fertig</field>
        </block>
        </value>
        </block>
        </value>
        <statement name="DO0">
        <block type="comment" id="fMI2nk{2x(m4BefP9|">
        <field name="COMMENT">1 wird ausgeschaltet</field>
        <next>
        <block type="comment" id="I:TY2jSqQYCllH@wShb+">
        <field name="COMMENT">muss in jedem block gesetzt werden</field>
        <next>
        <block type="control" id="JW|J@-Ynn7m3tZ%dB78!">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.Atesten</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="jXV/llnK9G3M3rAOVr.l">
        <field name="BOOL">FALSE</field>
        </block>
        </value>
        <next>
        <block type="debug" id="d.IpJ*SGhaF-Sgn!GTo)">
        <field name="Severity">log</field>
        <value name="TEXT">
        <shadow type="text" id="Pzc!40,[z7{;l}h/@g+"> <field name="TEXT">geht aus</field> </shadow> </value> <next> <block type="comment" id="+^gw/E-[DNL7uKTl.ooc"> <field name="COMMENT">es wird der zweite block aufgerufen</field> <next> <block type="procedures_callnoreturn" id="fLE%j(6ra.MvqRp,]M{}"> <mutation name="starte block 2"></mutation> <next> <block type="timeouts_clearinterval" id="-#UZb3XmEk+JWB4{{Ed">
        <field name="NAME">Intervall</field>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </statement>
        </block>
        </statement>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </statement>
        </block>
        <block type="procedures_defnoreturn" id="lY$w2zH;Em(5JV8hq+!Z" x="938" y="-288">
        <field name="NAME">starte block 2</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
        <block type="debug" id="T7Gf+8@I/q@/=DSG~2e6">
        <field name="Severity">log</field>
        <value name="TEXT">
        <shadow type="text" id="P;1urTjCI?p9p0B8QmqZ">
        <field name="TEXT">2 geht an</field>
        </shadow>
        </value>
        <next>
        <block type="control" id=";MG/G|bnTJLeP%D|c(Sk">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.Atesten2</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="{x+3Do~glpjN2[*AfPm5">
        <field name="BOOL">TRUE</field>
        </block>
        </value>
        <next>
        <block type="variables_set" id="K[UIHj?+H,p9Awn043j1">
        <field name="VAR" id="YL]V6]vaikZ3lQPI%$;" variabletype="">fertig</field>
        <value name="VALUE">
        <block type="math_arithmetic" id="vRwwhs+c[PrFGK(G|*S3">
        <field name="OP">ADD</field>
        <value name="A">
        <shadow type="math_number" id="
        ]e~hS_dKInT:hvP]M7"> <field name="NUM">1</field> </shadow> <block type="time_get" id="hW.r~tB8h!~K,nA.Zk4C"> <mutation format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="W@I=}snh9IJdlDkVL10a"> <field name="NUM">120</field> </shadow> <block type="math_arithmetic" id="vALvjkQPLQwNO+5;4d=">
        <field name="OP">MULTIPLY</field>
        <value name="A">
        <shadow type="math_number" id="FnTCr6h
        -W8DtMY55Ny+">
        <field name="NUM">125</field>
        </shadow>
        <block type="variables_get" id="eTxPX/T^]!l%$~qlRa."> <field name="VAR" id="bJ{+YH*bm0WD]$^junmN" variabletype="">timeouter</field> </block> </value> <value name="B"> <shadow type="math_number" id="(QN:B5!v8R20Z+5=%iyy"> <field name="NUM">60000</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="timeouts_setinterval" id="8a@R~Xn:7MJ/?MHL8Yt">
        <field name="NAME">Intervall2</field>
        <field name="INTERVAL">1</field>
        <field name="UNIT">min</field>
        <statement name="STATEMENT">
        <block type="controls_if" id="{+H3gdm97gO.UDtlw,">
        <value name="IF0">
        <block type="logic_compare" id="%6-U=aVmWHZ2lav,)d2|">
        <field name="OP">GT</field>
        <value name="A">
        <block type="time_get" id="cj,RxG4vawx(T0AeNf#L">
        <mutation format="false" language="false"></mutation>
        <field name="OPTION">object</field>
        </block>
        </value>
        <value name="B">
        <block type="variables_get" id="3rq|;oi]MiW!Igx)?+ep">
        <field name="VAR" id="YL]V6]_vaikZ3lQPI%$;" variabletype="">fertig</field>
        </block>
        </value>
        </block>
        </value>
        <statement name="DO0">
        <block type="control" id="8l3EM7om5?oM{N,NPzYy">
        <mutation delay_input="false"></mutation>
        <field name="OID">controll-own.0.Atesten2</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="logic_boolean" id="w#dWsw8D3k30.b.sIe*+">
        <field name="BOOL">FALSE</field>
        </block>
        </value>
        <next>
        <block type="debug" id="n[Mf1O.$%@Q}6DvfjfWm">
        <field name="Severity">log</field>
        <value name="TEXT">
        <shadow type="text" id="49|Q{En3/r-#9rW)t+zV">
        <field name="TEXT">2 geht aus</field>
        </shadow>
        </value>
        <next>
        <block type="procedures_callnoreturn" id="k8+y{[xp}RdPZ#Q0(%!=">
        <mutation name="starte block 3"></mutation>
        <next>
        <block type="timeouts_clearinterval" id="+iUSJ^|bbT-hK`_UX*RE">
        <field name="NAME">Intervall2</field>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </statement>
        </block>
        </statement>
        </block>
        </next>
        </block>
        </next>
        </block>
        </next>
        </block>
        </statement>
        </block>
        </xml>

        Image 9.png

        Image 10.png

        1 Reply Last reply Reply Quote 0
        • R
          Raducanu last edited by

          Ui, das erschlägt mich gerade etwas... Erstmal vielen Dank. Ich schaue mir das heute Abend mal in Ruhe an...

          1 Reply Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky last edited by

            ja - glaub ich dir

            lass dir zeit und frag nach

            nur soviel:

            es beginnt bei dem cron trigger und ruft dann den 2ten block und dieser dann den 3ten block auf - eigentlich machen alle blöcke das gleiche - verstehst du den ersten block mit dem cron trigger - verstehst du auc hdie anderen beiden

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

              schau mal hier. hier geht es auch um eine sequenz:
              https://forum.iobroker.net/topic/18289/bier-maischen-script-mit-blockly?lang=en-GB&page=1

              1 Reply Last reply Reply Quote 0
              • R
                Raducanu last edited by

                Ich hab es jetzt erstmal so gelöst:

                d4c94950-bbc6-4dcf-8b5a-2d5c40bff0ce-image.png

                Werde es heute abend mal ausprobieren...

                liv-in-sky G 2 Replies Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @Raducanu last edited by

                  @Raducanu

                  hast du das schon mal getestet?

                  Image 4.png

                  Image 6.png

                  1 Reply Last reply Reply Quote 0
                  • G
                    Gerni @Raducanu last edited by

                    @Raducanu wie ist Dein Test denn verlaufen?

                    1 Reply Last reply Reply Quote 0
                    • R
                      Raducanu last edited by

                      Aktuell funktioniert es so wie ich es will. Es ist zwar nicht schön, aber leider fehlt mir aktuell die Zeit dafür. Mein Pimatic der das Zeug vorher gesteuert hat, befindet sich auf einer defekten SD Karte und funktioniert nur noch so halb. Daher migriere ich gerade alles Richtung IO Broker. Die Bewässerungssteuerung ist dort nur eins von vielen.
                      Ich habe nun alle Geräte steuerbar, aber Szenen, Abläufe und Automatische Scripte muss ich händisch nachbauen. Dazu habe ich meine 433Mhz Rolladenaktoren gegen Shelly ausgetauscht und eingebunden....

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

                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      488
                      Online

                      31.9k
                      Users

                      80.3k
                      Topics

                      1.3m
                      Posts

                      4
                      9
                      659
                      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