Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly: Retriggerbare Monoflop mit TimeOut (A)

    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: Retriggerbare Monoflop mit TimeOut (A)

    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      Ioniq-2018 last edited by Ioniq-2018

      Seit gestern bin ich beim Programmieren und komme absolut nicht weiter. Ich verstehe irgendwie die Logik nicht von Blockly oder mein Programm/PC hat doch eine Macke.
      Ich möchte 2 Zahlenwerte Anzeigen lassen. Als Beispiel: einen Zahlenwert (für mindestens 15 sec.) wenn die Wattzahl vom HS110 höher wie 220 W ist und einen anderen Wert wenn er drunter liegt. Wenn aber innerhalb der 15 sec. die Wattzahl ganz kurz wieder höher ist wie 220 W dann sollen die 15 sec. von neuem beginnen. Mit Zählern habe ich das schon mal gebaut, aber ich würde das gerne mal mit TIMEOUT verstehn.
      "Timeout in 15 sec" wird öfters auch in 5 sec durchlaufen.?

      mono.jpg

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="interval" id="Intervall">Intervall</variable>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="comment" id="^5?|70{fl~%^v-[{-k|7" x="-487" y="-187">
          <field name="COMMENT">retriggerbarer Monoflop </field>
          <next>
            <block type="update" id="~Ra#[Kx}_}:m:Gez6-7g">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
              <field name="OID">0_userdata.0.DP_Wallbox.DP_Wallbox_Laden</field>
              <field name="WITH_DELAY">FALSE</field>
              <value name="VALUE">
                <block type="math_number" id="hvu0e$07vgUijgi2$=3e">
                  <field name="NUM">40</field>
                </block>
              </value>
              <next>
                <block type="timeouts_setinterval" id="kn:(:z/YV@]6wBDB!7e(">
                  <field name="NAME">Intervall</field>
                  <field name="INTERVAL">5</field>
                  <field name="UNIT">sec</field>
                  <statement name="STATEMENT">
                    <block type="debug" id=")c@EDf2z105/C3+QC_)(">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="]KhJHSrGl%J~3}(/*9({">
                          <field name="TEXT">test</field>
                        </shadow>
                        <block type="get_value" id="2?1?bX6zf!}$HnOE8nJc">
                          <field name="ATTR">val</field>
                          <field name="OID">hs100.0.192_168_178_19.power</field>
                        </block>
                      </value>
                      <next>
                        <block type="controls_if" id="3/h=@eQ;9xhK^Swe?*Ts">
                          <mutation else="1"></mutation>
                          <value name="IF0">
                            <block type="logic_compare" id="HRs0Yp$)JmO4kJDx$?RK">
                              <field name="OP">LT</field>
                              <value name="A">
                                <block type="get_value" id="y9#]`fVZ=7X.VD.LTeqr">
                                  <field name="ATTR">val</field>
                                  <field name="OID">hs100.0.192_168_178_19.power</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="fAq^,b#jE8pj2|(u]S?|">
                                  <field name="NUM">180</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="debug" id="/3}R2V}RQHI]^-wK(%)$">
                              <field name="Severity">log</field>
                              <value name="TEXT">
                                <shadow type="text" id="Qd-}U-PPYB?,gE93gp@p">
                                  <field name="TEXT">mache</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="timeouts_settimeout" id="S08T!/a$2RR6|l?TQny?">
                                  <field name="NAME">timeout</field>
                                  <field name="DELAY">15</field>
                                  <field name="UNIT">sec</field>
                                  <statement name="STATEMENT">
                                    <block type="debug" id="MR`G$3uYEW82I;4}*YJF">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="G[)sB.#J9@rg~f/hQ(Pw">
                                          <field name="TEXT">timeout</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="update" id="u:#a{W26~oAKMyBKiKzW">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">0_userdata.0.DP_Wallbox.DP_Wallbox_Laden</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="math_number" id="!*yzjn{SWFWCt$KFqxLv">
                                              <field name="NUM">55</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="debug" id="}oV)U`L(CiZZ=gA]5=Zr">
                                              <field name="Severity">debug</field>
                                              <value name="TEXT">
                                                <shadow type="text">
                                                  <field name="TEXT">test</field>
                                                </shadow>
                                                <block type="get_value" id="S*O!ME}$ung!!5Xz:uvd">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">0_userdata.0.DP_Wallbox.DP_Wallbox_Laden</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="debug" id="-nbSwRw%rTQp9f_{Gtlf">
                                                  <field name="Severity">log</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="{6*;a2!boSloL`5+PE#o">
                                                      <field name="TEXT">timeout-Ende</field>
                                                    </shadow>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <statement name="ELSE">
                            <block type="timeouts_cleartimeout" id="lE8XDg:gF2Ta$.B#v$,A">
                              <field name="NAME">timeout</field>
                              <next>
                                <block type="update" id="zMUE^s~CyVM^?kWj}viV">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">0_userdata.0.DP_Wallbox.DP_Wallbox_Laden</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="math_number" id="t-@05L0G]{r/P,%AEzqh">
                                      <field name="NUM">222</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="debug" id="tp|DTV8=?bC(A$()[+=1">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="]h_|QM11Ry@54@6{4H9,">
                                          <field name="TEXT">nach timeout</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="debug" id="PoQefx*b2*7[%uC_G]Yk">
                                          <field name="Severity">log</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="=9Y@##CHqjw`{YwK4Wp{">
                                              <field name="TEXT">sonst</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </next>
        </block>
      </xml>
      

      Habe mir im Forum schon so einges angesehen und ausprobiert, aber keines habe ich auf meine Wünsche umbauen können. Kann mir da jemand helfen?

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @Ioniq-2018 last edited by

        @Ioniq-2018

        Blockly_temp.JPG

        I 1 Reply Last reply Reply Quote 0
        • I
          Ioniq-2018 @paul53 last edited by

          Dachte ich mir schon fast, dass es so eine Kleinigkeit ist. Ich hatte den STOP-Befehl schon im und unterhalb von TimeOut gehabt, ober oberhalb...
          Vielen Dank für die schnelle Hilfe. Da kann ich jetzt mit dem Programm weiter machen.

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

          Support us

          ioBroker
          Community Adapters
          Donate

          430
          Online

          31.8k
          Users

          80.0k
          Topics

          1.3m
          Posts

          blockly
          2
          3
          255
          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