Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Blockly für komplizierte Bedingung (Anfänger) (gelöst)

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Blockly für komplizierte Bedingung (Anfänger) (gelöst)

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

      @mahott1980 sagte in Blockly für komplizierte Bedingung (Anfänger):

      Ich habe gerade oben rechts den Debug beim Schraubenschlüssel aktiviert. (ist das gemeint??)

      nein!

      unter System gibt es einen debug Baustein.
      mit sinnvollem Text und an den richtigen Stellen hilft er zu zeigen wo und warum es klemmt.


      Code bitte in code-tags und das Blockly zusätzlich als Screenshot.
      Am Handy nutzt das xml nichts.

      MaHott1980 1 Reply Last reply Reply Quote 0
      • MaHott1980
        MaHott1980 @Homoran last edited by

        @homoran ```
        <block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="qc%grAk|^t[Uqj-9C3?d" x="512" y="138">
        <field name="SCHEDULE">0 4 * * *</field>
        <statement name="STATEMENT">
        <block type="debug" id=".wliB=0HU7pT0!1xnE-_">
        <field name="Severity">log</field>
        <value name="TEXT">
        <shadow type="text" id="S9Vz_O$)?}cHu[WRoM)}">
        <field name="TEXT">test2</field>
        </shadow>
        </value>
        <next>
        <block type="variables_set" id="/WF-8D#Q$EgUSjCH-],2">
        <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
        <value name="VALUE">
        <block type="logic_boolean" id="cfWO4h,I%D%ma2S~u8mp">
        <field name="BOOL">FALSE</field>
        </block>
        </value>
        </block>
        </next>
        </block>
        </statement>
        </block>

        MaHott1980 1 Reply Last reply Reply Quote 0
        • MaHott1980
          MaHott1980 @MaHott1980 last edited by

          @mahott1980 ```
          <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="eEyVHWnQ}Z}cpRx-0.Y^" x="138" y="-288">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation>
          <field name="CONDITION">any</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
          <shadow type="field_oid" id=",Y,{Q|B}e?PxnX?ecNqI">
          <field name="oid">hm-rpc.0.IEQ0090247.1.STATE</field>
          </shadow>
          </value>
          <value name="OID1">
          <shadow type="field_oid" id="9zybvEs@h6CKG6|8yg3d">
          <field name="oid">hm-rpc.0.IEQ0523289.1.STATE</field>
          </shadow>
          </value>
          <value name="OID2">
          <shadow type="field_oid" id="~_,CkTU6ia5aB}bYI4co">
          <field name="oid">hm-rpc.0.IEQ0523298.1.STATE</field>
          </shadow>
          </value>
          <value name="OID3">
          <shadow type="field_oid" id="Wc;!]SW2ejzJ|Z+Dpc@"> <field name="oid">hm-rpc.0.IEQ0523303.1.STATE</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="yZos~Z3L=*$dz0t.rZHo"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="w-whnICxoOKR2%vrKoB~" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="[0:ogLWg/pN!d9Azq~{" inline="false">
          <field name="OP">AND</field>
          <value name="A">
          <block type="logic_operation" id="[}WJD[__J+^].|ElF(r5" inline="false">
          <field name="OP">AND</field>
          <value name="A">
          <block type="get_value" id="M%SQIZzKZIn{!Yqc.Sm"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.IEQ0090247.1.STATE</field> </block> </value> <value name="B"> <block type="get_value" id="pRY*In!5D^gsg!jl{6k7"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.IEQ0523289.1.STATE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="7ImAaTbV=MjXrSvPbpXH" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="get_value" id="(N%F^c#QO5Au6i[c1NzV"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.IEQ0523298.1.STATE</field> </block> </value> <value name="B"> <block type="get_value" id="XwbC]DB*T0G#[-ln+7H">
          <field name="ATTR">val</field>
          <field name="OID">hm-rpc.0.IEQ0523303.1.STATE</field>
          </block>
          </value>
          </block>
          </value>
          </block>
          </value>
          <value name="B">
          <block type="logic_negate" id="9R$ITMunsx8R;2~*c~zw">
          <value name="BOOL">
          <block type="variables_get" id="Fz`cMWR,JmYeVI%G@SsA">
          <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
          </block>
          </value>
          </block>
          </value>
          </block>
          </value>
          <statement name="DO0">
          <block type="timeouts_settimeout" id="~oqtL(;ne1#.6yP1wjWA">
          <field name="NAME">timeout</field>
          <field name="DELAY">10</field>
          <field name="UNIT">min</field>
          <statement name="STATEMENT">
          <block type="control" id="]MkGYm#]Q5%HhTp04d?4">
          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
          <field name="OID">sonoff.0.Steckdose3.POWER</field>
          <field name="WITH_DELAY">FALSE</field>
          <value name="VALUE">
          <block type="logic_boolean" id="YSHyA:rGWzEz=0?1~w0+">
          <field name="BOOL">TRUE</field>
          </block>
          </value>
          <next>
          <block type="variables_set" id="|9G;KFzvZ[cW,jKx1wQJ">
          <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
          <value name="VALUE">
          <block type="logic_boolean" id="^?k43,OFse)2m:Au(B(^">
          <field name="BOOL">TRUE</field>
          </block>
          </value>
          </block>
          </next>
          </block>
          </statement>
          </block>
          </statement>
          <statement name="ELSE">
          <block type="debug" id="WQ#phFmV9?C38Qa[!FF$">
          <field name="Severity">log</field>
          <value name="TEXT">
          <shadow type="text" id="QcpPlY9|I1_B$j8W:]$Z">
          <field name="TEXT">test1</field>
          </shadow>
          </value>
          <next>
          <block type="timeouts_cleartimeout" id="Y%WMPojL:5W%)Tyv(mp:">
          <field name="NAME">timeout</field>
          </block>
          </next>
          </block>
          </statement>
          </block>
          </statement>
          </block>

          MaHott1980 1 Reply Last reply Reply Quote 0
          • MaHott1980
            MaHott1980 @MaHott1980 last edited by MaHott1980

            code_text
            
            <block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="qc%grAk|^t[Uqj-9C3?d" x="512" y="138">
              <field name="SCHEDULE">0 4 * * *</field>
              <statement name="STATEMENT">
                <block type="debug" id="=L-BX{3r.[VEQDc[wH:a">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="2-HNJmbNYiXS#CE_wD!5">
                      <field name="TEXT">test2</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="variables_set" id="/WF-8D#Q$EgUSjCH-],2">
                      <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="cfWO4h,I%D%ma2S~u8mp">
                          <field name="BOOL">FALSE</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
            
            MaHott1980 paul53 2 Replies Last reply Reply Quote 0
            • MaHott1980
              MaHott1980 @MaHott1980 last edited by MaHott1980

              code_text
              <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="eEyVHWnQ}Z}cpRx-0.Y^" x="138" y="-288">
                <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id=",Y,{Q|B}e?PxnX?ecNqI">
                    <field name="oid">hm-rpc.0.IEQ0090247.1.STATE</field>
                  </shadow>
                </value>
                <value name="OID1">
                  <shadow type="field_oid" id="9zybvEs@h6CKG6|8yg3d">
                    <field name="oid">hm-rpc.0.IEQ0523289.1.STATE</field>
                  </shadow>
                </value>
                <value name="OID2">
                  <shadow type="field_oid" id="~_,CkTU6ia5aB}bYI4co">
                    <field name="oid">hm-rpc.0.IEQ0523298.1.STATE</field>
                  </shadow>
                </value>
                <value name="OID3">
                  <shadow type="field_oid" id="Wc;!`]SW2ejzJ|Z+Dpc@">
                    <field name="oid">hm-rpc.0.IEQ0523303.1.STATE</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="yZos~Z3L=*$dz0t.rZHo">
                    <mutation else="1"></mutation>
                    <value name="IF0">
                      <block type="logic_operation" id="w-whnICxoOKR2%vrKoB~" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="logic_operation" id="[0:ogLWg/pN!d9A`zq~{" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_operation" id="[}WJD[__J+^].|ElF(r5" inline="false">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="get_value" id="M%`SQIZzKZIn{!Yqc.Sm">
                                    <field name="ATTR">val</field>
                                    <field name="OID">hm-rpc.0.IEQ0090247.1.STATE</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="get_value" id="pRY*In!5D^gsg!jl{6k7">
                                    <field name="ATTR">val</field>
                                    <field name="OID">hm-rpc.0.IEQ0523289.1.STATE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_operation" id="7ImAaTbV=MjXrSvPbpXH" inline="false">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="get_value" id="(N%F^c#QO5Au6i[c1NzV">
                                    <field name="ATTR">val</field>
                                    <field name="OID">hm-rpc.0.IEQ0523298.1.STATE</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="get_value" id="XwbC`]DB*T0G#[-ln+7H">
                                    <field name="ATTR">val</field>
                                    <field name="OID">hm-rpc.0.IEQ0523303.1.STATE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_negate" id="9R$ITMunsx8R;2~*c~zw">
                            <value name="BOOL">
                              <block type="variables_get" id="Fz`cMWR,JmYeVI%G@SsA">
                                <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="timeouts_settimeout" id="~oqtL(;ne1#.6yP1wjWA">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">10</field>
                        <field name="UNIT">min</field>
                        <statement name="STATEMENT">
                          <block type="control" id="]MkGYm#]Q5%HhTp04d?4">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">sonoff.0.Steckdose3.POWER</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="YSHyA:rGWzEz=0?1~w0+">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" id="|9G;KFzvZ[cW,jKx1wQJ">
                                <field name="VAR" id="Zw%u#sW?jv8%CiGB~ej3">Aktiviert</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="^?k43,OFse)2m:Au(B(^">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </statement>
                    <statement name="ELSE">
                      <block type="debug" id="Fiy:h@f,%|)40xF.C[Fg">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="zNi4cgKQmW78fqmg?0J#">
                            <field name="TEXT">test1</field>
                          </shadow>
                        </value>
                        <next>
                          <block type="timeouts_cleartimeout" id="Y%WMPojL:5W%)Tyv(mp:">
                            <field name="NAME">timeout</field>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
              
              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @MaHott1980 last edited by paul53

                @mahott1980
                Sind das etwa zwei verschiedene Skripte?
                Das Rücksetzen der Variablen Aktiviert muss im gleichen Skript erfolgen.

                Bild_2022-03-31_174441.png

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

                  @paul53

                  So also ohne die debug output??
                  592fca77-f7aa-4c22-b456-abdfb6f6c33e-grafik.png

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

                    @mahott1980 sagte: So also ohne die debug output??

                    Nein, Zeitplan außerhalb des Trigger-Blocks - so wie in meinen Bildern.

                    1 Reply Last reply Reply Quote 0
                    • MaHott1980
                      MaHott1980 @MaHott1980 last edited by

                      @mahott1980

                      Ja aber so geht es nicht, und ich bekomme es nicht raus warum.😥

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

                        @mahott1980 sagte: so geht es nicht, und ich bekomme es nicht raus warum

                        Ändere die Uhrzeit zum Test auf 20:xx Uhr (kurz nach der aktuellen Zeit) und schau, ob die Logausgabe mit "test2" erfolgt.

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

                          @paul53

                          20:16:53.567 info javascript.0 (1172) Start javascript script.js.Louis_Zimmer.Louis_PC
                          20:16:53.570 info javascript.0 (1172) script.js.Louis_Zimmer.Louis_PC: registered 1 subscription and 1 schedule
                          20:18:00.018 info javascript.0 (1172) script.js.Louis_Zimmer.Louis_PC: test2

                          Würde sagen das es geht, nur das Steckdose auschalten nicht. Die Bleibt an.

                          Es ist doch zum Testen egal ob ich die Steckdose von Hand wieder anschalte oder?? Den das Aktivieren geht ja.

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

                            @mahott1980 sagte: nur das Steckdose auschalten nicht. Die Bleibt an.

                            Ich war nach Deinem ersten Beitrag der Meinung, dass die Steckdose manuell ausgeschaltet wird und nur einmal täglich automatisch einschalten soll.

                            Soll sie um 4:00 Uhr automatisch ausgeschaltet werden? Dann

                            Bild_2022-03-31_203406.png

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

                              @paul53

                              Nein sie sollte immer wieder resettet werden sonst geht das bei Kindern in die Hose ; ))

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

                                @paul53

                                Super jetzt geht es. Beim 1 mal nicht aber da war der Debug Mode Schuld laut Log. Mega Dank an Dich/Euch.

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                864
                                Online

                                32.0k
                                Users

                                80.4k
                                Topics

                                1.3m
                                Posts

                                5
                                36
                                1505
                                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