Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Beleuchtung schalten mit yahka und Apple Watch und blockly

    NEWS

    • Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    Beleuchtung schalten mit yahka und Apple Watch und blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dos1973 @Asgothian last edited by

      @Asgothian
      aber woher kommt denn der "wert" also gemütlich, sehr hell..??

      Asgothian 2 Replies Last reply Reply Quote 0
      • Asgothian
        Asgothian Developer @dos1973 last edited by

        @dos1973 der kommt aus dem Namen des Datenpunktes der von Yahka getriggert wurde.

        1 Reply Last reply Reply Quote 0
        • Asgothian
          Asgothian Developer @dos1973 last edited by

          @dos1973 wenn du morgen vormittag zeit hast können wir versuchen das ganze parallel mit any desk/ teamspeak / discord fertig zu stellen.

          Ist vielleicht eine Idee.

          A.

          D 1 Reply Last reply Reply Quote 0
          • D
            dos1973 @Asgothian last edited by dos1973

            @Asgothian
            jo klar, ich fummel trotzdem nochmals etwas...

            da muss doch das von oben rein - also die ersten 3 Zeilen, oder?

            Bildschirmfoto 2020-09-19 um 20.52.56.png

            Edit: nee, das ist glaube ich Quatsch

            Asgothian 1 Reply Last reply Reply Quote 0
            • Asgothian
              Asgothian Developer @dos1973 last edited by

              @dos1973

              Du musst deine 3 Trigger Objekte unten eintragen (siehe die beiden Kreise)

              1600541621131-bildschirmfoto-2020-09-19-um-20.52.56.png

              In den Texten steht dann z.Bsp. "Wohnung.Wohnen.yahka.sehr_hell" - zeilenweise passend zu den Objekten die davor gesetzt werden

              D 1 Reply Last reply Reply Quote 0
              • D
                dos1973 @Asgothian last edited by

                @Asgothian
                und das was ich eigenkreits hatte
                folder.item
                folder.Springtest

                das bleibt so?

                Asgothian 1 Reply Last reply Reply Quote 0
                • Asgothian
                  Asgothian Developer @dos1973 last edited by

                  @dos1973 sagte in Beleuchtung schalten mit yahka und Apple Watch und blockly:

                  @Asgothian
                  und das was ich eigenkreits hatte
                  folder.item
                  folder.Springtest

                  das bleibt so?

                  Nein, da muss das rein was ich da beschrieben habe:

                  In den Texten steht dann z.Bsp. "Wohnung.Wohnen.yahka.sehr_hell" - zeilenweise passend zu den Objekten die davor gesetzt werden

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dos1973 @Asgothian last edited by

                    @Asgothian
                    ich dachte ja Anfangs ich verstehe ein bißchen.... Bahnhof verstehe ich 🙂

                    Asgothian 1 Reply Last reply Reply Quote 0
                    • Asgothian
                      Asgothian Developer @dos1973 last edited by

                      @dos1973 broken.txt 1600541621131-bildschirmfoto-2020-09-19-um-20.52.56.png

                      Wenn bei A das Objekt "0_userdata.0.Wohnung.Wohnen.yahka.sehr_hell" steht, dann muss bei B "Wohnung.Wohnen.yahka.sehr_hell" stehen.

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        dos1973 @Asgothian last edited by

                        @Asgothian

                        so schaut's jetzt aus

                        Bildschirmfoto 2020-09-19 um 21.07.36.png

                        Asgothian 1 Reply Last reply Reply Quote 0
                        • Asgothian
                          Asgothian Developer @dos1973 last edited by

                          @dos1973
                          so sollte es gehen

                          D 1 Reply Last reply Reply Quote 0
                          • D
                            dos1973 @Asgothian last edited by dos1973

                            @Asgothian

                            nee, klappt nicht.
                            ich versteh leider immer noch nicht - wo mein DP gefüllt wird mit der Variable aus Name

                            D Asgothian 2 Replies Last reply Reply Quote 0
                            • D
                              dos1973 @dos1973 last edited by

                              so sehen meine DP aus.
                              Der DP Lichtszene löst in Abhängigkeit des Wertes aus. also sehr_hell, gemütlich etc

                              Bildschirmfoto 2020-09-19 um 21.11.07.png

                              1 Reply Last reply Reply Quote 0
                              • Asgothian
                                Asgothian Developer @dos1973 last edited by

                                @dos1973
                                dann sollten wir das morgen machen - ich kann jetzt erstmal nicht weiter im Detail schauen, sorry.

                                D 1 Reply Last reply Reply Quote 0
                                • D
                                  dos1973 @Asgothian last edited by

                                  @Asgothian
                                  kein Problem, ich muss sowieso jetzt auch los.
                                  Aber ich versuche später noch etwas. Danke bis hierhin...

                                  Würde mich freuen wenn du morgen nochmals Zeit hast

                                  M Asgothian 2 Replies Last reply Reply Quote 0
                                  • M
                                    MCU @dos1973 last edited by

                                    @dos1973
                                    Mein Vorschlag wäre dieser:
                                    Ist leider lang, da ich nicht die DP angelegt habe bei mir.
                                    Du kannst ja die kleine Variante zum DP schreiben nehmen.

                                    b3f85caf-3dae-4188-81f9-2f5c93d5005f-image.png

                                    96b7a33f-4a13-48f5-a4d0-a976515ac117-image.png

                                    b3edc5bf-ce66-4413-98e0-067d1e08283a-image.png

                                    Asgothian 1 Reply Last reply Reply Quote 0
                                    • Asgothian
                                      Asgothian Developer @dos1973 last edited by Asgothian

                                      @dos1973
                                      Es war noch ein Fehler in dem Blockly das ich Dir gebaut hab. Nun geht es:
                                      (Code direkt für dich hinter dem Spoiler)

                                      Screen Shot 2020-09-20 at 10.13.24 .png

                                      <xml xmlns="https://developers.google.com/blockly/xml">
                                       <variables>
                                         <variable id="DkG.haQ^xBwX+4Nb;0.,">Szene</variable>
                                       </variables>
                                       <block type="on_ext" id="/QdMMfPZc3|;Af3.qC^6" x="-387" y="363">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation>
                                         <field name="CONDITION">ne</field>
                                         <field name="ACK_CONDITION"></field>
                                         <value name="OID0">
                                           <shadow type="field_oid" id="mhEf[$()|j,(;y9%3E`1">
                                             <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.gemuetlich</field>
                                           </shadow>
                                         </value>
                                         <value name="OID1">
                                           <shadow type="field_oid" id="_oOH.lh@.G@d8D^J{zD-">
                                             <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.sehr_hell</field>
                                           </shadow>
                                         </value>
                                         <value name="OID2">
                                           <shadow type="field_oid" id="jDeh%(SB*aES`(}:}byK">
                                             <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.tv</field>
                                           </shadow>
                                         </value>
                                         <statement name="STATEMENT">
                                           <block type="controls_if" id="-(.q{.5{!E;Kr(tP~E^}">
                                             <value name="IF0">
                                               <block type="logic_compare" id="]sXenYqA^n4,cLe7X}x;">
                                                 <field name="OP">NEQ</field>
                                                 <value name="A">
                                                   <block type="on_source" id="TJ|Y(lCm;Am4*Hq;Ilj{">
                                                     <field name="ATTR">state.from</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="text" id="?_u=_b(-Q)l-j{SRqx{A">
                                                     <field name="TEXT">system.adapter.javascript.0</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <statement name="DO0">
                                               <block type="variables_set" id="6nLZbGN!MJjnO(NyD#W?">
                                                 <field name="VAR" id="DkG.haQ^xBwX+4Nb;0.,">Szene</field>
                                                 <value name="VALUE">
                                                   <block type="text_getSubstring" id="}wOMredui0yBDIEw236[" inline="false">
                                                     <mutation at1="true" at2="true"></mutation>
                                                     <field name="WHERE1">FROM_START</field>
                                                     <field name="WHERE2">FROM_START</field>
                                                     <value name="STRING">
                                                       <block type="on_source" id="PJoTv.LznZ%jnUFKKIb:">
                                                         <field name="ATTR">common.name</field>
                                                       </block>
                                                     </value>
                                                     <value name="AT1">
                                                       <block type="math_arithmetic" id="[.a4^[(/WZc0c415+a1_" inline="false">
                                                         <field name="OP">ADD</field>
                                                         <value name="A">
                                                           <shadow type="math_number" id=".QOJ2?e4R$jb|ahy8Mrj">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                           <block type="text_indexOf" id="SUu6)4OSG,Ew:I2TWe,i">
                                                             <field name="END">LAST</field>
                                                             <value name="VALUE">
                                                               <block type="on_source" id="Of)pbCjV=.a`;Q[JeAWk">
                                                                 <field name="ATTR">common.name</field>
                                                               </block>
                                                             </value>
                                                             <value name="FIND">
                                                               <shadow type="text" id="]2Ah9ao}_cDfqqP6;%-X">
                                                                 <field name="TEXT">.</field>
                                                               </shadow>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <shadow type="math_number" id="}XZD=0`ES1[`%XHT6lG9">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="AT2">
                                                       <block type="text_length" id="{gw7,iq@afE|5$248nF9">
                                                         <value name="VALUE">
                                                           <shadow type="text" id="A?/{#FyQ(dK^E?c77r3t">
                                                             <field name="TEXT">abc</field>
                                                           </shadow>
                                                           <block type="on_source" id="Z1fz?xfY5F[(h{}l2d1y">
                                                             <field name="ATTR">common.name</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="controls_if" id="Q%P[9K8d.j[vZGgmuOPk">
                                                     <mutation else="1"></mutation>
                                                     <value name="IF0">
                                                       <block type="on_source" id="@(bQRh,;c!*givx#YeYx">
                                                         <field name="ATTR">state.val</field>
                                                       </block>
                                                     </value>
                                                     <statement name="DO0">
                                                       <block type="control_ex" id="Skd+Z;P1;Tg?pQf7LuP)" inline="true">
                                                         <field name="TYPE">false</field>
                                                         <field name="CLEAR_RUNNING">FALSE</field>
                                                         <value name="OID">
                                                           <shadow type="field_oid" id="E(ab:cIWw(_s5{)p=0K-">
                                                             <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.gemuetlich</field>
                                                           </shadow>
                                                         </value>
                                                         <value name="VALUE">
                                                           <shadow type="logic_boolean" id=";8}1H}|+zFT|3tQ6WY/#">
                                                             <field name="BOOL">TRUE</field>
                                                           </shadow>
                                                           <block type="logic_compare" id="xzbjz$)ETjwuSbXd)Br-">
                                                             <field name="OP">EQ</field>
                                                             <value name="A">
                                                               <block type="text" id="lqdK$h=)%b?VP0:a/d*)">
                                                                 <field name="TEXT">gemuetlich</field>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="variables_get" id="KFSGvIXFYoT,JU9kr;GD">
                                                                 <field name="VAR" id="DkG.haQ^xBwX+4Nb;0.,">Szene</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <value name="DELAY_MS">
                                                           <shadow type="math_number" id="a7LGgB;$0vv]3zoKzmVH">
                                                             <field name="NUM">0</field>
                                                           </shadow>
                                                         </value>
                                                         <next>
                                                           <block type="control_ex" id="kk1kTJNMDzW#zRrMSwI-" inline="true">
                                                             <field name="TYPE">false</field>
                                                             <field name="CLEAR_RUNNING">FALSE</field>
                                                             <value name="OID">
                                                               <shadow type="field_oid" id="IBjR)U}=B@m|Wdoth}55">
                                                                 <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.sehr_hell</field>
                                                               </shadow>
                                                             </value>
                                                             <value name="VALUE">
                                                               <shadow type="logic_boolean">
                                                                 <field name="BOOL">TRUE</field>
                                                               </shadow>
                                                               <block type="logic_compare" id="1W)-*IZWCHKHZ.TOw*sO">
                                                                 <field name="OP">EQ</field>
                                                                 <value name="A">
                                                                   <block type="text" id="3;8q;#)gM.HOEab9*1G@">
                                                                     <field name="TEXT">sehr_hell</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="B">
                                                                   <block type="variables_get" id="Ok^#wsXqhGGm{R!IxREm">
                                                                     <field name="VAR" id="DkG.haQ^xBwX+4Nb;0.,">Szene</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <value name="DELAY_MS">
                                                               <shadow type="math_number" id="bo+-f]l~`q6=mi?9P=t:">
                                                                 <field name="NUM">0</field>
                                                               </shadow>
                                                             </value>
                                                             <next>
                                                               <block type="control_ex" id=":V@lPt#WR%W[8F`AR)o6" inline="true">
                                                                 <field name="TYPE">false</field>
                                                                 <field name="CLEAR_RUNNING">FALSE</field>
                                                                 <value name="OID">
                                                                   <shadow type="field_oid" id="PQ-E;9l/#@HAUX(l_rI#">
                                                                     <field name="oid">0_userdata.0.Wohnung.Wohnen.yahka.tv</field>
                                                                   </shadow>
                                                                 </value>
                                                                 <value name="VALUE">
                                                                   <shadow type="logic_boolean">
                                                                     <field name="BOOL">TRUE</field>
                                                                   </shadow>
                                                                   <block type="logic_compare" id=";^DTUI$X-gnU7$n0-zDG">
                                                                     <field name="OP">EQ</field>
                                                                     <value name="A">
                                                                       <block type="text" id="H^S*6?oj`hhnR@gnREDJ">
                                                                         <field name="TEXT">tv</field>
                                                                       </block>
                                                                     </value>
                                                                     <value name="B">
                                                                       <block type="variables_get" id="}T3mqSF`//~QG#4~M9;Y">
                                                                         <field name="VAR" id="DkG.haQ^xBwX+4Nb;0.,">Szene</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                                 <value name="DELAY_MS">
                                                                   <shadow type="math_number" id="a(rA@B1$kChWfY-$lvh5">
                                                                     <field name="NUM">0</field>
                                                                   </shadow>
                                                                 </value>
                                                                 <next>
                                                                   <block type="control" id="5)tsNYx|DW9.@[G4rb3v">
                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                     <field name="OID">0_userdata.0.Wohnung.Wohnen.Lichtszenen</field>
                                                                     <field name="WITH_DELAY">FALSE</field>
                                                                     <value name="VALUE">
                                                                       <block type="variables_get" id="%`#xwTQIQU58[C!Y{_LU">
                                                                         <field name="VAR" id="DkG.haQ^xBwX+4Nb;0.,">Szene</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </statement>
                                                     <statement name="ELSE">
                                                       <block type="control" id="j3Yue4aJj1WZcHs}Y}Y8">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                         <field name="OID">0_userdata.0.Wohnung.Wohnen.Lichtszenen</field>
                                                         <field name="WITH_DELAY">FALSE</field>
                                                         <value name="VALUE">
                                                           <block type="text" id=":Qp74`rFS+q|8HPv+/g`">
                                                             <field name="TEXT">aus</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </statement>
                                                   </block>
                                                 </next>
                                               </block>
                                             </statement>
                                           </block>
                                         </statement>
                                       </block>
                                      </xml>
                                      

                                      Nachtrag: das Skript hat eine Besonderheit: Wenn du von einem Skript aus die Datenpunkte im Baum "0_userdata.0.Wohnung.Wohnen.yahka" veränderst dann wird nichts passieren. Um die Szene per Skript anzupassen musst du direkt "0_userdata.0.Wohnung.Wohnen.Lichtzene" verändern.

                                      A

                                      D 1 Reply Last reply Reply Quote 1
                                      • Asgothian
                                        Asgothian Developer @MCU last edited by

                                        @MCU
                                        So kann man es auch machen. Es ist aber verhältnismässig lang und Unhandlich, und holt die Datenpunkte öfter.

                                        Bei 3 Szenen vielleicht noch akzeptabel, aber was wenn der TE noch weitere Szenen integrieren will ?

                                        A.

                                        D 1 Reply Last reply Reply Quote 0
                                        • D
                                          dos1973 @Asgothian last edited by

                                          @Asgothian

                                          PERFEKT!
                                          Läuft 1 A

                                          Herzlichen Dank für deine Hilfe

                                          Asgothian 1 Reply Last reply Reply Quote 0
                                          • Asgothian
                                            Asgothian Developer @dos1973 last edited by

                                            @dos1973 sagte in Beleuchtung schalten mit yahka und Apple Watch und blockly:

                                            Läuft 1 A

                                            Fein. Ich hoffe in der angepassten Version wird auch klar wo der Name der Szene her kommt 🙂

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            1.1k
                                            Online

                                            32.3k
                                            Users

                                            81.0k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            30
                                            1646
                                            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