Navigation

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

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Hue Motion mit Farbwechsel

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

      @aphofis
      Korrektur: 11 s reichen nicht, denn weiß soll 5 min leuchten - nicht 5 sek.
      Wird doch etwas komplizierter, aber machbar, etwa so:

      Bild_2022-09-19_232350030.png

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

        @paul53
        Das ja cool ich habe szenen vielleicht ist es damit einfacher
        scene_blue_ocean
        scene_chinatown
        scene_green_flower
        das sind button

        vielleicht ist es damit leichter und was dann nachher 5 min an bleiben soll wäre die szene
        scene_hell

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

          geht das nicht irgendwie so

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable type="timeout" id="timeout">timeout</variable>
              <variable type="timeout" id="timeout2">timeout2</variable>
              <variable type="timeout" id="timeout3">timeout3</variable>
              <variable type="timeout" id="timeout4">timeout4</variable>
            </variables>
            <block type="on_ext" id="Vo2d_MmTq==sR.4ZWR$O" x="88" y="-2662">
              <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="Czsj]a1TUk|+~h~ORP[b">
                  <field name="oid">hue.0.Küche_Motion_Sensor.alert</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="timeouts_cleartimeout" id=".AnY7,uE8z6%68I_9r!J">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="timeouts_cleartimeout" id=",WLHN!}|,2M#R0VkTQ9A">
                      <field name="NAME">timeout2</field>
                      <next>
                        <block type="timeouts_cleartimeout" id="Lg-`mbN#ElGq1X0+pDwI">
                          <field name="NAME">timeout3</field>
                          <next>
                            <block type="controls_if" id="+RZ{~*8u`F-{891w*mat">
                              <value name="IF0">
                                <block type="logic_compare" id="A~h$KiObmtcFNJioelTy">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="c,-!*I[DsN@6/?6^#|PP">
                                      <field name="ATTR">val</field>
                                      <field name="OID">hue.0.Hue_motion_sensor_Küche.alert</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="-Agy/]U^1i9j@)`m$1,I">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="timeouts_settimeout" id="b8c{g!jXe$]dFOh^QXP[">
                                  <field name="NAME">timeout</field>
                                  <field name="DELAY">2</field>
                                  <field name="UNIT">sec</field>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id="ub/zHL/V?|rXYe|9Al6y">
                                      <value name="IF0">
                                        <block type="get_value" id="FrcZZNPN%#R(^G6NN|LM">
                                          <field name="ATTR">val</field>
                                          <field name="OID">hue.0.Küche.alert</field>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="control" id="$86HuP~`N{LaY4I7md,3">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">hue.0.Küche.scene_blue_ocean</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="1UP*Me:;gW3cC?+vbh94">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="timeouts_settimeout" id="RQu$Z4=8m!a!2U_H$_v~">
                                      <field name="NAME">timeout2</field>
                                      <field name="DELAY">2</field>
                                      <field name="UNIT">sec</field>
                                      <statement name="STATEMENT">
                                        <block type="controls_if" id="qeV?h7T0ZGL%!fueL2mk">
                                          <value name="IF0">
                                            <block type="get_value" id="Gh:4fajxFERO78_|E@QM">
                                              <field name="ATTR">val</field>
                                              <field name="OID">hue.0.Küche.alert</field>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="control" id="ZMYCpjs#scK9^,G;sJ*3">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">hue.0.Küche.scene_chinatown</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="BWdId8IQ@N(sUO|bobX2">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </statement>
                                        </block>
                                      </statement>
                                      <next>
                                        <block type="timeouts_settimeout" id="?W11V^9uDK=K9Z1nB@ye">
                                          <field name="NAME">timeout3</field>
                                          <field name="DELAY">2</field>
                                          <field name="UNIT">sec</field>
                                          <statement name="STATEMENT">
                                            <block type="controls_if" id="|0N;oPG3Z-NGc|,*d+ms">
                                              <value name="IF0">
                                                <block type="get_value" id="nYaY{L.:/B75gJ.{1Mu2">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">hue.0.Küche.alert</field>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="control" id="6a3tWDN]~RU5LPU~L1N]">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">hue.0.Küche.scene_green_flower</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="X.2C{avP81@3GF@3e%d7">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="timeouts_settimeout" id="g;meP@ZeFEPhgA35Y9{e">
                                              <field name="NAME">timeout4</field>
                                              <field name="DELAY">5</field>
                                              <field name="UNIT">min</field>
                                              <statement name="STATEMENT">
                                                <block type="controls_if" id="q#U.lO4`LAk~JwqLJX*4">
                                                  <value name="IF0">
                                                    <block type="get_value" id="aGpokYbF[eYSp^p];Frp">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.Küche.alert</field>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="control" id="q;;69#7r+B%VLVaLRy(0">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                      <field name="OID">hue.0.Küche.scene_hell</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="w-UnYIw60+e3GRR;dFTh">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="timeouts_cleartimeout" id="brwJ|dmqRsiBNCQM(I_M">
                                                  <field name="NAME">timeout4</field>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </xml>
          

          Screenshot 2022-09-19 233319.png

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

            @aphofis sagte: habe szenen vielleicht ist es damit einfacher

            Ob eine Szene oder eine Farbe gesetzt wird, macht vom Ablauf her keinen Unterschied.

            @aphofis sagte in Hue Motion mit Farbwechsel:

            geht das nicht irgendwie so

            Nein, das funktioniert nicht.

            Aphofis 2 Replies Last reply Reply Quote 0
            • Aphofis
              Aphofis @paul53 last edited by

              @paul53 ok dann teste ich das mal mit deinem script.
              Vielen Dank schon mal

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

                @paul53
                Was muss denn getriggert werden !?

                Screenshot 2022-09-20 194555.png
                zum screenshot war das LED aus

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

                  @aphofis sagte: Was muss denn getriggert werden !?

                  Blockly liefert die Farben als "#rrggbb" im Hexadezimalformat. Hat Hue so einen Datenpunkt nicht?

                  M Aphofis 2 Replies Last reply Reply Quote 0
                  • M
                    Matt77CHE @paul53 last edited by

                    @paul53
                    Nein, RGB sind jeweils eigene Datenpunkte

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

                      @paul53
                      Doch HUE hat RGB als einzele Datenpunkte wie Matt77CHE sagte

                      Aphofis paul53 2 Replies Last reply Reply Quote 0
                      • Aphofis
                        Aphofis @Aphofis last edited by Aphofis

                        am einfachsten ist es due button mit den szenen zu nutzen wenn ich die buttons unter objekte anklicke geht das led stripe sofort in die szene und led ist an
                        Ich habe auch eine Szene Aus erstellt damit die LEDs wieder ausgeschaltet werden können
                        Man muss den Button Aus nur leider zweimal betätigen damit das Led komplett aus geht

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

                          @aphofis sagte: HUE hat RGB als einzele Datenpunkte

                          Dann kann man wandeln:

                          Bild_2022-09-20_205456245.png

                          Inhalt der JS-Funktion hex2number(hex):

                          return parseInt(hex, 16);
                          
                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          767
                          Online

                          32.0k
                          Users

                          80.5k
                          Topics

                          1.3m
                          Posts

                          3
                          14
                          389
                          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