Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Mein Start mit Blockly/Skripten - Hilfe bei Erstellung

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Mein Start mit Blockly/Skripten - Hilfe bei Erstellung

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

      Hallo Leute,
      auch ich habe den Start mit ioBroker nun hinter mir, der auch ziemlich gut lief - dank euch und der Hilfe die ich hier im Forum bekommen habe!
      Dazu hatte ich im Allgemeinen Bereich ein extra Thema erstellt, wo es um den Start/ die Einrichtung/ Adapter und damit mir entstandene Probleme - an mich angepasst, ging. (Thema)
      Mein ioBroker läuft, ich habe soweit alle gewünschten Adapter installiert - diese laufen auch, nun würde ich gerne mit meinen ersten Skripten bzw. Schaltungen beginnen. Ich habe keinerlei Erfahrung damit... habe mir aber schon einige Videos darüber angesehen.
      Ich würde euch gerne mein Vorhaben mitteilen und hoffe dass wir dann gemeinsam die Schaltungen "basteln" können.
      Wenn wir dann ein paar gemacht haben werde ich die Logik dahinter bestimmt schnell verstehen 😄
      Nun aber erstmal ein paar Infos zu meinem System, verwendete Adapter und Smarthome:

      Smarthome/ von mir verwendete Komponenten und Geräte:

      • Logitech Harmony (Elite mit Hub)
      • Amazon Alexa (Echo Show, Echo und Echo Dot)
      • Philips Hue (Bridge vohanden)
      • (unter meinem Android Smartphone laufen einige Automatisierungsprozesse mit Tasker und IFTTT)
      • Smarthome Geräte die direkt über WLAN eingebunden sind wie: eine Kamera (HiKam) und eine WLAN Steckleiste
      • Osram Smart + Plug und eine Amazon Steckdose (noch nicht in Berieb - kommt aber noch)
      • eine Synology Diskstation (mit Plex Server)
      • Xiaomi Roborock S5
      • seit neustem ein Xiaomi Aqara Fensterkontakt und der Cube (ein Gateway habe ich nicht, die Komponenten sind über den Zigbee Adapter bzw. CC2531 ZigBee USB Stick mit Antenne - integriert)

      zu meinem System:

      ioBroker läuft bei mir auf einem Raspberry Pi 3B+ unter Raspbian Light Stretch (ioBroker Image)

      installierte Adapter:

      • alexa 2
      • cloud
      • harmony
      • hue
      • iot
      • javascript
      • mihome-vacuum
      • scenes
      • terminal
      • vis
      • web
      • zigbee
      • tr-064
      • ping
      • radar2

      (die letzten 3 muss ich noch einrichten - diese sollen dann als Anwesenheitserkennung dienen)

      Ich werde dann im Anschluss ein erstes Vorhaben posten, falls ihr weitere Infos benötigt - ergänze ich diese natürlich.

      Danke schonmal und LG

      iomountain 1 Reply Last reply Reply Quote 0
      • smartmood
        smartmood last edited by

        Nun zu meinem ersten Vorhaben und der ersten Schaltung:

        diese betrifft Alexa, Logitech Harmony und Philips Hue.

        ich habe bereits eine Routine eingerichtet - über Alexa direkt (nichts mit dem ioBroker)...
        ich sage:" Alexa, Smart an"- dann startet die Logitech Harmony Aktion "Smart", hierbei wird der TV und die Heimkinoanlage angeschaltet. Zusätzlich gehen 2 Philips Hue Play Bars an, welche hinter dem TV angebracht sind.

        Das klappt ja so schon ganz gut, nun würde ich aber gerne diese Schaltung anhand von Blockly vornehmen um dies zu verstehen + noch einen Zusatz "einbauen"

        Ich würde gerne wie gehabt sagen:" Alexa, Smart an" - dann soll auch wie gehabt die Logitech Aktion "Smart" gestartet werden, sodass TV und Heimkinoanlage sich einschalten. Auch wie gehabt sollen die 2 Philips Hue Play Bars angehen ABER
        nur wenn es draußen dunkel ist.

        Jetzt seid ihr gefragt 😄 ich bin schon sehr gespannt auf eure Antworten...

        dslraser 2 Replies Last reply Reply Quote 0
        • K
          Kuddel last edited by

          d0aa9f3c-51d1-4b3c-a7a3-75e51ed39db2-grafik.png

          Import

          <block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="~}zV|CUi@z(OVz4z?`5d" x="-87" y="38">
            <mutation items="1"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="DeC1X7Np^RWMBxOgQgcd">
                <field name="oid">harmony.0.Harmony_Hub.activities.currentActivity</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="sL]#@JLio)qaEvM6k-,7">
                <value name="IF0">
                  <block type="logic_operation" id="$VM|G=b/W380f6?st$V!" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_compare" id="kU+qs-k6C(wHmz7l041q">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="get_value" id="28-1b$)K-l#jo]xNe9*:">
                            <field name="ATTR">val</field>
                            <field name="OID">harmony.0.Harmony_Hub.activities.currentActivity</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="text" id=":X~/w7;:p)i453KDm5QX">
                            <field name="TEXT">Smart</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="time_compare_ex" id=",cAMo)0@P~?=I^d~R*-m">
                        <mutation end_time="true" actual_time="true"></mutation>
                        <field name="USE_ACTUAL_TIME">TRUE</field>
                        <field name="OPTION">between</field>
                        <value name="START_TIME">
                          <shadow type="text" id="}reW4eNXsODmuM9MTsq@">
                            <field name="TEXT">12:00</field>
                          </shadow>
                          <block type="time_astro" id="R.PlD8_Ce1f+u6.yC)Iy">
                            <field name="TYPE">sunset</field>
                            <field name="OFFSET">0</field>
                          </block>
                        </value>
                        <value name="END_TIME">
                          <shadow type="text" id="5LSQjxG-[b`z9!+aXs?H">
                            <field name="TEXT">18:00</field>
                          </shadow>
                          <block type="time_astro" id=":,^u(1v_h.o4P~x@LsMa">
                            <field name="TYPE">sunrise</field>
                            <field name="OFFSET">0</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </statement>
          </block>
          

          1 Reply Last reply Reply Quote 0
          • iomountain
            iomountain @smartmood last edited by

            @smartmood sagte in Mein Start mit Blockly/Skripten - Hilfe bei Erstellung:

            ping
            radar2

            (die letzten 3 muss ich noch einrichten - diese sollen dann als Anwesenheitserkennung dienen)

            Ping oder Radar, beides macht glaube ich keinen Sinn. Bin selbst von Ping auf Radar2 umgestiegen, weil da doch mehr Möglich ist.

            S 1 Reply Last reply Reply Quote 0
            • N
              Nordischerjung last edited by Nordischerjung

              Moin,

              ich hab es so gelöst, Nachtcheck ist aus einem Script hier im Forum. Das ist auf True zwischen Sonnenuntergang und Sonnenaufgang

              49096fe1-ec1e-4113-a5cd-48c209a6380a-grafik.png

              Ich habe auch eine Harmony

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

                Danke erstmal für eure schnellen Antworten 😄

                @iomountain

                Ich habe erstmal alle 3 Adapter installiert und werde dann für mich schauen welcher am zuverlässigsten läuft 👍

                @Kuddel

                Danke für den Import 😄
                Eine Verständnisfrage: der lilane Baustein mit der Zeit: Sonnenuntergang/Sonnenaufgang...
                ist das die Astrofunktion? Diese Zeit wird dann anhand des Ortes automatisch bezogen?
                Ich werde das dann gleich Heute ausprobieren und mich dann melden

                @Nordischerjung

                Danke auch an dich, das werde ich mir dann auch mal genauer ansehen und probieren 😄

                K N 2 Replies Last reply Reply Quote 0
                • K
                  Kuddel @smartmood last edited by

                  @smartmood ja genau, trage deinen Ort in den Systemenistellungen ein und schon funzt die Astrofunktion 1a

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nordischerjung @smartmood last edited by

                    @smartmood

                    Hier ist mein Blockly

                    <xml xmlns="http://www.w3.org/1999/xhtml">
                      <block type="comment" id="/RW.Yd{pfggkP|;TiS0f" x="88" y="-237">
                        <field name="COMMENT">Receiver WZ</field>
                        <next>
                          <block type="on_ext" id="6ui;leaO!l1orauKq*~,">
                            <mutation items="3"></mutation>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <value name="OID0">
                              <shadow type="field_oid" id=".ze0?:A^{D3,?Fndiuv!">
                                <field name="oid">harmony.0.Harmony.activities.DVD/CD</field>
                              </shadow>
                            </value>
                            <value name="OID1">
                              <shadow type="field_oid" id="=b4u2q]YVfM{VwX$pe{!">
                                <field name="oid">harmony.0.Harmony.activities.Fernsehen</field>
                              </shadow>
                            </value>
                            <value name="OID2">
                              <shadow type="field_oid" id="V,%]*a?Bd_4(r.}p2Z2e">
                                <field name="oid">harmony.0.Harmony.activities.TV_Wiedergabe</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="d0k$2t[DX)nYFHL.vp*=">
                                <value name="IF0">
                                  <block type="logic_operation" id=":5LZBP#u:]A]Bk}TNKV," inline="false">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="logic_operation" id="J4QECjA:b!@4.S3*5F]?" inline="false">
                                        <field name="OP">OR</field>
                                        <value name="A">
                                          <block type="logic_compare" id="h@GJ5yNC,L3qC@vv]U^K">
                                            <field name="OP">GT</field>
                                            <value name="A">
                                              <block type="get_value" id="DX#=RFHpS!eF:_oWI:%L">
                                                <field name="ATTR">val</field>
                                                <field name="OID">harmony.0.Harmony.activities.DVD/CD</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_null" id="}ni_nFRb^c7[xx!b5IXl"></block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_operation" id="(83KO1dgG[eW7jD_Z}Rx" inline="false">
                                            <field name="OP">OR</field>
                                            <value name="A">
                                              <block type="logic_compare" id="HKAEcv_^#ZM.P[Cr.O#c">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="-s_.`g=aABM/-S5eA4.%">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">harmony.0.Harmony.activities.Fernsehen</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_null" id="}OjG_Fv@.p@Q8=,HMqn."></block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="h(|`C@X^W@p;2`e`*=;#">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="$9cNp_+@MN#1Q/rrQ8Sv">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">harmony.0.Harmony.activities.TV_Wiedergabe</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_null" id="`qMwza;H@6xfSN2$E]0c"></block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_compare" id="[|,;P,mzSs@~C?KGNie*">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="get_value" id="q`34Z*X-jc5v}rt!r3u+">
                                            <field name="ATTR">val</field>
                                            <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="7,|8S[MO,3!}Im23..,+">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="control" id="_)G^Rxr`@19QfQrLs~0z">
                                    <mutation delay_input="false"></mutation>
                                    <field name="OID">javascript.1.PhilipsHue.Scenes.Gedimmt.r7Cdk1agzB1inNI</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="+dufCMCoD6A{j.)$hT9p">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                            <next>
                              <block type="on" id=".,p_Yb[Q2@a57sPZOHRW">
                                <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                <field name="CONDITION">ne</field>
                                <field name="ACK_CONDITION"></field>
                                <statement name="STATEMENT">
                                  <block type="controls_if" id="?5}[09,_X86w#@O9gVIA">
                                    <value name="IF0">
                                      <block type="logic_operation" id="A`lLK;6pJpLuo3f{)!4J" inline="false">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_operation" id="5:kwz!~!5:`TWaA}Q#7-" inline="false">
                                            <field name="OP">OR</field>
                                            <value name="A">
                                              <block type="logic_compare" id="s2(Zpsf=b,Ye!94UTN#U">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="TP10_%AP0HQ|q+*Fg!Ay">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">harmony.0.Harmony.activities.DVD/CD</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_null" id="/*ml_7Cg*O8_)2cK:9vE"></block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_operation" id="fx{s~F1Gq/G?5$DMICV`" inline="false">
                                                <field name="OP">OR</field>
                                                <value name="A">
                                                  <block type="logic_compare" id="_6%k8wV/mrh/O,P1t8ZP">
                                                    <field name="OP">GT</field>
                                                    <value name="A">
                                                      <block type="get_value" id=".s{LgCKeKCW!ivzOdTDh">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">harmony.0.Harmony.activities.Fernsehen</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_null" id="NLz(NIprNv4R*ySPge}L"></block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_compare" id="6jOpo=~L9U;0z$,P#UjY">
                                                    <field name="OP">GT</field>
                                                    <value name="A">
                                                      <block type="get_value" id="-_P@_2Nj7ZO9x|X90nXB">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">harmony.0.Harmony.activities.TV_Wiedergabe</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_null" id="f5$%tC.ey[z!#OH9zW;M"></block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="sf3^Q@9S62IfkvF=98cY">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="on_source" id="h]vJ8Q_}E$I-;Z:FHsKH">
                                                <field name="ATTR">state.val</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="JRB8eDqD[.Yyy)t$4U|o">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="control" id="Tx~z?F:|TXE_vAA{[}ch">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">javascript.1.PhilipsHue.Scenes.Gedimmt.r7Cdk1agzB1inNI</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="GwQ*+tH(yf|=*Eo59HoW">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="R-fc6E(#/EDGPeSDHJ[W">
                                    <field name="COMMENT">Receiver Wintergarten</field>
                                    <next>
                                      <block type="on" id="omio%j]sjR#0XOYZmA3W">
                                        <field name="OID">samsung.0.Power.checkOn</field>
                                        <field name="CONDITION">ne</field>
                                        <field name="ACK_CONDITION"></field>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="^KC@tOmn`_zby?=A73*4">
                                            <value name="IF0">
                                              <block type="logic_operation" id="?4#kQc5bqos(Ab`O3{k0" inline="false">
                                                <field name="OP">AND</field>
                                                <value name="A">
                                                  <block type="logic_compare" id="9JASJ2a4n9wa]m%Xl]|:">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="on_source" id="5II^QA9Q*B{(1/,hIynV">
                                                        <field name="ATTR">state.val</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="6Sz.Jm_N_`1|Q++/j5(f">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_compare" id="2Tm5QzmM1DD}AWHI)-xX">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="get_value" id="WQ9zXco^m]j`;PW,E.~N">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="Z}TA?356W.).RXyL6#Qp">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="control" id="?=oTy!(BxVP*de,YNOw$">
                                                <mutation delay_input="false"></mutation>
                                                <field name="OID">javascript.1.PhilipsHue.Scenes.Whisky.GdTiIFoQHEMQv-N</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="*7f(QzbzbsG=}K/3rl-q">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="on" id="nSkrP{p+[4cr!(t=%~an">
                                            <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                            <field name="CONDITION">ne</field>
                                            <field name="ACK_CONDITION"></field>
                                            <statement name="STATEMENT">
                                              <block type="controls_if" id="fR^[{TmMHiT7KYJo{Z$|">
                                                <value name="IF0">
                                                  <block type="logic_operation" id="JPU0K^@asV[PtM_6t5))" inline="false">
                                                    <field name="OP">AND</field>
                                                    <value name="A">
                                                      <block type="logic_compare" id="S1)7xdXzq@3gKYu4Gk`n">
                                                        <field name="OP">EQ</field>
                                                        <value name="A">
                                                          <block type="on_source" id="BV8MEhlh~J7@){67vn(9">
                                                            <field name="ATTR">state.val</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="logic_boolean" id=",}=`1u7C1GG)kMY5g|]E">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_compare" id="gv5:F!RCzQzJjf4X}Yz}">
                                                        <field name="OP">EQ</field>
                                                        <value name="A">
                                                          <block type="get_value" id="nnMiMveED2[d+L.0L@[]">
                                                            <field name="ATTR">val</field>
                                                            <field name="OID">samsung.0.Power.checkOn</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="logic_boolean" id="UXNUVERfgwPv?[gS!oQO">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="control" id=")1i[Zvm{zrsRMKu*M0Nz">
                                                    <mutation delay_input="false"></mutation>
                                                    <field name="OID">javascript.1.PhilipsHue.Scenes.Whisky.GdTiIFoQHEMQv-N</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="logic_boolean" id="uiy?M0bazplv5s;*A#N_">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </xml>
                    
                    
                    
                    

                    Und hier der Nachtcheck
                    musst dir nur noch die entsprechenden Datenpunkt anlegen

                    <xml xmlns="http://www.w3.org/1999/xhtml">
                      <block type="astro" id="4fqs|4*$8]Bfo/*.tqAW" x="38" y="99">
                        <field name="TYPE">sunsetStart</field>
                        <field name="OFFSET">0</field>
                        <statement name="STATEMENT">
                          <block type="comment" id="R/qVL*%e:`~hk4Q.6Frc">
                            <field name="COMMENT">Nacht beginnt</field>
                            <next>
                              <block type="control" id=",pqbrM6fvutQJj*.2HRX">
                                <mutation delay_input="false"></mutation>
                                <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="y6VfdsOaMVRkSPV)P~T,">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="i:zb*wVnutO,f8nquttl">
                                    <mutation delay_input="true"></mutation>
                                    <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">30</field>
                                    <field name="UNIT">min</field>
                                    <field name="CLEAR_RUNNING">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id=".@;,x^^z:1TW%g{e~W~~">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="astro" id="gjKA;QT?umlyp`Q.x9E^">
                            <field name="TYPE">sunriseEnd</field>
                            <field name="OFFSET">0</field>
                            <statement name="STATEMENT">
                              <block type="comment" id="tk;5AA.lg9V{D12iHuQs">
                                <field name="COMMENT">Tag beginnt</field>
                                <next>
                                  <block type="control" id="~2FMn1qnt/ls3i!v7QVO">
                                    <mutation delay_input="false"></mutation>
                                    <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="R2IWLHezwF=TD@Ylcj7C">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control" id="2?#eoB%%e-VUpD[83Yv;">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id=";!(h6d)eWeCyK_EJ6Ws]">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="controls_if" id="YOh(32rTiE17D_-%o~hY">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_operation" id="hn5a9F%a77q0Zv5y3h;c" inline="false">
                                    <field name="OP">OR</field>
                                    <value name="A">
                                      <block type="time_compare_ex" id="#TCtI8v{)h5qmnyKMAfk">
                                        <mutation end_time="false" actual_time="true"></mutation>
                                        <field name="USE_ACTUAL_TIME">TRUE</field>
                                        <field name="OPTION">&lt;</field>
                                        <value name="START_TIME">
                                          <shadow type="text" id=",pqd49zAOIOetaoH3==A">
                                            <field name="TEXT">12:00</field>
                                          </shadow>
                                          <block type="time_astro" id="_+A*,Q+~B[cgPeiGn./j">
                                            <field name="TYPE">sunriseEnd</field>
                                            <field name="OFFSET">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="time_compare_ex" id="OABIr]T^oWxl!e0pz7XQ">
                                        <mutation end_time="false" actual_time="true"></mutation>
                                        <field name="USE_ACTUAL_TIME">TRUE</field>
                                        <field name="OPTION">&gt;</field>
                                        <value name="START_TIME">
                                          <shadow type="text" id=",pqd49zAOIOetaoH3==A">
                                            <field name="TEXT">12:00</field>
                                          </shadow>
                                          <block type="time_astro" id="_-o4qYKV:ag:TF4.m2xC">
                                            <field name="TYPE">sunsetStart</field>
                                            <field name="OFFSET">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="comment" id="G;Y{MmvBr73Rr]%|yXT$">
                                    <field name="COMMENT">Nacht beginnt</field>
                                    <next>
                                      <block type="update" id="npv39u1+atGg1;ha$N0c">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="OJ),~+4Ef]V?S69w$J-4">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="5;ZMRxzBI8Gv-MFxVI7N">
                                            <mutation delay_input="true"></mutation>
                                            <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">30</field>
                                            <field name="UNIT">min</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id=":.i:Z5yel_0;y+a,-Y/%">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="comment" id="H+PxXdJ}ZVP8.UX!+E@o">
                                    <field name="COMMENT">Tag beginnt</field>
                                    <next>
                                      <block type="update" id="P.8g@rJ.P)|!PhG6R6IU">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">javascript.1.Tageszeit.Nachtcheck</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="_{v@m5p5f%nRLFTH?).l">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="!-({/+F=HJDz5NdXI`e|">
                                            <mutation delay_input="false"></mutation>
                                            <field name="OID">javascript.1.Tageszeit.Nachtcheck mit 30 min Verzögerung</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="7zBO%ExtP|y_uX4lnGm0">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </xml>
                    
                    1 Reply Last reply Reply Quote 0
                    • dslraser
                      dslraser Forum Testing Most Active @smartmood last edited by dslraser

                      @smartmood
                      ich habe die Lichtschaltung und die Schaltung der Harmony activities in zwei verschiedenen Blocklys, so kann ich bei Bedarf auch eins abschalten.
                      Hier mal mein Vorschlag zur Lichtschaltung. (das Harmony Blockly poste ich später gesondert)
                      Dort ist unten ein zweiter Block drinn, den kannst Du nach dem Import löschen, das ist nur ein anderer Hub in einem anderem Raum.

                      Ich schalte die HUE Lampen in Abhängigkeit mit der Helligkeit draussen (HMIP Bewegungsmelder mit Lichtsensor. 200 hat sich als ganz guter Wert herausgestellt)
                      Beim einschalten einer activitie geht das Licht immer kurz an, wenn es nicht schon an war. Ist es draussen hell genug, geht es kurz darauf wieder aus, ist der Lichtwert unterschritten, bleibt es an.
                      Beim ausschalten geht unabhängig vom Lichtwert immer kurz das Licht an, danach geht es langsam aus. Die Zeit reicht dann um noch mit Licht den Raum zu verlassen.

                      PS: mit dem Weg über die activitys geht auch das Licht an/aus wenn Du die Fernbedienung benutzt und auch wenn Du per Alexa schaltest.

                      Bildschirmfoto 2019-05-27 um 15.49.57.png

                      <xml xmlns="http://www.w3.org/1999/xhtml">
                        <variables>
                          <variable type="undefined" id="timeout2">timeout2</variable>
                          <variable type="undefined" id="timeout">timeout</variable>
                        </variables>
                        <block type="on_ext" id="55@yN/Bd.4.Zl:.QX]zj" x="13" y="13">
                          <mutation items="1"></mutation>
                          <field name="CONDITION">ne</field>
                          <field name="ACK_CONDITION"></field>
                          <value name="OID0">
                            <shadow type="field_oid" id="W^r22S90au(LBao+qr~s">
                              <field name="oid">harmony.0.Wohnzimmer.activities.currentStatus</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="controls_if" id="BHRn[yZNyldRzla7iWi7">
                              <mutation elseif="2"></mutation>
                              <value name="IF0">
                                <block type="logic_operation" id="Cy=2[.wY.o=-3o{Oo+MP" inline="false">
                                  <field name="OP">AND</field>
                                  <value name="A">
                                    <block type="logic_compare" id="hSKY3oe-1s!pfEfae3vD">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="HV{kF[O[D7L0Uw_^opDj">
                                          <field name="ATTR">val</field>
                                          <field name="OID">harmony.0.Wohnzimmer.activities.currentStatus</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="Wx[1a#`-x24d#?+-W][b">
                                          <field name="NUM">2</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_operation" id="_u9l`L=T9k7a0;bs!X8T" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_compare" id="a.!@QQ{sxBt+f{s?0Ynw">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="get_value" id="4N*=@XZ|+)J/p)S*8T`1">
                                              <field name="ATTR">val</field>
                                              <field name="OID">hm-rpc.0.xxx.1.ILLUMINATION</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="Knld,wT8[?c4ib4aorSg">
                                              <field name="NUM">200</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="fi;P,[*~L,jFl.zw.2+4" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="logic_compare" id="w]v_(A7VwH*T+{GhgV6i">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="?-w!S,w;n]ioU*:s=Fn;">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">hue.0.HueBridge.Fernsehlampe_links.level</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="Rc%w:|(Y2[.JMxzq(r6?">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_operation" id="`3b*:m%B;)Z|%[yS.!X-" inline="false">
                                              <field name="OP">OR</field>
                                              <value name="A">
                                                <block type="logic_compare" id="q{+4/}zzLva741ZuTf7J">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="n.pAX/R5y7^/=7:|;?~6">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.level</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="DjAv!]}cE2zulm:[*D5E">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_operation" id="[_E6)bSe#YCc=c[3S!Fm" inline="false">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="logic_compare" id=";EgmvIi:2p5pf5Y5]viU">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="z/o5mW6qUdmql(d{sGle">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">hue.0.HueBridge.Sofalampe_links.level</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="math_number" id="fzLQ!Z)[u]B6SQaFvqES">
                                                          <field name="NUM">0</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="+m=dB;p*^A6gTu(VL1)T">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="gAINsa8p,s=h)hwe436q">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">hue.0.HueBridge.Sofalampe_rechts.level</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="math_number" id="Gri`mHRUp(p0|YYO[Cs#">
                                                          <field name="NUM">0</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="comment" id="L(G|BUY`q4*m[;Kop#r5">
                                  <field name="COMMENT">Fernsehlicht an wenn TV System Wohnzimmer an </field>
                                  <next>
                                    <block type="comment" id="vcK)W#DNxv?l2@OHVHRD">
                                      <field name="COMMENT">und noch kein Licht an war und es dunkel genug ist</field>
                                      <next>
                                        <block type="control" id="*M]#SFj-0gE[Q}k9M(l~">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">hue.0.HueBridge.Fernsehlampe_links.command</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="text" id="w8Q^kn0`oY}}^i,=!cIy">
                                              <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control" id="-6jM*M75?XM{5+2/5h|F">
                                              <mutation delay_input="false"></mutation>
                                              <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.command</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="text" id="/0QMpv*(8@RA2ga43kNj">
                                                  <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="QI.sI|sL5+1]S=g~G:-n">
                                                  <mutation delay_input="false"></mutation>
                                                  <field name="OID">hue.0.HueBridge.Sofalampe_links.command</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="text" id="Uh+t..^C2@N_cLtZjx8m">
                                                      <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="control" id="wPHLZaP[(AXjY+p/ks.,">
                                                      <mutation delay_input="false"></mutation>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_rechts.command</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="hz@4Qy1hsL:dc@7fz-^D">
                                                          <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                              <value name="IF1">
                                <block type="logic_operation" id="*QS[OYOlYL|UL!r,pN-_" inline="false">
                                  <field name="OP">AND</field>
                                  <value name="A">
                                    <block type="logic_compare" id="{sJ`xn(cC{Rxy!Y(#gOQ">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="#4)6(3gf+Z8hT+LB#/Z0">
                                          <field name="ATTR">val</field>
                                          <field name="OID">harmony.0.Wohnzimmer.activities.currentStatus</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="S{f1^l[~F4.UhNg#!U##">
                                          <field name="NUM">0</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_operation" id="!Kh?Z3bKZ~kx/[Q|w);S" inline="false">
                                      <field name="OP">OR</field>
                                      <value name="A">
                                        <block type="logic_compare" id="a*XG?2ZL4:7n8ku[46qA">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="_[iPE^c0}3~|LyJ_Rzg3">
                                              <field name="ATTR">val</field>
                                              <field name="OID">hue.0.HueBridge.Fernsehlampe_links.level</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="{Tm:rZ*]z%IUodz(v:rX">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="vAh9~lbOSL~0CPK6o1=Q" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="logic_compare" id="uIs5R:S%a8tb=io:R}s^">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="=ChE)civmMN?S%p%aJa]">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.level</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="gr8f6loc8K;uS]9*XyhX">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_operation" id="_jUMA^^Usj[CH7Nw:Fk=" inline="false">
                                              <field name="OP">OR</field>
                                              <value name="A">
                                                <block type="logic_compare" id="*RZKVr}|KhBlGX/GCct:">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="Lrk=MRvW8A9mXz1f%7uk">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_links.level</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="5E%D,}J|hwt#bXOSdb3#">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_compare" id="vyQ#n+cmy=bSoe3S/7uo">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="_E`NLb`RZ7+%FX48[q:[">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_rechts.level</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id=".DFD%qzxdR2@ecSUkjz7">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO1">
                                <block type="comment" id="6f(faEcLMPYAs`+ux6@N">
                                  <field name="COMMENT">Licht an wenn TV System aus und Licht aus war</field>
                                  <next>
                                    <block type="control" id="yc@W.m7PD?a7g94?t*Jy">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">hue.0.HueBridge.Fernsehlampe_links.command</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="text" id="BuiTI|]?j28p1Gg`s-xv">
                                          <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="control" id="-=Vbp0p|nMG#]):+)n:k">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.command</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="text" id="n//h:(n%^U4)+BaC*@4h">
                                              <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control" id="#9^Rv2WSOvd2dhQjPu-C">
                                              <mutation delay_input="false"></mutation>
                                              <field name="OID">hue.0.HueBridge.Sofalampe_links.command</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="text" id="luskD-gTYQ[!Z3qDcP.Y">
                                                  <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="be/%:s_?8art%:/q~k/~">
                                                  <mutation delay_input="false"></mutation>
                                                  <field name="OID">hue.0.HueBridge.Sofalampe_rechts.command</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="text" id="re@U5k.^HAqTq/VRo%v*">
                                                      <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="comment" id="F#J=Zu+m?KM;E4h.E:Pc">
                                                      <field name="COMMENT">danach Licht wieder aus</field>
                                                      <next>
                                                        <block type="timeouts_settimeout" id="C:l32sru.kR{[}n1/enQ">
                                                          <field name="NAME">timeout</field>
                                                          <field name="DELAY">5000</field>
                                                          <field name="UNIT">ms</field>
                                                          <statement name="STATEMENT">
                                                            <block type="control" id="`iYsh+k5FEf#Ms@d99Y(">
                                                              <mutation delay_input="false"></mutation>
                                                              <field name="OID">hue.0.HueBridge.Fernsehlampe_links.command</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="text" id="70gqv-YoRf_F0cH@)?}I">
                                                                  <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="control" id="!/?03pV_t`2d;CoL=g*2">
                                                                  <mutation delay_input="false"></mutation>
                                                                  <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.command</field>
                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                  <value name="VALUE">
                                                                    <block type="text" id=".9UTMP2[1TXIogR!7OAI">
                                                                      <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="control" id="uSf,-cjj0RWH^tAT}@lo">
                                                                      <mutation delay_input="false"></mutation>
                                                                      <field name="OID">hue.0.HueBridge.Sofalampe_links.command</field>
                                                                      <field name="WITH_DELAY">FALSE</field>
                                                                      <value name="VALUE">
                                                                        <block type="text" id="`DhCgiq~nB:?iqgVo?%l">
                                                                          <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="control" id="iqTSvh]]_KBO+;=ku%;w">
                                                                          <mutation delay_input="false"></mutation>
                                                                          <field name="OID">hue.0.HueBridge.Sofalampe_rechts.command</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE">
                                                                            <block type="text" id="nPC^_l^9Ih4nuhfAWGAX">
                                                                              <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                              <value name="IF2">
                                <block type="logic_operation" id="tAg_phQYRYip^cG#?(OR" inline="false">
                                  <field name="OP">AND</field>
                                  <value name="A">
                                    <block type="logic_compare" id="/aruWSn8RIcG9J0?`yWV">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="v0,W6cUK1#Bk;1N~QpSQ">
                                          <field name="ATTR">val</field>
                                          <field name="OID">harmony.0.Wohnzimmer.activities.currentStatus</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="}ULVAt.:zvRHd5dv[`aD">
                                          <field name="NUM">0</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_operation" id="@m*QiAvDN+U=}?B:+*Nw" inline="false">
                                      <field name="OP">OR</field>
                                      <value name="A">
                                        <block type="logic_compare" id="|mYVll}Lo+UC.*%^{HuU">
                                          <field name="OP">NEQ</field>
                                          <value name="A">
                                            <block type="get_value" id="56)bv-y-!+aEy22:/KGq">
                                              <field name="ATTR">val</field>
                                              <field name="OID">hue.0.HueBridge.Fernsehlampe_links.level</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="XDv5|uRF%vnnmv10o+O)">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="9EX`n+UF=QW)W!*NyFX@" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="logic_compare" id="Mlr[1j_jf1IzJ-Xb!G[m">
                                              <field name="OP">NEQ</field>
                                              <value name="A">
                                                <block type="get_value" id="2!{A?SxrbM_q3m_HLnay">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.level</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="z{[2b@6~5RBi8!rl_Y)p">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_operation" id="b_{g4Dn[ukOao*W=-FrQ" inline="false">
                                              <field name="OP">OR</field>
                                              <value name="A">
                                                <block type="logic_compare" id="WX6D,P-gd`+n6Zhv:7eH">
                                                  <field name="OP">NEQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="O/qmi#Hc0#QV.TfG^y-Z">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_links.level</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="/SR,1rS-(pLD=h,2@B!f">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_compare" id="--]7;yCkj#|ZBLK@bAyg">
                                                  <field name="OP">NEQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="KAqj]1m|{T19)aiYgPxN">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_rechts.level</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="yQ*y|NWXC=WZPJrV3jm+">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO2">
                                <block type="comment" id="h3v|PIu;kO|@gN~cL]9Q">
                                  <field name="COMMENT">Licht aus wenn TV System aus und Licht an war</field>
                                  <next>
                                    <block type="timeouts_settimeout" id="ha/tXwF5yEr`LtQX;FCh">
                                      <field name="NAME">timeout2</field>
                                      <field name="DELAY">5000</field>
                                      <field name="UNIT">ms</field>
                                      <statement name="STATEMENT">
                                        <block type="control" id="`Rwfd|9aS2kKzeuNiPq(">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">hue.0.HueBridge.Fernsehlampe_links.command</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="text" id="81ZY5Sx;[-r0guGKSeFo">
                                              <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control" id="CE}i#ML*~vI1,@q:UN},">
                                              <mutation delay_input="false"></mutation>
                                              <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.command</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="text" id="f?MyC;AeP;jKIpsWM~}=">
                                                  <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="NVF3jY5meN!@+zV:SNzY">
                                                  <mutation delay_input="false"></mutation>
                                                  <field name="OID">hue.0.HueBridge.Sofalampe_links.command</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="text" id="h-/g7g}aV9*o_O{[|wLe">
                                                      <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="control" id="MnzB*KJTwbKc5*zx!fh@">
                                                      <mutation delay_input="false"></mutation>
                                                      <field name="OID">hue.0.HueBridge.Sofalampe_rechts.command</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="GN8Z}A,!!=aA/|me[9}2">
                                                          <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </statement>
                          <next>
                            <block type="on_ext" id="g@SDiyxr,4+?}Gr*3/#M">
                              <mutation items="1"></mutation>
                              <field name="CONDITION">ne</field>
                              <field name="ACK_CONDITION"></field>
                              <value name="OID0">
                                <shadow type="field_oid" id="zW1m0qyRn?{.@5%@pVak">
                                  <field name="oid">harmony.0.Schlafzimmer.activities.currentStatus</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="S%,5qiJYrE#DJSLMIKwM">
                                  <mutation elseif="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_operation" id="n2?Mj`L%BYdiR2P^=]FW" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_compare" id="DYXyr|^pwo@?@Mp8i`T_">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="2?=*]=up9y,8%4lUPn]k">
                                              <field name="ATTR">val</field>
                                              <field name="OID">harmony.0.Schlafzimmer.activities.currentStatus</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="y*s-]YzReywhg*}97s5Q">
                                              <field name="NUM">2</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="P/_eH0.sjGumz^3Il8V+">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="get_value" id="hH+I6U.[W8/,qUaa={{v">
                                              <field name="ATTR">val</field>
                                              <field name="OID">hm-rpc.0.xxx.1.ILLUMINATION</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="Or~@[onoTLaR4~/:GHS^">
                                              <field name="NUM">200</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="comment" id="V1/St/{Wn6%gX}Y%ZK|d">
                                      <field name="COMMENT">TV System Schlafzimmer an</field>
                                      <next>
                                        <block type="control" id="qhG-#3MZHeD|C6QD.2F)">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">hue.0.HueBridge.Schlafzimmer.command</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="text" id="@U*rl~}x9=oZMypEZMDC">
                                              <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_compare" id="AQDENL.L~quzxlLwV0=1">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="s#v4Z9`o;5m5?3p:6QCh">
                                          <field name="ATTR">val</field>
                                          <field name="OID">harmony.0.Schlafzimmer.activities.currentStatus</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="V`a)a7TxIWO5Gn:Sm8zk">
                                          <field name="NUM">0</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="comment" id="Mp]5tgqQPS%@9~~v9K);">
                                      <field name="COMMENT">TV System Schlafzimmer aus</field>
                                      <next>
                                        <block type="control" id="a^U}1m82x}`{gDPNIeC#">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">hue.0.HueBridge.Schlafzimmer.command</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="text" id="LNg9F|{*%O!S^EbvOM|A">
                                              <field name="TEXT">{"on":false,"transitiontime":100}</field>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </xml>
                      

                      1 Reply Last reply Reply Quote 0
                      • dslraser
                        dslraser Forum Testing Most Active @smartmood last edited by dslraser

                        @smartmood
                        Harmony activity Schaltung
                        Hier wird ein Datenpunkt als Button erstellt und mit dem SmartNamen Smart in iot eingefügt.
                        Dieser Datenpunkt wird nach dem ersten Blockly Start erstellt. Anschliessend dieses "Gerät" in der Amazon App suchen, oder über den Sprachbefehl "Alexa, suche neue Geräte" suchen lassen. Alexa sollte Dir melden das sie es gefunden hat. Anschließend noch zwei kleine Routinen in der Amazon App einrichten, die diesen Datenpunkt schalten. Bei mir steht in der Routine "Alexa, Fernseher an" , und in der zweiten "Alexa, Fernseher aus". Benutzt wird der gleiche Datenpunkt. Bei Dir könnte da stehen "Alexa, Smart an" , oder "Alexa, Smart aus".
                        Im Foto bei mir heißen die Datenpunkte anders, als das für Dich erstellte.
                        Bein eigenes Blockly enthät noch fünf weitere activitys nach dem gleichen Schema und jewels einem eigenen Datenpunkt.
                        Läuft bei mir schon seit Monaten so ohne Probleme.

                        PS: mit dem Weg über die activitys geht auch das Licht an/aus wenn Du die Fernbedienung benutzt und auch wenn Du per Alexa schaltest.

                        <xml xmlns="http://www.w3.org/1999/xhtml">
                          <variables>
                            <variable type="undefined" id="timeout1">timeout1</variable>
                          </variables>
                          <block type="procedures_defcustomnoreturn" id="rAN7cz:B|^k5OZ!W_=$h" x="13" y="13">
                            <mutation statements="false"></mutation>
                            <field name="NAME">datenpunkt_anlegen</field>
                            <field name="SCRIPT">Ly9EYXRlbnB1bmt0IEFrZXhhIGVyc3RlbGxlbgpjcmVhdGVTdGF0ZSgiRWlnZW5lX0RhdGVucHVua3RlLkhhcm1vbnkuVFZfU3lzdGVtLlNtYXJ0IiwgewogICAgbmFtZTogJ1NtYXJ0X0hhcm1vbnknLCAKICAgIHJvbGU6ICdidXR0b24nLAogICAgcmVhZDogIGZhbHNlLCAKICAgIHdyaXRlOiB0cnVlLAogICAgInNtYXJ0TmFtZSI6IHsKICAgICJkZSI6ICJTbWFydCIsCiAgICAic21hcnRUeXBlIjogIlNXSVRDSCIKfQp9KTs=</field>
                            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                          </block>
                          <block type="comment" id="pBH=Tk{]to/`%z_D{{EU" x="13" y="63">
                            <field name="COMMENT">Datenpunkt Fernsehen (bei Dir Smart) anlegen</field>
                            <next>
                              <block type="procedures_callcustomnoreturn" id="/B^U[r#S8LzyM.I(Ji]M">
                                <mutation name="datenpunkt_anlegen"></mutation>
                                <next>
                                  <block type="on_ext" id="55@yN/Bd.4.Zl:.QX]zj">
                                    <mutation items="1"></mutation>
                                    <field name="CONDITION">any</field>
                                    <field name="ACK_CONDITION"></field>
                                    <value name="OID0">
                                      <shadow type="field_oid" id="W^r22S90au(LBao+qr~s">
                                        <field name="oid">javascript.0.Eigene_Datenpunkte.Harmony.TV_System.Smart</field>
                                      </shadow>
                                    </value>
                                    <statement name="STATEMENT">
                                      <block type="timeouts_settimeout" id="(]dhU:8/iGFA[ZH?5KL@">
                                        <field name="NAME">timeout1</field>
                                        <field name="DELAY">1000</field>
                                        <field name="UNIT">ms</field>
                                        <statement name="STATEMENT">
                                          <block type="comment" id=".aEW9(n3G.Z_qvjy3!UK">
                                            <field name="COMMENT">ECHO Wohnzimmer oder Küche dürfen schalten</field>
                                            <next>
                                              <block type="comment" id="9:(^!Tb*8*z*U]GsO.8R">
                                                <field name="COMMENT">Alexa2 Adapter History Datenpunkt</field>
                                                <next>
                                                  <block type="comment" id="VPrYSV7K{je45r=4_7-L">
                                                    <field name="COMMENT">Name vom ECHO</field>
                                                    <next>
                                                      <block type="controls_if" id="BHRn[yZNyldRzla7iWi7">
                                                        <mutation elseif="1"></mutation>
                                                        <value name="IF0">
                                                          <block type="logic_operation" id="LUs#DcSgw-m~^}OO!CTo" inline="false">
                                                            <field name="OP">AND</field>
                                                            <value name="A">
                                                              <block type="logic_operation" id="t_uf^Z1g5K:K3`/DEeeW" inline="false">
                                                                <field name="OP">OR</field>
                                                                <value name="A">
                                                                  <block type="logic_compare" id="!HExJnj:}`TnPTg=87JT">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="7O0JQ=H@DpeTB/OM|`/1">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.name</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="cr@)gj~U2qcVJueNr2K`">
                                                                        <field name="TEXT">Wohnzimmer</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="logic_compare" id="m0lU,k?+Bz0*p{Su,)=(">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="lW[lgTZfBH!CdaoOA)TS">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.name</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="S.`%ZSEPn{;S?.DvF?w#">
                                                                        <field name="TEXT">Küche</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <block type="logic_operation" id="2:q[rypmY[pH6GsSmB;B" inline="false">
                                                                <field name="OP">OR</field>
                                                                <value name="A">
                                                                  <block type="logic_compare" id="VV+.K`ah//lUVs7Bz0f.">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="5^0m,o2.)k;B9QejP/=}">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.summary</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="Zn:9JNQ:15[Hb2PS0i:3">
                                                                        <field name="TEXT">fernseher an</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="logic_compare" id="u+3[P|QA+;.zXsxMB|V=">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="CCDWY%vI.yN6Z3e%=WHN">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.summary</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="cggzfs.8]]wpi8mNIz}~">
                                                                        <field name="TEXT">alexa fernseher an</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <statement name="DO0">
                                                          <block type="comment" id="]ihiXM{AQ1n4Zd@JWyzJ">
                                                            <field name="COMMENT">Fernsehen (bei Dir Smart)Wohnzimmer an</field>
                                                            <next>
                                                              <block type="comment" id="tljJ5yz[,4FGF/R[R3(M">
                                                                <field name="COMMENT">hier die Harmony activity auswählen</field>
                                                                <next>
                                                                  <block type="control" id="5+w0Es@A]~C=EdT+7*5K">
                                                                    <mutation delay_input="false"></mutation>
                                                                    <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_number" id="e[U/{.d/3`92kMB`Pd%L">
                                                                        <field name="NUM">1</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                        <value name="IF1">
                                                          <block type="logic_operation" id="Td6TllRMn}DC|=Z^s|T?" inline="false">
                                                            <field name="OP">AND</field>
                                                            <value name="A">
                                                              <block type="logic_operation" id="RV%xb@9/mfwP{+:=.PjH" inline="false">
                                                                <field name="OP">OR</field>
                                                                <value name="A">
                                                                  <block type="logic_compare" id="E]17HsUZB`ATz68OVQPv">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="XqsA]aCdQeUo{hI=[go%">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.name</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="O#Bq1Nrh=FsWBqJ|}}.k">
                                                                        <field name="TEXT">Wohnzimmer</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="logic_compare" id="Kx;p;PF~:w2%j#8wTZav">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="6t`Df^kjj`Si|`l}w.by">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.name</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="DvG]p24~^cE*NWoX3XuU">
                                                                        <field name="TEXT">Küche</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <block type="logic_operation" id="J;5BMEK[%w#]41x3dK2a" inline="false">
                                                                <field name="OP">OR</field>
                                                                <value name="A">
                                                                  <block type="logic_compare" id="NCjzhOn2.uPU{hT3kb/b">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="wEe!D;N@1oQ-FDuGcLZD">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.summary</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="8L-YrEOHYfY0`N_ExT1T">
                                                                        <field name="TEXT">fernseher aus</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="logic_compare" id="mdhE_]!Na9UVdjG-`^F3">
                                                                    <field name="OP">EQ</field>
                                                                    <value name="A">
                                                                      <block type="get_value" id="6c~s[Y~qX4D`!eh9Y?om">
                                                                        <field name="ATTR">val</field>
                                                                        <field name="OID">alexa2.0.History.summary</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="text" id="DfGy2;%ztW*laW+~}l/P">
                                                                        <field name="TEXT">alexa fernseher aus</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <statement name="DO1">
                                                          <block type="comment" id="C!d.+KxPoVc}6PEb?lc5">
                                                            <field name="COMMENT">Fernsehen (bei Dir Smart)Wohnzimmer aus</field>
                                                            <next>
                                                              <block type="control" id="!/GcSgT,Cg!f#l+E1UF/">
                                                                <mutation delay_input="false"></mutation>
                                                                <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_number" id="AbA?w_wnjSn%dTFjaZe1">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </xml>
                        

                        iot adapter-smart-name.png

                        Bildschirmfoto 2019-05-27 um 16.30.11.png

                        Fernseher an.jpg

                        Fernseher aus.jpg

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

                          @dslraser
                          Danke auch dir für deinen Blockly Import 😄
                          Leider habe ich keinen Lichtsensor und muss es mit der Astrofunktion lösen.

                          @Kuddel

                          So jetzt sitze ich daheim vor dem Rechner und habe es wenigstens schonmal geschafft deine "Bausteine" in mein Blockly zu importieren... und stelle fest gar nicht so einfach 😛
                          Könntest du mir Step by Step sagen an welchen Bausteinen ich jetzt genau etwas anpassen muss? oder wenn ich richtig verstehe, muss ich da erstmal gar nichts anpassen?
                          Aber an den mache (zum Schluss) muss ich jetzt noch einen Baustein setzen: die Hue Play Bars auswählen und auf an stellen, richtig? Mit welchem Baustein mache ich das denn?

                          dslraser 1 Reply Last reply Reply Quote 0
                          • dslraser
                            dslraser Forum Testing Most Active @smartmood last edited by

                            @smartmood
                            Du kannst mein Blockly trotzdem verwenden, wenn Du willst. Du musst nur den Lichtsensorbaustein mit der oben genannten Astrofunktion tauschen.
                            HUE kannst Du über mehrere Wege schalten. Entweder über Deine Szenen, die musst Du aber zuvor mit einem anderem Script auslesen, sonst stehen die nicht zur Verfügung. Oder Du schaltest den on Datenpunkt, oder für eine bestimmte Helligkeit level.
                            Willst Du bestimmte Farben und / oder langsames "andimmen" und "ausdimmen" schalten, dann so wie bei mir über command. (über command kannst Du alles selbst bestimmen)

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

                              @dslraser
                              Achso ok gut zu wissen, danke dir 😄
                              Das mit command bzw. selbst bestimmen hört sich gut an, ist aber denke ich für den Anfang erstmal zu kompliziert für mich 😉 aber ich werde sicher darauf zurück kommen...

                              Zu dem Blockly von @Kuddel

                              würde das so hinkommen?

                              b9191d69-4e9e-4b72-9f39-726cc7e807c1-image.png

                              Habe die beiden steuere Philips .... Bausteine hinzugefügt, ich probiere es auch gleich mal aus - die Hue Play Bars dürften ja zu dieser Uhrzeit dann nicht mit angehen...

                              dslraser 1 Reply Last reply Reply Quote 0
                              • dslraser
                                dslraser Forum Testing Most Active @smartmood last edited by dslraser

                                @smartmood
                                da fehlen noch zwei wahr...
                                steuere hue.on....mit....

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

                                  @dslraser

                                  Habe das wahr mit hinzugefügt, die Lichter gingen jetzt beim testen aber mit an... habe mal den Datenpunkt auf Entertainment Bereich TV on geändert und auf mit wahr gesetzt, da gingen die Lichter jetzt auch mit an.
                                  (Habe das Skript gespeichert und aktiviert)

                                  J 1 Reply Last reply Reply Quote 0
                                  • J
                                    Jan1 @smartmood last edited by

                                    @smartmood
                                    das liegt daran, dass Deine Astrozeiten über der Datumsgrenze liegen, Untergang ist heute und Aufgang morgen, wird so nicht funktionieren.

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

                                      @Jan1

                                      ok und wie genau kann ich das ändern, sodass es funktioniert? 😄

                                      J 1 Reply Last reply Reply Quote 0
                                      • J
                                        Jan1 @smartmood last edited by

                                        @smartmood
                                        so wie im Beispiel die Zeiten ändern und, also zuerst Aufgang und dann Untergang. Wenn das die falsche Zeispanne sein sollte, einfach das ganze auf "ist nicht zwischen" umstellen. Die Astrozeiten müssen immer im selben Tag liegen.

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

                                          @Jan1
                                          Habe jetzt diese beiden Varianten probiert und es klappt auch nicht :

                                          8a9ed1ab-36a9-47ac-8ded-31d1dd167a63-image.png

                                          fa09489b-b994-469c-99fb-0f7907b72632-image.png

                                          Zusätzlich habe ich noch in dem Grünen Baustein das Wort "Smart" auf "Smart_TV" geändert, denn ich sage zwar: "Alexa, Smart an" - jedoch heißt die Activity. "Smart_TV"

                                          So steht es auch unter den Objekten bei Harmony unter activities.currentActivity (Wert):

                                          e617fc9f-db7f-48e2-bc7d-b6e0238d5829-image.png

                                          Das ist doch richtig oder?

                                          J dslraser 2 Replies Last reply Reply Quote 0
                                          • J
                                            Jan1 @smartmood last edited by Jan1

                                            @smartmood
                                            könnte ein Timing Problem sein, sprich der DP currentActivity ändert sich zwar und der Triger löst aus, aber der DP steht noch nicht auf "Smart_TV". Kann man durch das Verwenden von "Wert" lösen, da sich das direkt auf das Objekt des Trigerv bezieht und nicht extra eingelesen werden muss, oder einfach ein Timeout drum rum baut.

                                            so in etwa, wobei ich mir selber nie sicher bin wann und wo der Stop des Timeout hin muss und überhaupt benötigt wird.
                                            ea6052d0-6f47-49a5-a696-b97cf48b5a84-grafik.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            885
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            8
                                            107
                                            6996
                                            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