Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Wo liegt mein Fehler? Blinkskript

    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

    Wo liegt mein Fehler? Blinkskript

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

      @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

      Es ändert sich weder die "5" noch wird true auf false umgesteuert oder etwas änliches. Lediglich der Zeitstempel ändert sich.

      dann gibt es auch kein sonst

      dann musst du einfach mit einem weieren Timeout arbeiten und nach 1Min das Intervall stoppen

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

        @Homoran sagte in Wo liegt mein Fehler? Blinkskript:

        dann musst du einfach mit einem weieren Timeout arbeiten und nach 1Min das Intervall stoppen

        Hmmm - einfach nur stoppen? Da würden die Lampen aber ggf. in einem Zustand stehen bleiben, den Sie vorher nicht hatten.

        Wie macht man das am schlauesten? So?

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id="{lIT7nPatFudSilQ`DQg">LEDBaum</variable>
            <variable id="WVF=F%xe586z`WJPI#,]">Sternkueche</variable>
            <variable type="timeout" id="timeout">timeout</variable>
            <variable id="Gdfn}BNa!,4Oa%6t)v4V">Schreibtischlampe</variable>
            <variable type="interval" id="Intervall">Intervall</variable>
            <variable type="timeout" id="timeout2">timeout2</variable>
          </variables>
          <block type="timeouts_clearinterval" id="o72Wi3z_P03#(V09}n6Q" disabled="true" x="488" y="12">
            <field name="NAME">Intervall</field>
          </block>
          <block type="on" id="e~6;xvey3spuZ.iKfaZh" x="113" y="38">
            <field name="OID">rflink.0.channels.Byron_1.CHIME_05</field>
            <field name="CONDITION">any</field>
            <field name="ACK_CONDITION"></field>
            <statement name="STATEMENT">
              <block type="controls_if" id="N8zaRi8~uq$L$FHF18L_">
                <mutation else="1"></mutation>
                <value name="IF0">
                  <block type="on_source" id="L[8}]IQ.y9jvvP;7|KLH">
                    <field name="ATTR">state.val</field>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id=";yX|1g.5(k!oRM_#-9E:">
                    <field name="VAR" id="{lIT7nPatFudSilQ`DQg">LEDBaum</field>
                    <value name="VALUE">
                      <block type="get_value" id="_hq?[bL2*,TW|Qj6C{Yr">
                        <field name="ATTR">val</field>
                        <field name="OID">sonoff.0.DEKO_1.POWER1</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id=",4P,u.|cIA!m6.?C.k3:">
                        <field name="VAR" id="WVF=F%xe586z`WJPI#,]">Sternkueche</field>
                        <value name="VALUE">
                          <block type="get_value" id="g?oFN.EO`)l=7SZrA3vW">
                            <field name="ATTR">val</field>
                            <field name="OID">sonoff.0.DEKO_3.POWER1</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="^e~.O5xZx$c*Ix?MQ^81">
                            <field name="VAR" id="Gdfn}BNa!,4Oa%6t)v4V">Schreibtischlampe</field>
                            <value name="VALUE">
                              <block type="get_value" id="!xs:emvLzTVJ4j!6o]uH">
                                <field name="ATTR">val</field>
                                <field name="OID">deconz.0.Lights.2.on</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="timeouts_cleartimeout" id="7VTsp/4j?r]|7@hXG,2f">
                    <field name="NAME">timeout</field>
                    <next>
                      <block type="timeouts_settimeout" id="_Lmq`%o|XT7+notyj)m0">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">5</field>
                        <field name="UNIT">sec</field>
                        <statement name="STATEMENT">
                          <block type="timeouts_setinterval" id="7)BwGk3{,D+^2cXRZ^P]">
                            <field name="NAME">Intervall</field>
                            <field name="INTERVAL">2000</field>
                            <field name="UNIT">ms</field>
                            <statement name="STATEMENT">
                              <block type="toggle" id="b@OW|;wFgi_tIE-#.oA?">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">sonoff.0.DEKO_1.POWER1</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <next>
                                  <block type="toggle" id="HcUJsn8fZ=8IF.FOe/Dh">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">sonoff.0.DEKO_3.POWER1</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <next>
                                      <block type="toggle" id="}F%+J*:-Ti8s`^KBmp~?">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">deconz.0.Lights.2.on</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                        <next>
                          <block type="timeouts_cleartimeout" id="Xkk+M`D]zdeO:b!-XoZ8">
                            <field name="NAME">timeout2</field>
                            <next>
                              <block type="timeouts_settimeout" id="c%g=%Dp3xCo)%#Em9`:.">
                                <field name="NAME">timeout2</field>
                                <field name="DELAY">10</field>
                                <field name="UNIT">sec</field>
                                <statement name="STATEMENT">
                                  <block type="control" id="9Ep#xigx*U[P/[~P.Ek%">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">sonoff.0.DEKO_1.POWER1</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="variables_get" id="hGee8900ih_dKmWtE~MY">
                                        <field name="VAR" id="{lIT7nPatFudSilQ`DQg">LEDBaum</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control" id="mPBDS~b/X^q9$?S,i!Y_">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">sonoff.0.DEKO_3.POWER1</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="c!h5zcOws0|DZ9;#;LGB">
                                            <field name="VAR" id="WVF=F%xe586z`WJPI#,]">Sternkueche</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="09{-plIG,^Ht%Q:@veG9">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">deconz.0.Lights.2.on</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="variables_get" id="}f$0dYJEJkaJRskjr?j)">
                                                <field name="VAR" id="Gdfn}BNa!,4Oa%6t)v4V">Schreibtischlampe</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
          <block type="logic_compare" id="]g=k9cuj|T:;m((Cr3!{" disabled="true" x="288" y="62">
            <field name="OP">EQ</field>
            <value name="A">
              <block type="get_value" id="CFN/pJ1+{bKUmDHs6G$:" disabled="true">
                <field name="ATTR">val</field>
                <field name="OID">deconz.0.Lights.2.on</field>
              </block>
            </value>
            <value name="B">
              <block type="logic_boolean" id="e:q.Y^a$DAhn@6a:p{Ww">
                <field name="BOOL">TRUE</field>
              </block>
            </value>
          </block>
        </xml>
        
        Homoran 1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @JB_Sullivan last edited by

          @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

          Da würden die Lampen aber ggf. in einem Zustand stehen bleiben, den Sie vorher nicht hatten.

          Dann musst du zum skriptstart den Zustand der Lampen in Variablen speichern und beim Timeout2 zusammen mit dem Stop Intervall wieder zurücksetzen

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

            @Homoran Ich vermute du hast dir den Code nicht angesehen? Hier den oberen Code als Bildchen - wäre das so OK?

            7023aa2c-794b-4e61-9df2-14267d2e1d6d-image.png

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

              @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

              Ich vermute du hast dir den Code nicht angesehen?

              so ist es.
              lässt sich am Handy nicht mal eben importieren

              @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

              Hier den oberen Code als Bildchen - wäre das so OK?

              Auf die Schnelle: ja!

              und klappt es?

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

                @Homoran Bin auf der Arbeit 🙂 Kann den Code zwar Remote bearbeiten, aber nicht das Ergebnis sehen, bzw. den Klingelknopf drücken 😉

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

                  So, wieder zu Hause - tja das Beispiel oben hat nicht funktioniert 😞

                  Dann habe ich es mal als Zähler Variante ausprobiert, aber auch hier blinkt es lustig weiter 😞

                  a87654fe-de68-4fda-9d20-65d4f36dc467-image.png

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

                    @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

                    das Beispiel oben hat nicht funktioniert

                    Hast du da mal debug-Bausteine mit sinnvoller Ausgabe eingebaut um zu sehen wo es hängt?
                    Und ein stop intervall vor dem Inervall block setzen, so wie du es mit dem timeout richtig gemacht hast

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

                      @JB_Sullivan sagte:

                      erlaubt es mir lediglich den Zeitstempel der Zustandsänderung auszuwerten.

                      Weshalb wird dann der Wert geprüft ?
                      Versuche es mal so:

                      Blockly_temp.JPG

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

                        @paul53 sagte in Wo liegt mein Fehler? Blinkskript:

                        Weshalb wird dann der Wert geprüft ?
                        Versuche es mal so:

                        Ich dachte Uhrzeit/Datum ist auch ein Wert 😚

                        So wie du es gemacht hats, funktioniert es perfekt - vielen Dank. Ich war auch schon kurz davor einen eigenen Datenpunkt zu erzeugen wenn es geklingelt hat und diesen dann aufzunehmen, aber mit "Klingelsperre" funktioniert es ja auch super - VIELEN DANK.

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

                          @JB_Sullivan sagte in Wo liegt mein Fehler? Blinkskript:

                          Ich dachte Uhrzeit/Datum ist auch ein Wert

                          ist es auch, aber das wird nie true

                          Falls Wert ist die Kurzform von Falls Wert = true

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          859
                          Online

                          31.9k
                          Users

                          80.1k
                          Topics

                          1.3m
                          Posts

                          blockly
                          4
                          15
                          386
                          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