Navigation

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

    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

    Aqara Temperatur Blockly Hilfe

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

      Hallo zusammen. Bin leider immer noch der blutige Anfänger und komme bei einem Script nicht so recht weiter. Vielleicht kann mir jemand helfen: Folgendes: Ich möchte eine Nachricht bekommen wenn die Luftfeuchtigkeit höher = 60 ist. Falls das in 10 Min immer noch ist wieder eine Nachricht usw. Wenn aber die Luftfeuchtigkeit kleiner gleich 59 bis 50 ist soll er mir EINE Nachricht schicken und dann erst wieder wenn höher gleich 60 und dann wieder wie oben beschrieben: Hier mal mein Blockly Script:

      Bildschirmfoto 2020-11-02 um 23.14.38.png

      Nach meinen Script würd er mir ja immer wieder ne Nachricht senden, wenn der träger sich geändert hat und das möchte ich vermeiden. Probleme hab ich mit Variablen und Timeouts bzw. Intervallen. Ich schätze auch mal das man keine zwei Träger benötigt. Vielleicht kann mir jemand helfen! Vielen Dank und bleibt gesund!!

      M 1 Reply Last reply Reply Quote 0
      • M
        MCU @netman1904 last edited by

        @netman1904 Als Beispiel anderer Ansatz:

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id="^TG=x?_:[GL:|P;Q24E-">Sendetext</variable>
            <variable id="KTX).ezAWOxW?{4JLOe4">zaehler</variable>
            <variable id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</variable>
          </variables>
          <block type="procedures_defnoreturn" id="GQISl:xJkwlzs|clMlhh" x="263" y="88">
            <mutation>
              <arg name="Sendetext" varid="^TG=x?_:[GL:|P;Q24E-"></arg>
            </mutation>
            <field name="NAME">Telegram_senden</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="telegram" id="IZ*FIrMY]H@p{tx(1^zx">
                <field name="INSTANCE"></field>
                <field name="LOG"></field>
                <field name="SILENT">FALSE</field>
                <field name="PARSEMODE">default</field>
                <value name="MESSAGE">
                  <shadow type="text" id=";)g*zRGfnoHA7``26dW;">
                    <field name="TEXT">text</field>
                  </shadow>
                  <block type="variables_get" id="sR$M,g6VWgrRKc1VZQ1z">
                    <field name="VAR" id="^TG=x?_:[GL:|P;Q24E-">Sendetext</field>
                  </block>
                </value>
              </block>
            </statement>
          </block>
          <block type="variables_set" id="E.L?[0jz*+v`!/buqCNE" x="262" y="338">
            <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
            <value name="VALUE">
              <block type="math_number" id="oeQP+]5qViygw;-.d09x">
                <field name="NUM">0</field>
              </block>
            </value>
            <next>
              <block type="schedule" id="Dko$rKQgtAsMwp3LRE=_">
                <field name="SCHEDULE">*/10 * * * *</field>
                <statement name="STATEMENT">
                  <block type="variables_set" id="5C8?0Tb3p.5x+mf}fZ1Z">
                    <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                    <value name="VALUE">
                      <block type="get_value_var" id="NzsD3H+=4FGZRVsIz9iu">
                        <field name="ATTR">val</field>
                        <value name="OID">
                          <shadow type="text" id="9QF-%zbreQD3K_QE.|Cp">
                            <field name="TEXT">Wohnzimmer Luftfechtigkeit</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="comment" id="*[)dS_5cYgvO^u/Np~OZ">
                        <field name="COMMENT">Prüfe alle 10 Minuten die Luftfeuchtigkeit</field>
                        <next>
                          <block type="controls_if" id="1{N,_6JApH5UVfqL)|,J">
                            <mutation elseif="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="^KFA3NMIcRhj#nmvt?xu">
                                <field name="OP">GTE</field>
                                <value name="A">
                                  <block type="variables_get" id=",Al3@-W$oH4x.zz-5UZu">
                                    <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="yv%=fI~iV4ebJVxwt;hJ">
                                    <field name="NUM">60</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="math_change" id="LC*f8I]|;1VmF[AlwdYU">
                                <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
                                <value name="DELTA">
                                  <shadow type="math_number" id="DNENL{1=}lal^KY_FHs_">
                                    <field name="NUM">1</field>
                                  </shadow>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="nnh:yWBkgNYZ]lJbJ|V$">
                                    <mutation name="Telegram_senden">
                                      <arg name="Sendetext"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="logic_ternary" id="ie1xi$pI6-*8a)Z,7n|G">
                                        <value name="IF">
                                          <block type="logic_compare" id="!k}f5eX:8-?LrM`e67(F">
                                            <field name="OP">GT</field>
                                            <value name="A">
                                              <block type="variables_get" id="o~klzuSSYecjxX%AdftO">
                                                <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="math_number" id="g6$eFYH2)ap#XUzccwF)">
                                                <field name="NUM">1</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="THEN">
                                          <block type="text_join" id="1w%H6hqX4{N8]f72_W:j">
                                            <mutation items="5"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="vj7yp5vz0MjocYK5V$La">
                                                <field name="TEXT">Luftfeuchtigkeit ist zu hoch:</field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="variables_get" id="M#jfP}-/I0hh#MtoH5uS">
                                                <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="+%#ZdL|^X{0R_!j2G^N8">
                                                <field name="TEXT"> %, schon </field>
                                              </block>
                                            </value>
                                            <value name="ADD3">
                                              <block type="variables_get" id="I;[4Y~uupJ#JjEC4hkMx">
                                                <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
                                              </block>
                                            </value>
                                            <value name="ADD4">
                                              <block type="text" id="eVO#][5myTp!R4$*_(@.">
                                                <field name="TEXT"> -mal festgestellt</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="ELSE">
                                          <block type="text_join" id=".gjg_=*;M~zGP/Y7JA%H">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="w.%!{;:!cgEy@u,QEIF~">
                                                <field name="TEXT">Luftfeuchtigkeit ist zu hoch:</field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="variables_get" id="QbHdvLAbMmCJ|HFh$jt4">
                                                <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="6T-jZ4ccd$O^w{scwxg!">
                                                <field name="TEXT"> %</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="controls_if" id="3(+pojWouI*FC[+R,OOw">
                                        <value name="IF0">
                                          <block type="logic_compare" id="]p[wqDy=,)=6S}XCka=^">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="variables_get" id="3-dV5jW_xJ*Qb.IRI+_^">
                                                <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="math_number" id="/].4XZ0IQ!+QQ;;A~OJ=">
                                                <field name="NUM">1</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="comment" id="5RLru=ex#?7RY7Q$W-eT">
                                            <field name="COMMENT">Speak-Ansage Alexa</field>
                                            <next>
                                              <block type="control" id="+K9^nh~nN2IBe1m3GQOn">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">Object ID</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <value name="IF1">
                              <block type="logic_operation" id="gpiU27.3GwS%)s{{4:iM">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="logic_compare" id="8otP9DwhYNxs,8LnWk3B">
                                    <field name="OP">GTE</field>
                                    <value name="A">
                                      <block type="variables_get" id="0K3Dtkf]3k@Y9L}KnM-G">
                                        <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="C[UC2d3u{RUU=JjC@%k9">
                                        <field name="NUM">50</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_compare" id="7+_{|FF+*QH#+pZ)X|HJ">
                                    <field name="OP">LT</field>
                                    <value name="A">
                                      <block type="variables_get" id="Yc~YK-^YaT=$fEsx0zL;">
                                        <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="TqGli_Zoy~Ekejr1xj(!">
                                        <field name="NUM">60</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO1">
                              <block type="variables_set" id="|zZc=h$2bAxfiG2T^zJP">
                                <field name="VAR" id="KTX).ezAWOxW?{4JLOe4">zaehler</field>
                                <value name="VALUE">
                                  <block type="math_number" id="0Ii3P71^h*!A0j?jPAt5">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="4Q7;fi2^b;XAhRpP^$V/">
                                    <mutation name="Telegram_senden">
                                      <arg name="Sendetext"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="5Gl3NUQH[.SAYnE)l(Gl">
                                        <mutation items="3"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="!_t;RIX*[WJl)!.Y[LCW">
                                            <field name="TEXT">Luftfeuchtigkeit ist normal:</field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="variables_get" id="Lo~~||@?U492MF_TSs`s">
                                            <field name="VAR" id="QoNPX=7$sg,^~*bs3M}S">WZ_Feuchtigkeit</field>
                                          </block>
                                        </value>
                                        <value name="ADD2">
                                          <block type="text" id="UV|dO=Smx~z3?6%@JeK2">
                                            <field name="TEXT"> %</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        

        e3484010-8f11-445d-8a82-98d549a9f1b4-image.png

        a5f912a3-fe03-4261-8867-90af6aca0734-image.png

        1 Reply Last reply Reply Quote 0
        • N
          netman1904 last edited by

          Vielen Dank für deinen Lösungsansatz @MCU. Ich werde mir die Logik mal anschauen und versuchen zu verstehen für weitere Projekte. 🙂 Aber so wie das aussieht ist das schon ziemlich gut gelöst. Danke.

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

          Support us

          ioBroker
          Community Adapters
          Donate

          913
          Online

          31.9k
          Users

          80.2k
          Topics

          1.3m
          Posts

          2
          3
          360
          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