Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Problem mit Ikea Tradfri Dimmerschalter *gelöst*

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Problem mit Ikea Tradfri Dimmerschalter *gelöst*

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

      Hallo zusammen,

      ich habe ein kleines Problem mit meinem Ikea Tradfri Dimmerschalter. Ich schalte hiermit ein Internetradio ein/aus. An sich funktioniert das auch ohne große Probleme. Seit ein paar Tagen habe ich jedoch den Fall, dass das Radio nach 10 Minuten mit der Wiedergabe stoppt. Am Radio liegt es nicht, denn der IO-Broker führt das Skript zum Stoppen aus, obwohl niemand auf den Schalter drückt.
      Vermutlich habe ich hier einen Programmierfehler gemacht. Es wäre nett, wenn sich das einmal jemand ansehen könnte.

      <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="8r+OlfU1??G0u?xLRp!h" x="263" y="-337">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">ne</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="+Ur!gJ%N%4R3)Vue#$B%">
            <field name="oid">deconz.0.sensors.680ae2fffe121dcf.buttonevent</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="i-AOo!B:~3@,p[fd[?7g">
            <mutation elseif="1"></mutation>
            <value name="IF0">
              <block type="logic_compare" id="40I)@e9=2]j73ib;IY6~">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="get_value" id="Za9*g9I,Vt,^~JR|--|c">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.sensors.680ae2fffe121dcf.buttons.1.release_press</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="A[k3pLAvaW-OqTRW_,ht">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="request" id="@x*FIJj|_mu4.zOfq5r4">
                <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                <field name="WITH_STATEMENT">FALSE</field>
                <field name="LOG"></field>
                <value name="URL">
                  <shadow type="text" id="0k%y?Sz$IDYTLhPrObhG">
                    <field name="TEXT">http://192.168.1.198:9000/plugins/Favorites/index.html?action=play&amp;index=0&amp;player=192.168.1.202</field>
                  </shadow>
                </value>
                <next>
                  <block type="timeouts_settimeout" id="oTZNZa]WI#4Ix*eYR)=!">
                    <field name="NAME">timeout</field>
                    <field name="DELAY">1</field>
                    <field name="UNIT">sec</field>
                    <statement name="STATEMENT">
                      <block type="comment" id="BTkJX%h0cjH~_ZxpJ|`S">
                        <field name="COMMENT">Lautstärke setzen</field>
                        <next>
                          <block type="request" id="9=c8nZ#KmJGaxfB,L5VA">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                            <field name="WITH_STATEMENT">FALSE</field>
                            <field name="LOG"></field>
                            <value name="URL">
                              <shadow type="text" id="@TWCY9|;gRUjiE2My~CI">
                                <field name="TEXT">http://192.168.1.198:9000/status.html?p0=mixer&amp;p1=volume&amp;p2=23&amp;player=192.168.1.202</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="debug" id="D-PdPt(hw6Wmzuaob:A;">
                                <field name="Severity">error</field>
                                <value name="TEXT">
                                  <shadow type="text" id="i4A%pS|#+BM`th_UCWd5">
                                    <field name="TEXT">Radio Bad eingeschaltet</field>
                                  </shadow>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </statement>
            <value name="IF1">
              <block type="logic_compare" id="sSBt{_Du;_@yY0AJ4nSe">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="get_value" id="vCIUsYOw.4E/+v8[4@s.">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.sensors.680ae2fffe121dcf.buttons.2.release_press</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="b0t{UH,MBHk$mxE}ZAO%">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO1">
              <block type="comment" id="P6lH!uuec[xZwMzX.e+L">
                <field name="COMMENT">Logitech Radio einschalten</field>
                <next>
                  <block type="request" id="S|n:dj{oiz=1O-(gsngN">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                    <field name="WITH_STATEMENT">FALSE</field>
                    <field name="LOG"></field>
                    <value name="URL">
                      <shadow type="text" id="}P]O*D3PMn{`msoXI-JV">
                        <field name="TEXT">http://192.168.1.198:9000/status.html?p0=stop&amp;player=192.168.1.202</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="debug" id="*$W=T7=ym%G$tdB*$?Br">
                        <field name="Severity">error</field>
                        <value name="TEXT">
                          <shadow type="text" id="P6$/p9O|Df[5s#|RZ7uJ">
                            <field name="TEXT">Radio Bad ausgeschaltet</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </statement>
      </block>
      

      LOG.jpg

      Vielen Dank!

      Gruß surfer 😉

      FredF J 2 Replies Last reply Reply Quote 0
      • FredF
        FredF Most Active Forum Testing @surfer09 last edited by

        @surfer09
        Tipp: Neben dem code in tags ist es für alle die am Handy im Forum sind und helfen wollen, hilfreich ein screenshot des Blocklys hier zu posten

        1 Reply Last reply Reply Quote 0
        • J
          jensven @surfer09 last edited by jensven

          @surfer09
          Trigger lieber auf das Objekt "Buttonpressed" der spuckt verschiedene Werte für An / Aus / Longpress.

          An -> 1002
          Aus -> 2002
          An Longpress -> 1001
          Aus Longpress-> 2001

          Das Trigger Objeklt natürlich abändern

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable type="timeout" id="timeout">timeout</variable>
            </variables>
            <block type="on_ext" id="8r+OlfU1??G0u?xLRp!h" x="263" y="-337">
              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
                <shadow type="field_oid" id="+Ur!gJ%N%4R3)Vue#$B%">
                  <field name="oid">deconz.0.Sensors.23.buttonpressed</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="controls_if" id="i-AOo!B:~3@,p[fd[?7g">
                  <mutation elseif="1"></mutation>
                  <value name="IF0">
                    <block type="logic_compare" id="40I)@e9=2]j73ib;IY6~">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="on_source" id="erSe6%=o,#~Z8b0YYq*{">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="1A$=2Y;1;eq?F}Di1@!S">
                          <field name="NUM">1002</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="request" id="@x*FIJj|_mu4.zOfq5r4">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                      <field name="WITH_STATEMENT">FALSE</field>
                      <field name="LOG"></field>
                      <value name="URL">
                        <shadow type="text" id="0k%y?Sz$IDYTLhPrObhG">
                          <field name="TEXT">http://192.168.1.198:9000/plugins/Favorites/index.html?action=play&amp;index=0&amp;player=192.168.1.202</field>
                        </shadow>
                      </value>
                      <next>
                        <block type="timeouts_settimeout" id="oTZNZa]WI#4Ix*eYR)=!">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">1</field>
                          <field name="UNIT">sec</field>
                          <statement name="STATEMENT">
                            <block type="comment" id="BTkJX%h0cjH~_ZxpJ|`S">
                              <field name="COMMENT">Lautstärke setzen</field>
                              <next>
                                <block type="request" id="9=c8nZ#KmJGaxfB,L5VA">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                  <field name="WITH_STATEMENT">FALSE</field>
                                  <field name="LOG"></field>
                                  <value name="URL">
                                    <shadow type="text" id="@TWCY9|;gRUjiE2My~CI">
                                      <field name="TEXT">http://192.168.1.198:9000/status.html?p0=mixer&amp;p1=volume&amp;p2=23&amp;player=192.168.1.202</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="debug" id="D-PdPt(hw6Wmzuaob:A;">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="i4A%pS|#+BM`th_UCWd5">
                                          <field name="TEXT">Radio Bad eingeschaltet</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <value name="IF1">
                    <block type="logic_compare" id="sSBt{_Du;_@yY0AJ4nSe">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="on_source" id="zx;/r=fpzjo/6jMm+[#I">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="g.aK@wbS]_wotpUOKRw`">
                          <field name="NUM">2002</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO1">
                    <block type="comment" id="P6lH!uuec[xZwMzX.e+L">
                      <field name="COMMENT">Logitech Radio einschalten</field>
                      <next>
                        <block type="request" id="S|n:dj{oiz=1O-(gsngN">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                          <field name="WITH_STATEMENT">FALSE</field>
                          <field name="LOG"></field>
                          <value name="URL">
                            <shadow type="text" id="}P]O*D3PMn{`msoXI-JV">
                              <field name="TEXT">http://192.168.1.198:9000/status.html?p0=stop&amp;player=192.168.1.202</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="debug" id="*$W=T7=ym%G$tdB*$?Br">
                              <field name="Severity">error</field>
                              <value name="TEXT">
                                <shadow type="text" id="P6$/p9O|Df[5s#|RZ7uJ">
                                  <field name="TEXT">Radio Bad ausgeschaltet</field>
                                </shadow>
                              </value>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
            <block type="on_source" id="~qy5#D^,mr4|MQeht8ZL" x="416" y="-197">
              <field name="ATTR">state.val</field>
            </block>
          </xml>
          

          Unbenannt.jpg

          surfer09 1 Reply Last reply Reply Quote 0
          • surfer09
            surfer09 @jensven last edited by

            @jensven Perfekt! Ich danke dir! Ich habe das Skript gerade mal umgebaut und werde mal beobachten, ob es nun besser funktioniert 😉

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

            Support us

            ioBroker
            Community Adapters
            Donate

            861
            Online

            32.0k
            Users

            80.4k
            Topics

            1.3m
            Posts

            3
            4
            350
            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