Navigation

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

    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

    frage zu mein Blockly

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

      Hi

      vielleicht kann mir einer helfen.
      ich hab ein blockly das wenn Bewegung im Flur ist an geht es geht aber nur an wenn Sonnenuntergang ist. nun sieht es wie folgt aus
      ich bin im Flur Bewegung wurde erkannt licht bleibt AUS weil noch kein Sonnenuntergang ist... ich bleibe im flur, sonne geht unter Bewegung ist immer
      noch da aber licht bleibt AUS es geht erst an wenn die Bewegung weg ist, und die Bewegung wieder da ist. das heißt ich steh im Dunkeln
      bin ich erst wieder aus denn Flur raus gehe und wieder rein gehen. das ist bissel doof 🙂

      es wer super wenn das licht an geht sobald Sonnenuntergang ist und ich immer noch im Flur bin. gibt's da eine Möglichkeit?

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout2">timeout2</variable>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="s7.5}_Kt/F_a~E/F/ze#" x="-612" y="-1196">
          <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="rX7{j^?p[!~kY=#`gU=r">
              <field name="oid">0_userdata.0.BW.bw</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="x8-V1;h.$|UTf#IVyX_G">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_multi_and" id="V4:STG939.~zyTjpb+k%">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                  <value name="AND0">
                    <block type="logic_compare" id="3qYjof`|hO2(?Q@m$HOA">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="get_value" id="^ykf*cSPM~+!7~HJ#QXv">
                          <field name="ATTR">val</field>
                          <field name="OID">0_userdata.0.Astrozeit.sonnenuntergang</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="CEXh)64VoPc#B74fI2:p">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="AND1">
                    <block type="time_compare" id="xF]1P)9QM`WBDJPqaJ~d">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                      <field name="OPTION">between</field>
                      <field name="START_TIME">06:00</field>
                      <field name="END_TIME">23:00</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="controls_if" id="Y9X|Hi[;C*qBc)~`=Z2q">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="on_source" id="4YCv-X+Rsh0ZlpYB/{IQ">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="timeouts_cleartimeout" id="HiT;S4{1h^NsxsypZrME">
                      <field name="NAME">timeout</field>
                      <next>
                        <block type="control" id="~s1:E)69]c3Oa=2g3PsV">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.brightness</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="math_number" id="qxdf~BOZ]jQM3[f3L^8k">
                              <field name="NUM">90</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="h8Tzsn,hVwYCi~|p?9^0">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.brightness</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="math_number" id="vr8{b1b;?1:p-Jp,^%MP">
                                  <field name="NUM">40</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="control" id="(PnY+^T`mVo=NFLJ*nd}">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.brightness</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="math_number" id="x55WXVeYdZSj$urFnD`g">
                          <field name="NUM">20</field>
                        </block>
                      </value>
                      <next>
                        <block type="control" id="_,voIf%V/Q*D=,fhIVXy">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.brightness</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="math_number" id="SFfm[Xl/]6R1t_-PPEEY">
                              <field name="NUM">10</field>
                            </block>
                          </value>
                          <next>
                            <block type="timeouts_settimeout" id="]v5~Jk!Yd@4z94Mp0^Q+">
                              <field name="NAME">timeout</field>
                              <field name="DELAY">30</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                                <block type="control" id="z{W$8}4S6Bd+Dh@~CjDj">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.state</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="y5WCEs4!j1Mt7QfRR1zj">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="l:/]OKE^$ps2}0_kx=pe">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.state</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="pmJu6yP`b%J,Sj||s^Mc">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_multi_and" id=".tF).hmpRxqvk.he=JC/">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                  <value name="AND0">
                    <block type="logic_compare" id="Z(0SM)*gOrq%i+}0Z1iS">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="get_value" id="We}WH}eqX3]IJq[[gt|@">
                          <field name="ATTR">val</field>
                          <field name="OID">0_userdata.0.Astrozeit.sonnenuntergang</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id=":xT}Pk*sU5]^J%+KEq^Y">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="AND1">
                    <block type="time_compare" id="7H=XXDgTLxJA__p/z`qO">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                      <field name="OPTION">between</field>
                      <field name="START_TIME">23:00</field>
                      <field name="END_TIME">06:00</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="controls_if" id="h8==48949xU?tP9v~_VP">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="on_source" id="T(`y]J,J0eM2b031n%80">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="timeouts_cleartimeout" id="aY4l93lLmq5v%ZjXLAM+">
                      <field name="NAME">timeout2</field>
                      <next>
                        <block type="control" id="sb{sg*BdmF4?2u)Ey@-}">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.brightness</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="math_number" id="F9eEbAxmXN@pF/fkd17,">
                              <field name="NUM">50</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="O@Pc+l]!djA{.K~RxKKv">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.brightness</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="math_number" id="K55O(v]7z,TX8DosVQ_e">
                                  <field name="NUM">10</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="timeouts_settimeout" id="{BXj,:22Y2WaH@/zza=T">
                      <field name="NAME">timeout2</field>
                      <field name="DELAY">30</field>
                      <field name="UNIT">sec</field>
                      <statement name="STATEMENT">
                        <block type="control" id="DTr|cR_SX)pdLs}G{M):">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.state</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="VIp%=VH(7lr[43ev^:w[">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="/U[ji~w00k@VA[_p5I0O">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.state</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="?`l|~IDLENU#P1_}NNDr">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </statement>
          <next>
            <block type="astro" id="]XotPP{6*tJIldmkRZ=y">
              <field name="TYPE">sunrise</field>
              <field name="OFFSET">+30</field>
              <statement name="STATEMENT">
                <block type="control" id="UkhXKfBmH2l[5ngX,BB6">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                  <field name="OID">zigbee2mqtt.0.0x7cb03eaa00aeb7f4.state</field>
                  <field name="WITH_DELAY">TRUE</field>
                  <field name="DELAY_MS">3</field>
                  <field name="UNIT">sec</field>
                  <field name="CLEAR_RUNNING">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="YGSTEVEX~:33{I)kAV?T">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                  <next>
                    <block type="control" id="bi?QSq6Y{rTz,C)R!s$b">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                      <field name="OID">zigbee2mqtt.0.0x00158d00046e5c4e.state</field>
                      <field name="WITH_DELAY">TRUE</field>
                      <field name="DELAY_MS">3</field>
                      <field name="UNIT">sec</field>
                      <field name="CLEAR_RUNNING">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="[RknKkiVRAACQR0Mqed)">
                          <field name="BOOL">FALSE</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </next>
        </block>
      </xml>
      

      Unbenannt-1.png

      Danke für die Hilfe.

      Homoran paul53 2 Replies Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @D4vE last edited by

        @d4ve bitte das Blockly auch zeigen.
        https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1

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

          @homoran hab gemacht danke für die info

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

            @d4ve sagte: licht an geht sobald Sonnenuntergang ist und ich immer noch im Flur bin. gibt's da eine Möglichkeit?

            Triggere auf "Sonnenuntergang" und prüfe in diesem Trigger den BWM.
            Wie wird der Datenpunkt "sonnenuntergang" gebildet? Er muss die gesamte Nacht true sein.

            EDIT: Inklusive einiger Vereinfachungen:

            Blockly_temp.JPG

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

              @paul53

              hi Paul 🙂

              also jetzt blick ich garnix mehr was hat das mit denn (tag) auf sich? ich bau es mal nach und guck mal was passiert vielen dank ❤

              japp der datenpunkt sonnenuntergang ist true und sobald sonne auf geht false

              Homoran paul53 2 Replies Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @D4vE last edited by

                @d4ve sagte in frage zu mein Blockly:

                was hat das mit denn (tag) auf sich?

                das ist eine von dir zu erstellende Variable

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

                  @d4ve sagte: was hat das mit denn (tag) auf sich?

                  Die Variable tag ist true zwischen 6 und 23 Uhr. Die Variable wird an 3 Stellen im Skript geprüft.

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

                    @paul53

                    t.png

                    einmal kommt das und das licht geht nicht auf 90% hell da fehlt noch die 23:00 bis 06:00

                    also das licht geht auf 90% das andere licht auf 40% von 06:00 bis 23:00 nachg 23 uhr 40% und das andere 10%

                    javascript.0
                    	2024-09-09 22:33:01.855	warn	at process.processImmediate (node:internal/timers:483:21)
                    javascript.0
                    	2024-09-09 22:33:01.855	warn	at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/cjs/lib/adapter/adapter.js:5869:48)
                    javascript.0
                    	2024-09-09 22:33:01.855	warn	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:645:29)
                    javascript.0
                    	2024-09-09 22:33:01.855	warn	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1452:38)
                    javascript.0
                    	2024-09-09 22:33:01.854	warn	at Object.<anonymous> (script.js.common.TEST.test_flur:17:9)
                    javascript.0
                    	2024-09-09 22:33:01.854	warn	at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
                    javascript.0
                    	2024-09-09 22:33:01.854	warn	You are assigning a number to the state "zigbee2mqtt.0.0x00158d00046e5c4e.state" which expects a boolean. Please fix your code to use a boolean or change the state type to number. This warning might become an error in future versions.
                    javascript.0
                    	2024-09-09 22:33:01.854	warn	at process.processImmediate (node:internal/timers:483:21)
                    javascript.0
                    	2024-09-09 22:33:01.853	warn	at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/cjs/lib/adapter/adapter.js:5869:48)
                    javascript.0
                    	2024-09-09 22:33:01.853	warn	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:645:29)
                    javascript.0
                    	2024-09-09 22:33:01.853	warn	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1452:38)
                    javascript.0
                    	2024-09-09 22:33:01.853	warn	at Object.<anonymous> (script.js.common.TEST.test_flur:16:9)
                    javascript.0
                    	2024-09-09 22:33:01.853	warn	at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:2090:20)
                    javascript.0
                    	2024-09-09 22:33:01.852	warn	You are assigning a number to the state "zigbee2mqtt.0.0x7cb03eaa00aeb7f4.state" which expects a boolean. Please fix your code to use a boolean or change the state type to number. This warning might become an error in future versions.
                    

                    vielen dank für deine hilfe

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

                      @d4ve sagte: You are assigning a number to the state "zigbee2mqtt.0.0x7cb03eaa00aeb7f4.state" which expects a boolean.

                      Du hast die Brightness-DP gegen "Switch state" ausgetauscht, was natürlich nicht funktioniert.
                      Ich habe die Helligkeitswerte aus deinem ursprünglichen Skript übernommen.

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

                        @paul53 ach Paul ^^

                        was soll ich sagen ja du hast recht. bin nicht mehr der jüngste 🙂

                        ok nun geht es, ich warte nochmal 10 min und guck ob es nach 23 uhr 40/10% an geht 🙂 ich sag dir nochmal bescheid

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

                          @paul53

                          hab alles hinbekommen vielen danke noch.

                          1 Reply Last reply Reply Quote 0
                          • S
                            Samson @D4vE last edited by

                            @d4ve ...und deinem Post einen aussagefähigen Betreff geben. "frage zu meinem Blockly" verjagt Dir hilfsbereite Forummitglieder.

                            D4vE 1 Reply Last reply Reply Quote 0
                            • D4vE
                              D4vE @Samson last edited by

                              @samson auf jedenfall hilfreicher Beitrag von dir! danke hat uns allem viel gebracht.....

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                Samson @D4vE last edited by

                                @d4ve sagte in frage zu mein Blockly:

                                @samson auf jedenfall hilfreicher Beitrag von dir! danke hat uns allem viel gebracht.....

                                Ich wollte Dich lediglich auf die Forenregeln hinweisen. Wenn Du diese kennst und Dich daran hältst ist es DEIN Mehrwert, indem Du mehr Antworten auf Dein Problem bekommst.

                                Brauchst deshalb nicht gleich aggro werden. War nur ein gut gemeinter Tipp.

                                Bildschirmfoto 2024-10-12 um 12.31.06.png

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                774
                                Online

                                31.9k
                                Users

                                80.1k
                                Topics

                                1.3m
                                Posts

                                4
                                14
                                488
                                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