Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. (gelöst) mein erstes Blockly... korrekt?

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    (gelöst) mein erstes Blockly... korrekt?

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

      @Humidor
      Einfachere Variante mit nur einer Variablen msgHum:

      Blockly_temp.JPG

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

        @paul53
        Cool! Danke Jungs! das ist jetzt ein guter Code 👍

        dslraser Homoran 2 Replies Last reply Reply Quote 0
        • dslraser
          dslraser Forum Testing Most Active @Humidor last edited by

          @Humidor sagte in mein erstes Blockly... korrekt?:

          @paul53
          Cool! Danke Jungs! das ist jetzt ein guter Code 👍

          Du hattest jetzt auch von DEM, der es perfekt kann, Hilfe. Merke Dir den User Namen.😊 @paul53
          Weitere Fragen kommen bestimmt. Immer gut so kompetente Menschen im Forum zu haben.👍

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

            @Humidor sagte in mein erstes Blockly... korrekt?:

            Danke Jungs!

            Das ist alleine Pauls Verdienst!
            Ich habe mich da auch nur drangehängt um selber was von ihm zu lernen

            1 Reply Last reply Reply Quote 1
            • F
              fastfoot @paul53 last edited by

              @paul53 sagte in mein erstes Blockly... korrekt?:

              @Homoran sagte:

              mit dem WERT für den Timeout verwechselt hatte. Aber den kann man dann auch nicht auf diese Art abfragen.

              Das ist eine Konstante, die man nicht abfragen kann, außer man verwendet eine selbst erstellte Variable, deren Namen man im Timer eingeben kann, was allerdings nur bei Auswahl von "ms" funktioniert.

              Nicht ganz 🙂 so kann man feststellen, wann ein Timer triggern wird und damit auch alle anderen Zeiten. Startzeit ist, wann der Trigger gesetzt wurde, Ausführzeit wann er feuert.
              Triggerzeit.PNG

              <xml xmlns="https://developers.google.com/blockly/xml">
                <variables>
                  <variable type="timeout" id="timeout">timeout</variable>
                  <variable id="8qng8]/g6/DX%2f:8oG%">Refzeit</variable>
                  <variable type="timeout" id="timeout2">timeout2</variable>
                  <variable type="timeout" id="timeout3">timeout3</variable>
                  <variable id="y`kTh$dVrIpYC9ZqBb37">Startzeit</variable>
                  <variable id="[J?LK+klK~P!$a9J{s86">Ausfuehrzeit</variable>
                </variables>
                <block type="schedule" id="rwCoU3(up]bKF$@yP)3$" x="-88" y="-338">
                  <field name="SCHEDULE">46 19 * * *</field>
                  <statement name="STATEMENT">
                    <block type="comment" id="?IyrQ(*c/K[$;5F[^1tB">
                      <field name="COMMENT">ermittelt die Ref-zeit = Start der JS-Instanz</field>
                      <next>
                        <block type="timeouts_settimeout" id="%QB[ly.)pT*.LS?%?2@j">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">0</field>
                          <field name="UNIT">ms</field>
                          <statement name="STATEMENT">
                            <block type="variables_set" id="$;d!EQM%M]Fhjou;7CD5">
                              <field name="VAR" id="8qng8]/g6/DX%2f:8oG%">Refzeit</field>
                              <value name="VALUE">
                                <block type="convert_from_date" id="@j-H^`uPcXKiZs9cpveK">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">object</field>
                                  <value name="VALUE">
                                    <block type="math_arithmetic" id="EQu%gX)9i-]K7x,1(}h5" inline="false">
                                      <field name="OP">MINUS</field>
                                      <value name="A">
                                        <shadow type="math_number" id="8{rl~7y:ue^S@?~wEh};">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="time_get" id="Wy4kV2(tS#)jti^6/R_l">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                          <field name="OPTION">object</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="cPn#Of}iDB3_/=0[~=3|">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="get_attr" id="4$nwl]3?3Qp;rWT(Rb;+">
                                          <value name="PATH">
                                            <shadow type="text" id="4BNH[wc1k*/Vw#Cg1ajP">
                                              <field name="TEXT">_idleStart</field>
                                            </shadow>
                                          </value>
                                          <value name="OBJECT">
                                            <block type="variables_get" id="uG/5)zi)J:WjZE@j5=Na">
                                              <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </statement>
                          <next>
                            <block type="comment" id="3e5`hi2,`@qPF_Z4QIPJ">
                              <field name="COMMENT">zu ermittelnde Startzeit</field>
                              <next>
                                <block type="timeouts_settimeout" id="pOG2+Q?t%4Fh@%Rn%z8_">
                                  <field name="NAME">timeout2</field>
                                  <field name="DELAY">480</field>
                                  <field name="UNIT">min</field>
                                  <statement name="STATEMENT">
                                    <block type="debug" id="=h9u|YYvq)K!C-{=31~L">
                                      <field name="Severity">log</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="dv9!q`I#*GdN+n4sklNF">
                                          <field name="TEXT">test</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="comment" id="*Ugt@fMeeN{wFEL)I+1.">
                                      <field name="COMMENT">irgendwann im Programmablauf</field>
                                      <next>
                                        <block type="timeouts_settimeout" id="]+)B_?RaDVM;lWbsoWsO">
                                          <field name="NAME">timeout3</field>
                                          <field name="DELAY">100</field>
                                          <field name="UNIT">ms</field>
                                          <statement name="STATEMENT">
                                            <block type="variables_set" id="}vMVhT)SDXih:e3|;*j4">
                                              <field name="VAR" id="y`kTh$dVrIpYC9ZqBb37">Startzeit</field>
                                              <value name="VALUE">
                                                <block type="convert_from_date" id="|SGH|hdsIgy}o5|nJ~yh">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                  <field name="OPTION">object</field>
                                                  <value name="VALUE">
                                                    <block type="math_arithmetic" id="yrvA=(AzfU3ImovfV#F-">
                                                      <field name="OP">ADD</field>
                                                      <value name="A">
                                                        <shadow type="math_number" id="oW]NH*D~H0O/oVMzX:=w">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="variables_get" id="hN^qtBQOXml$a[vQ=$:q">
                                                          <field name="VAR" id="8qng8]/g6/DX%2f:8oG%">Refzeit</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <shadow type="math_number" id="Wit9Ue4ZZ;]-Y3]EC^%z">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="get_attr" id="22hz9S98GbMZFock[2u[">
                                                          <value name="PATH">
                                                            <shadow type="text" id="r;:rdF.@88a++T8#ejC6">
                                                              <field name="TEXT">_idleStart</field>
                                                            </shadow>
                                                          </value>
                                                          <value name="OBJECT">
                                                            <block type="variables_get" id="08%E-!?ofQjb++N}c;k.">
                                                              <field name="VAR" id="timeout2" variabletype="timeout">timeout2</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="variables_set" id="7dWFe,Q|]8i)@Huq[t2D">
                                                  <field name="VAR" id="[J?LK+klK~P!$a9J{s86">Ausfuehrzeit</field>
                                                  <value name="VALUE">
                                                    <block type="convert_from_date" id="n811.kKHk)OjOlU7NmV]">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                      <field name="OPTION">hh:mm:ss</field>
                                                      <value name="VALUE">
                                                        <block type="math_arithmetic" id="KA,G(tOh@Fiuj3`@ro~4">
                                                          <field name="OP">ADD</field>
                                                          <value name="A">
                                                            <shadow type="math_number">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id=",L`@1V)l*M}R#*D3Hq,V">
                                                              <field name="VAR" id="y`kTh$dVrIpYC9ZqBb37">Startzeit</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow type="math_number">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="get_attr" id="UykwG9#/!~kc#c*mBV1r">
                                                              <value name="PATH">
                                                                <shadow type="text" id="`2V`|^7VqTdxeY[FuSb_">
                                                                  <field name="TEXT">_idleTimeout</field>
                                                                </shadow>
                                                              </value>
                                                              <value name="OBJECT">
                                                                <block type="variables_get" id="M8Y0m!qFD?AK{#|wC4{/">
                                                                  <field name="VAR" id="timeout2" variabletype="timeout">timeout2</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="debug" id="QwlXbZ)4z%Fw?5E3E@8=" inline="true">
                                                      <field name="Severity">log</field>
                                                      <value name="TEXT">
                                                        <shadow type="text" id="Y$B`@:2G|gWF[rtKTA,i">
                                                          <field name="TEXT">test</field>
                                                        </shadow>
                                                        <block type="variables_get" id="jAsxX^%4^v@,KzcT=IEc">
                                                          <field name="VAR" id="[J?LK+klK~P!$a9J{s86">Ausfuehrzeit</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </xml>
              

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

                irgendwas stimmt noch nicht an der sofortigen Meldung per Telegram
                ich erhalte nur die stundenweisen per Zeitplan ?
                Bild Text

                ich habe diese Änderung gemacht, ist diese korrekt?
                Bild Text

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

                  @Humidor sagte:

                  ich habe diese Änderung gemacht

                  Weshalb ?

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

                    @Humidor sagte in mein erstes Blockly... korrekt?:

                    irgendwas stimmt noch nicht an der sofortigen Meldung per Telegram
                    ich erhalte nur die stundenweisen per Zeitplan ?

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

                      @Humidor
                      Das kann ich nicht nachvollziehen: Solange "Feuchte OK" ist, ist auch MessageSent falsch. Wird nun ein Grenzwert verletzt, wird einmalig gesendet, denn nach dem einmaligen Senden wird MassageSent wahr, solange bis wieder "Feuchte OK" ist. Dass trotz MessageSent falsch nicht bei "Feuchte OK" gesendet wird, verhindert der Leerstring bei der Abfrage falls Message in der Funktion.

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

                        Bin verwirrt, hab es wieder zurück korrigiert.
                        Eigentlich passt es ja, aber warum hab ich dann keine Meldung bei der direkten Änderung erhalten?
                        Muss das nochmal prüfen...

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        896
                        Online

                        32.0k
                        Users

                        80.4k
                        Topics

                        1.3m
                        Posts

                        blockly
                        6
                        59
                        2164
                        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