Navigation

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

    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

    Counter unterbrechen

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

      Hallo

      Bei diesem Blockly wird alexa2.0.History.status überwacht und als Zähler hochgezählt.
      Ist 5 erreicht kommt eine Sprachausgabe.

      Ist es irgendwie möglich, wenn "Bitte" im History auftaucht, dass dies dann nicht zu den 5 mitgezählt wird?

      javascript - ioBroker (6).png

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="" id="9qZ`rS12:tHqDPw*3VLV">i</variable>
          <variable type="undefined" id="Intervall">Intervall</variable>
          <variable type="undefined" id="timeout">timeout</variable>
          <variable type="undefined" id="timeout3">timeout3</variable>
        </variables>
        <block type="on" id="Ycz@QCV;KB}e|vfH@%(|" x="-487" y="-537">
          <field name="OID">alexa2.0.History.status</field>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <statement name="STATEMENT">
            <block type="math_change" id="xa|T`xGn$]nb,]4vZV`j">
              <field name="VAR" id="9qZ`rS12:tHqDPw*3VLV" variabletype="">i</field>
              <value name="DELTA">
                <shadow type="math_number" id="}LwR?@w%2PbZl$Ze-%zk">
                  <field name="NUM">1</field>
                </shadow>
              </value>
              <next>
                <block type="controls_for" id="PzwWv110Oy#b;/,{[lwe">
                  <field name="VAR" id="9qZ`rS12:tHqDPw*3VLV" variabletype="">i</field>
                  <value name="FROM">
                    <shadow type="math_number" id="ie?riF1,1Fa}^@wR-E;%">
                      <field name="NUM">1</field>
                    </shadow>
                  </value>
                  <value name="TO">
                    <shadow type="math_number" id="9lyS1r_q/hGo.jLWf9ZA">
                      <field name="NUM">5</field>
                    </shadow>
                  </value>
                  <value name="BY">
                    <shadow type="math_number" id="FcaU]5+9Msd^CwMKNiru">
                      <field name="NUM">1</field>
                    </shadow>
                  </value>
                  <statement name="DO">
                    <block type="control" id="P.OJ]iYmHG17(f^B-TqL">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">javascript.0.Alexa_Nerven</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="cK^g3#xs(^At)y*|!i=.">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                  <next>
                    <block type="controls_for" id=".7O^S1?.G[o,A+~775S)">
                      <field name="VAR" id="9qZ`rS12:tHqDPw*3VLV" variabletype="">i</field>
                      <value name="FROM">
                        <shadow type="math_number" id="a#O,ag7iu.yd^XMqDI*5">
                          <field name="NUM">1</field>
                        </shadow>
                      </value>
                      <value name="TO">
                        <shadow type="math_number" id="KsG*n-%_V+HwbA7q0t#P">
                          <field name="NUM">5</field>
                        </shadow>
                      </value>
                      <value name="BY">
                        <shadow type="math_number" id="awM*egp9O-eLDzu%js/M">
                          <field name="NUM">1</field>
                        </shadow>
                      </value>
                      <statement name="DO">
                        <block type="timeouts_settimeout" id="()jdoDkJtH3ZyNcx/G9l">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">20</field>
                          <field name="UNIT">sec</field>
                          <statement name="STATEMENT">
                            <block type="control" id="!s5uov.7DEu=WxKUNGG[">
                              <mutation delay_input="false"></mutation>
                              <field name="OID">javascript.0.Alexa_Nerven</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id=":UnMbF+)iKO(fP7aOzZ)">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
          <next>
            <block type="on" id="@K2F)[sX,9hJ4jOHtVI@">
              <field name="OID">javascript.0.Alexa_Nerven</field>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <statement name="STATEMENT">
                <block type="controls_if" id="art)(uzEbPs9Z%O=Bgz*">
                  <value name="IF0">
                    <block type="logic_compare" id=";_i]cfZdrmL/qXWB6PuO">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="get_value" id="05hB:}da}@CQX_^vBlC@">
                          <field name="ATTR">val</field>
                          <field name="OID">javascript.0.Alexa_Nerven</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="Krd8zl!ae]KDS4^Zf|D,">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="control" id="=I3Y0w_!m_G]v{r$qD2Y">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">alexa2.0.Echo-Devices.G090U5099045059V.Player.volume</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="math_number" id="R^Y[00YwDn{Nv*W/q1,K">
                          <field name="NUM">30</field>
                        </block>
                      </value>
                      <next>
                        <block type="control" id="#CMBTB=mu!qJpOno^f`U">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">alexa2.0.Echo-Devices.G090U5099045059V.Commands.speak</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="text" id="eldGnoch6k80Ps]J9/}S">
                              <field name="TEXT">Laura, jetzt ist gut. Ich habe jetzt wirklich keine Lust mehr, immer nur Alexa, Alexa, Alexa. </field>
                            </block>
                          </value>
                          <next>
                            <block type="timeouts_settimeout" id="0p5a3if5c,aS]hPc1[Vp">
                              <field name="NAME">timeout3</field>
                              <field name="DELAY">10</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                                <block type="control" id="znDB/EM;zfpy|i0d5UWE">
                                  <mutation delay_input="false"></mutation>
                                  <field name="OID">alexa2.0.Echo-Devices.G090U5099045059V.Player.volume</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="math_number" id="q$mG{?Ob=4lWn~5p6s@y">
                                      <field name="NUM">20</field>
                                    </block>
                                  </value>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </statement>
              <next>
                <block type="timeouts_setinterval" id="#wutH_9dNwUo.(}%/mx_">
                  <field name="NAME">Intervall</field>
                  <field name="INTERVAL">120</field>
                  <field name="UNIT">sec</field>
                  <statement name="STATEMENT">
                    <block type="variables_set" id="WRYF})ujTq7z-7;JRyc4">
                      <field name="VAR" id="9qZ`rS12:tHqDPw*3VLV" variabletype="">i</field>
                      <value name="VALUE">
                        <block type="math_number" id="rL^Jpr-?3qlh[8)VnCwC">
                          <field name="NUM">0</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </next>
        </block>
      </xml>
      
      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @Negalein last edited by

        @Negalein sagte in Counter unterbrechen:

        Ist es irgendwie möglich, wenn "Bitte" im History auftaucht, dass dies dann nicht zu den 5 mitgezählt wird?

        Habe keine Ahnung was du da tust und mit "Bitte" meinst

        Aber es müsste gehen, indem du das Hochzählen nur machst wenn WasAuchImmer nicht Bitte enthält

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

          @Homoran sagte in Counter unterbrechen:

          Habe keine Ahnung was du da tust und mit "Bitte" meinst

          Ok, wenn meine Tochter Alexa bedient kommt nach 5x eine Sprachansage.
          Wenn sie aber "Alexa, bitte ......" soll dies nicht zu den 5x hinzugefügt werden.

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

            @Negalein
            Ein weiterer Grund der mich bestätigt keine Alexa zu haben 😉

            Daher fehlen mir noch weitere Infos.
            Was sind die States status uns Alexa_Nerven?

            Was macht dein Skript??

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

              @Homoran sagte in Counter unterbrechen:

              Ein weiterer Grund der mich bestätigt keine Alexa zu haben

              😂

              Was sind die States status uns Alexa_Nerven?

              alexa2.0.History.status zeigt an, wenn mit ihr gesprochen wird.
              javascript.0.Alexa_Nerven ist ein selbst angelegter DP als Switch.

              Was macht dein Skript??

              Das Script überwacht alexa2.0.History.status und zählt bis 5 hoch.
              Wurde alexa2.0.History.status 5x aktualisiert, geht javascript.0.Alexa_Nerven auf true und
              auf den Echos wird ein Satz ausgegeben.

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

                @Negalein
                OK -dann bleibt mir nur als "Nicht-Alexianer" zu fragen, ob irgendwo der gesprochene Satz als Text vorliegt?
                Ich meine sowas mal gelesen zu haben (ggf. in Zusammenhang mit dem Alexa2-Adapter)

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

                  @Homoran sagte in Counter unterbrechen:

                  OK -dann bleibt mir nur als "Nicht-Alexianer" zu fragen, ob irgendwo der gesprochene Satz als Text vorliegt?

                  Ja, das sieht man in alexa2.0.History.summary

                  objects - ioBroker (7).png

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

                    @Negalein
                    Dann musst du zu Beginn das erste Wort auslesen, prüfen ob da "bitte" steht und anschließend den Counter nur hochzählen wenn da nicht bitte steht

                    Ich nutze so etwas bei der Harmony:
                    String_zerlegen.png

                    Du musst eine Variable erstellen, dann bei Wert von den Datenpunkt alexa2....summary nehmen.
                    Bei bis musst du 5 Buchstaben (BITTE) abgreifen
                    und den Counter in ein FALLS setzen, das auf die Variable auf ungleich BITTE prüft

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

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    812
                    Online

                    31.9k
                    Users

                    80.2k
                    Topics

                    1.3m
                    Posts

                    blockly
                    2
                    8
                    330
                    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