Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Blockly] Was ist besser?

    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

    [Blockly] Was ist besser?

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators last edited by

      Das mit dem Stop musst du mir bitte mal zeigen, wenn du Zeit hast.

      So klappt es jedenfalls auch - es kommt nur noch einmal, auch nach -> Zu -> Auf.

      Jetzt wollte ich noch eine Schleife einbauen:
      144_blockly_badfenster05.jpg

      Die wird aber direkt hintereinander abgearbeitet - nicht wie geplant im Alarm-Abstand (jetzt 2min - später 10 Min.)

      javascript.0	2017-12-16 15:22:38.603	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.603	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.603	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.603	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.602	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.602	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.602	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.602	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.601	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:22:38.601	info	script.js.Badfenster_schliessen_3: 3\. Der Griff ist noch immer auf: 1
      javascript.0	2017-12-16 15:20:38.600	info	script.js.Badfenster_schliessen_3: 2: Der Griff wurde gedreht auf: 1
      javascript.0	2017-12-16 15:20:38.600	info	script.js.Badfenster_schliessen_3: Der Griff wurde gedreht auf: 1
      javascript.0	2017-12-16 15:20:34.599	info	script.js.Badfenster_schliessen_3: Der Griff wurde gedreht auf: 0
      

      Gruß

      Rainer

      1 Reply Last reply Reply Quote 0
      • Dutchman
        Dutchman Developer Most Active Administrators last edited by

        Hi Rainer, mach Mal bitten nen Export von deinem blockly dab ergänze ich heut Abend was ich meine 😉

        –-----------------------

        Send from mobile device

        1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators last edited by

          @Dutchman:

          Hi Rainer, mach Mal bitten nen Export von deinem blockly dab ergänze ich heut Abend was ich meine 😉 `
          Danke!

          hier der funktionierende:

          ! ````
          <xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="VaA}S%5yG1Y:ZCy!+e=f" x="62" y="63"><field name="COMMENT">Fenstergriff wird bewegt</field>
          <next><block type="on_ext" id="b0oUEVIPY^7n2J{:jGzv"><mutation items="1"></mutation>
          <field name="CONDITION">ne</field>

              <value name="OID0"><shadow type="field_oid" id="L=]SEg~Eq^%qaI3t9cAt"><field name="oid">hm-rpc.0.JRT0001572.1.STATE</field></shadow></value> 
              <statement name="STATEMENT"><block type="debug" id="-4E].=xLH|Ka4fjFFGo3"><field name="Severity">log</field>
                  <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                    <block type="text_join" id="}?ypT,7t:V_gOzQ?3DAY"><mutation items="2"></mutation>
                      <value name="ADD0"><block type="text" id="k!7Ahs{RAYH0[K4+}-Xg"><field name="TEXT">Der Griff wurde gedreht auf:</field></block></value> 
                      <value name="ADD1"><block type="get_value" id="g,[rBk*E/Ogb+;M+NBi:"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                  <next><block type="comment" id="LuWSFd+2YG}T[C?!NV4|"><field name="COMMENT">Fenster schräg/offen und Außentemp. unter 12°C</field>
                      <next><block type="controls_if" id=":Uy8U;2_w:Nw}D/V}x:|"><value name="IF0"><block type="logic_operation" id="AApv6^E6=4OnAtm~6-rK"><field name="OP">AND</field>
                              <value name="A"><block type="logic_compare" id="|]^Co:i=g4ZJ|yt2;K`@"><field name="OP">LT</field>
                                  <value name="A"><block type="get_value" id="WR{Q#PAc.U3nO6Bz,y.e"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JEQ0140901.1.TEMPERATURE</field></block></value> 
                                  <value name="B"><block type="math_number" id="B4T]wEPmfx./#+(45}QN"><field name="NUM">12</field></block></value></block></value> 
                              <value name="B"><block type="logic_compare" id="(L)mf-JN69X(kQX4T7-k"><field name="OP">NEQ</field>
                                  <value name="A"><block type="get_value" id="A2):}!@4x}l+`1|A6=C|"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value> 
                                  <value name="B"><block type="text" id="VO@8h=*k-IJ[co57V((@"><field name="TEXT">0</field></block></value></block></value></block></value> 
                          <statement name="DO0"><block type="debug" id="do;w%b1aI!1s_s/h4K8]"><field name="Severity">log</field>
                              <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                <block type="text_join" id="!/2UirNXK_K3s^jwP+~u"><mutation items="2"></mutation>
                                  <value name="ADD0"><block type="text" id="gzeWN1Zo](9EFV{;F0mt"><field name="TEXT">2: Der Griff wurde gedreht auf:</field></block></value> 
                                  <value name="ADD1"><block type="get_value" id="*S(.gq:4LwT=([a`X![%"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                              <next><block type="comment" id="Fs[D|T49G]cW9|ri^I;r"><field name="COMMENT">nach 10 MInuten -> Alarm!</field>
                                  <next><block type="timeouts_settimeout" id="u8mS(SqqVLKKQ`XWTIJM"><field name="NAME">timeout</field>
                                      <field name="DELAY">10</field>
                                      <field name="UNIT">min</field>
                                      <statement name="STATEMENT"><block type="debug" id="(dd?AHh=CGJWq4K-4*B1"><field name="Severity">log</field>
                                          <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                            <block type="text_join" id="[Qtm^]gpDLr(q6ULdLZs"><mutation items="2"></mutation>
                                              <value name="ADD0"><block type="text" id="#kgX[S^Zv,Ib+t6{M2iF"><field name="TEXT">3\. Der Griff ist noch immer auf:</field></block></value> 
                                              <value name="ADD1"><block type="get_value" id="@,lb5MV`#=H-3~88r?Yg"><field name="ATTR">val</field>
                                                  <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                                          <next><block type="sayit" id="~I)N%Ua!0~w0Up(Y8tjP"><field name="INSTANCE">.0</field>
          
                                              <value name="VOLUME"><block type="math_number" id="Hl^JCN#Pn/NKPN4iUlEa"><field name="NUM">50</field></block></value> 
                                              <value name="MESSAGE"><shadow type="text" id="AVIi#6:m2j;;#jXzX.bS"><field name="TEXT">Badfenster Schließen</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></statement></block></next></block></xml> 
          
          
          und hier der mit dem falschen Schleife:
          
          >! ````
           <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="b0oUEVIPY^7n2J{:jGzv" x="38" y="88"><mutation items="1"></mutation>
              <field name="CONDITION">ne</field>
          
              <value name="OID0"><shadow type="field_oid" id="L=]SEg~Eq^%qaI3t9cAt"><field name="oid">hm-rpc.0.JRT0001572.1.STATE</field></shadow></value> 
              <statement name="STATEMENT"><block type="debug" id="-4E].=xLH|Ka4fjFFGo3"><field name="Severity">log</field>
                  <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                    <block type="text_join" id="}?ypT,7t:V_gOzQ?3DAY"><mutation items="2"></mutation>
                      <value name="ADD0"><block type="text" id="k!7Ahs{RAYH0[K4+}-Xg"><field name="TEXT">Der Griff wurde gedreht auf:</field></block></value> 
                      <value name="ADD1"><block type="get_value" id="g,[rBk*E/Ogb+;M+NBi:"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                  <next><block type="controls_repeat_ext" id="`OUP*L}*FNP!4bwXtx/M"><value name="TIMES"><shadow type="math_number" id="p(hzxDrXI%9mX,?(RW+:"><field name="NUM">10</field></shadow></value> 
                      <statement name="DO"><block type="controls_if" id=":Uy8U;2_w:Nw}D/V}x:|"><value name="IF0"><block type="logic_operation" id="AApv6^E6=4OnAtm~6-rK"><field name="OP">AND</field>
                              <value name="A"><block type="logic_compare" id="|]^Co:i=g4ZJ|yt2;K`@"><field name="OP">LT</field>
                                  <value name="A"><block type="get_value" id="WR{Q#PAc.U3nO6Bz,y.e"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JEQ0140901.1.TEMPERATURE</field></block></value> 
                                  <value name="B"><block type="math_number" id="B4T]wEPmfx./#+(45}QN"><field name="NUM">12</field></block></value></block></value> 
                              <value name="B"><block type="logic_compare" id="(L)mf-JN69X(kQX4T7-k"><field name="OP">NEQ</field>
                                  <value name="A"><block type="get_value" id="A2):}!@4x}l+`1|A6=C|"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value> 
                                  <value name="B"><block type="text" id="VO@8h=*k-IJ[co57V((@"><field name="TEXT">0</field></block></value></block></value></block></value> 
                          <statement name="DO0"><block type="debug" id="do;w%b1aI!1s_s/h4K8]"><field name="Severity">log</field>
                              <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                <block type="text_join" id="!/2UirNXK_K3s^jwP+~u"><mutation items="2"></mutation>
                                  <value name="ADD0"><block type="text" id="gzeWN1Zo](9EFV{;F0mt"><field name="TEXT">2: Der Griff wurde gedreht auf:</field></block></value> 
                                  <value name="ADD1"><block type="get_value" id="*S(.gq:4LwT=([a`X![%"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                              <next><block type="timeouts_settimeout" id="u8mS(SqqVLKKQ`XWTIJM"><field name="NAME">timeout</field>
                                  <field name="DELAY">2</field>
                                  <field name="UNIT">min</field>
                                  <statement name="STATEMENT"><block type="debug" id="(dd?AHh=CGJWq4K-4*B1"><field name="Severity">log</field>
                                      <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                        <block type="text_join" id="[Qtm^]gpDLr(q6ULdLZs"><mutation items="2"></mutation>
                                          <value name="ADD0"><block type="text" id="#kgX[S^Zv,Ib+t6{M2iF"><field name="TEXT">3\. Der Griff ist noch immer auf:</field></block></value> 
                                          <value name="ADD1"><block type="get_value" id="@,lb5MV`#=H-3~88r?Yg"><field name="ATTR">val</field>
                                              <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                                      <next><block type="sayit" id="~I)N%Ua!0~w0Up(Y8tjP"><field name="INSTANCE">.0</field>
          
                                          <value name="VOLUME"><block type="math_number" id="Hl^JCN#Pn/NKPN4iUlEa"><field name="NUM">50</field></block></value> 
                                          <value name="MESSAGE"><shadow type="text" id="AVIi#6:m2j;;#jXzX.bS"><field name="TEXT">Badfenster Schließen</field></shadow></value></block></next></block></statement></block></next></block></statement> 
                          <next><block type="controls_if" id="nI1KrjER^rF3UDl*p)Yg"><value name="IF0"><block type="logic_compare" id="5UG{M8O)oVQ:^:@HqSq]"><field name="OP">EQ</field>
                                  <value name="A"><block type="get_value" id="x@A1H1f#=.#PH50E5QdZ"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value> 
                                  <value name="B"><block type="text" id="rdx4N)|;!+3A]I#?.UVj"><field name="TEXT">0</field></block></value></block></value> 
                              <statement name="DO0"><block type="controls_flow_statements" id="Q^V@!P.OHCd^u/s%8:^f"><field name="FLOW">BREAK</field></block></statement></block></next></block></statement></block></next></block></statement></block></xml> 
          

          Danke

          Rainer

          1 Reply Last reply Reply Quote 0
          • Dutchman
            Dutchman Developer Most Active Administrators last edited by

            @Homoran:

            Das mit dem Stop musst du mir bitte mal zeigen, wenn du Zeit hast. `

            So meinte ich das :):

            979_clear.jpg

            ! ````
            <xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="VaA}S%5yG1Y:ZCy!+e=f" x="62" y="63"><field name="COMMENT">Fenstergriff wird bewegt</field>
            <next><block type="on_ext" id="b0oUEVIPY^7n2J{:jGzv"><mutation items="1"></mutation>
            <field name="CONDITION">ne</field>

                <value name="OID0"><shadow type="field_oid" id="L=]SEg~Eq^%qaI3t9cAt"><field name="oid">hm-rpc.0.JRT0001572.1.STATE</field></shadow></value> 
                <statement name="STATEMENT"><block type="debug" id="-4E].=xLH|Ka4fjFFGo3"><field name="Severity">log</field>
                    <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                      <block type="text_join" id="}?ypT,7t:V_gOzQ?3DAY"><mutation items="2"></mutation>
                        <value name="ADD0"><block type="text" id="k!7Ahs{RAYH0[K4+}-Xg"><field name="TEXT">Der Griff wurde gedreht auf:</field></block></value> 
                        <value name="ADD1"><block type="get_value" id="g,[rBk*E/Ogb+;M+NBi:"><field name="ATTR">val</field>
                            <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                    <next><block type="comment" id="LuWSFd+2YG}T[C?!NV4|"><field name="COMMENT">Fenster schräg/offen und Außentemp. unter 12°C</field>
                        <next><block type="controls_if" id=":Uy8U;2_w:Nw}D/V}x:|"><value name="IF0"><block type="logic_operation" id="AApv6^E6=4OnAtm~6-rK"><field name="OP">AND</field>
                                <value name="A"><block type="logic_compare" id="|]^Co:i=g4ZJ|yt2;K`@"><field name="OP">LT</field>
                                    <value name="A"><block type="get_value" id="WR{Q#PAc.U3nO6Bz,y.e"><field name="ATTR">val</field>
                                        <field name="OID">hm-rpc.0.JEQ0140901.1.TEMPERATURE</field></block></value> 
                                    <value name="B"><block type="math_number" id="B4T]wEPmfx./#+(45}QN"><field name="NUM">12</field></block></value></block></value> 
                                <value name="B"><block type="logic_compare" id="(L)mf-JN69X(kQX4T7-k"><field name="OP">NEQ</field>
                                    <value name="A"><block type="get_value" id="A2):}!@4x}l+`1|A6=C|"><field name="ATTR">val</field>
                                        <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value> 
                                    <value name="B"><block type="text" id="VO@8h=*k-IJ[co57V((@"><field name="TEXT">0</field></block></value></block></value></block></value> 
                            <statement name="DO0"><block type="timeouts_cleartimeout" id="uCd[{|[?!|hw7MeXU!7s"><field name="NAME">timeout</field>
                                <next><block type="debug" id="do;w%b1aI!1s_s/h4K8]"><field name="Severity">log</field>
                                    <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                      <block type="text_join" id="!/2UirNXK_K3s^jwP+~u"><mutation items="2"></mutation>
                                        <value name="ADD0"><block type="text" id="gzeWN1Zo](9EFV{;F0mt"><field name="TEXT">2: Der Griff wurde gedreht auf:</field></block></value> 
                                        <value name="ADD1"><block type="get_value" id="*S(.gq:4LwT=([a`X![%"><field name="ATTR">val</field>
                                            <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                                    <next><block type="comment" id="Fs[D|T49G]cW9|ri^I;r"><field name="COMMENT">nach 10 MInuten -> Alarm!</field>
                                        <next><block type="timeouts_settimeout" id="u8mS(SqqVLKKQ`XWTIJM"><field name="NAME">timeout</field>
                                            <field name="DELAY">10</field>
                                            <field name="UNIT">min</field>
                                            <statement name="STATEMENT"><block type="debug" id="(dd?AHh=CGJWq4K-4*B1"><field name="Severity">log</field>
                                                <value name="TEXT"><shadow type="text" id="iWa-_2SgL3n_Cy#zCt.7"><field name="TEXT">Griff umgelegt</field></shadow> 
                                                  <block type="text_join" id="[Qtm^]gpDLr(q6ULdLZs"><mutation items="2"></mutation>
                                                    <value name="ADD0"><block type="text" id="#kgX[S^Zv,Ib+t6{M2iF"><field name="TEXT">3\. Der Griff ist noch immer auf:</field></block></value> 
                                                    <value name="ADD1"><block type="get_value" id="@,lb5MV`#=H-3~88r?Yg"><field name="ATTR">val</field>
                                                        <field name="OID">hm-rpc.0.JRT0001572.1.STATE</field></block></value></block></value> 
                                                <next><block type="sayit" id="~I)N%Ua!0~w0Up(Y8tjP"><field name="INSTANCE">.0</field>
            
                                                    <value name="VOLUME"><block type="math_number" id="Hl^JCN#Pn/NKPN4iUlEa"><field name="NUM">50</field></block></value> 
                                                    <value name="MESSAGE"><shadow type="text" id="AVIi#6:m2j;;#jXzX.bS"><field name="TEXT">Badfenster Schließen</field></shadow></value></block></next></block></statement></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block></next></block></xml> 
            

            ! ````

            ~Dutch

            1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators last edited by

              Danke!

              ich habe inzwischen dies hier gemacht:
              filename="Blockly_Badfenster06.jpg" index="0">~~

              Mal sehen, was besser klappt 😉

              Du stoppst den Timeout, bevor du den nächsten setzst. - gut wenn noch einer irrtümlich läuft

              In meiner Version habe ich jetzt eine repeat drin, das ich beende, wenn das Fenster zu ist.

              Evtl müsste ich das auch nochmal stoppen, wenn das Fenster als zu erkannt wird und der repeat aus einem Grund nicht abgebrochen wurde.

              Mal denken!

              Gruß

              Rainer

              1 Reply Last reply Reply Quote 0
              • Dutchman
                Dutchman Developer Most Active Administrators last edited by

                @Homoran:

                In meiner Version habe ich jetzt eine repeat drin, das ich beende, wenn das Fenster zu ist. `

                DIe koenntest doch beimm schliesen den laufenden tier beenden und dan kommt keine nachricht ?

                1 Reply Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators last edited by

                  Hab ich noch nicht getestet.

                  Ich musste WAFtechnisch die Tests abbrechen :lol:

                  Gruß

                  Rainer

                  Sorry ich hab das Blockly ja gar nicht gepostet.

                  Hier:
                  144_screenshot_20171216-213152.jpg

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

                    Ich würde da noch um ein "falls Drehgriff Status = 0" einsetzten und darin das Stop einbauen.

                    Wenn das Fenster zu ist, soll doch auch die Warnung aufhören, oder?

                    Da wo Du den Stop jetzt hingesetzt hast, macht es keinen Sinn.

                    Grüße

                    1 Reply Last reply Reply Quote 0
                    • R
                      RappiRN Most Active last edited by

                      Ich habe das so gelöst:

                      2216_bad.jpg

                      Noch mit einer zweiten Ansage! 😄

                      Enrico

                      1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators last edited by

                        @rantanplan:

                        Da wo Du den Stop jetzt hingesetzt hast, macht es keinen Sinn. `
                        Du hast ja recht!

                        Das sollte ein SONST werden. :oops: :oops:
                        144_20171217_093402.png

                        Gruß Rainer

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        825
                        Online

                        31.9k
                        Users

                        80.2k
                        Topics

                        1.3m
                        Posts

                        4
                        17
                        1282
                        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