Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Bewegungsmelder mit Hue und Sonos

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Bewegungsmelder mit Hue und Sonos

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

      @marphDE:

      Zu deinem Änderungsvorschlag hätte ich eine Frage: Wo muss ich denn "Musik_durch_BWM", "Licht_durch_BWM" "Licht und Musik aus" erzeugen? ` Wenn Du eine Variable in dein Script einbaust, dann kannst Du den Namen der Variablen ändern (klick auf den Pfeil/Dropdown neben dem Variablennamen), das habe ich hier getan damit Du die beiden Variablen besser unterscheiden kannst.

      Den Namen des Timers änderst Du in dem Du einfach auf das Wort "timeout" klickst und überschreibst.

      Auch hier habe ich die Änderung der Übersichtlichkeit halber vorgenommen.

      1 Reply Last reply Reply Quote 0
      • O
        Okidoki3009 last edited by

        hallo,

        ich habe das script auch mal versucht.

        Danke dafür!

        Es läuft aber leider noch nicht rund, die Box geht mal an und mal aus.

        Das Licht scheint zu funktionieren.

        Ich verwende den Bewegungsmelder von Xiaomi , der schaltet auf true und false.

        Vielleicht kann mir ja jemand helfen.

        Danke
        3673_bad.png

        1 Reply Last reply Reply Quote 0
        • M
          marphDE last edited by

          habe das jetzt script jetzt mal so umgebaut, leider geht nun überhaupt kein Licht/Radio an.

          irgendwas mache ich doch hier falsch.

          4060_bildschirmfoto_2018-01-20_um_19.02.56.png
          4060_bildschirmfoto_2018-01-20_um_19.03.14.png

          Export:

          ! ````
          <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="~_jTRd2uEjv6BtxPG%fx" x="-13" y="13"><mutation items="1"></mutation>
          <field name="CONDITION">any</field>

          <value name="OID0"><shadow type="field_oid" id="g54nI7K}1QilT[uDuw|^"><field name="oid">zwave.0.NODE2.ALARM.Burglar_1</field></shadow></value> 
          <statement name="STATEMENT"><block type="controls_if" id="mR`+!yPdR6x#HZIUOGB]"><value name="IF0"><block type="logic_compare" id=",(1+%Q#FS=,;J[.8MUf)"><field name="OP">GT</field>
                  <value name="A"><block type="get_value" id="}NMjHF,YZy#H?JmqV/{s"><field name="ATTR">val</field>
                      <field name="OID">zwave.0.NODE2.ALARM.Burglar_1</field></block></value> 
                  <value name="B"><block type="math_number" id="EqNu{/|gvV#BjB6sq2!U"><field name="NUM">0</field></block></value></block></value> 
              <statement name="DO0"><block type="timeouts_cleartimeout" id="9!el-]bKQLrumd*D]b1:"><field name="NAME">Licht_und_Musik_aus</field>
                  <next><block type="controls_if" id="r(n(?1ooC@}*dg.hb.^("><value name="IF0"><block type="logic_operation" id="8x/85[6ht1Wp?=C^Bbb]"><field name="OP">AND</field>
                          <value name="A"><block type="time_compare" id="FXx1B]c4%R8#[h:Q+qCt"><mutation end_time="false"></mutation>
                              <field name="OPTION">>=</field>
                              <field name="START_TIME">15:35</field></block></value> 
                          <value name="B"><block type="time_compare" id="W0L,nK%HQ+*:y]Pkw(E)"><mutation end_time="false"></mutation>
                              <field name="OPTION"><</field>
                              <field name="START_TIME">22:00</field></block></value></block></value> 
                      <statement name="DO0"><block type="controls_if" id="|6yqMrq{ljIAzuAyMXT2"><value name="IF0"><block type="logic_compare" id="d||!UL/+[`_X6B#y[t(~"><field name="OP">EQ</field>
                              <value name="A"><block type="variables_get" id="=MB+UltFU@,Q0Qlq:Jm["><field name="VAR">Musik_durch_BWM</field></block></value> 
                              <value name="B"><block type="logic_operation" id="OaMK()A~D+?r?,ujry;V"><field name="OP">OR</field>
                                  <value name="A"><block type="logic_boolean" id="{+U?[)h0Lyi)-o0MfUk~"><field name="BOOL">TRUE</field></block></value> 
                                  <value name="B"><block type="logic_compare" id=";:;uyP_6||mFe-),la/0"><field name="OP">NEQ</field>
                                      <value name="A"><block type="get_value" id="tnX,zOR3cMUH:~@pn3LU"><field name="ATTR">val</field>
                                          <field name="OID">sonos.0.root.10_0_0_61.state</field></block></value> 
                                      <value name="B"><block type="text" id="DEb[(D8PC}S8E8Zjj!NV"><field name="TEXT">play</field></block></value></block></value></block></value></block></value> 
                          <statement name="DO0"><block type="controls_if" id="W4.xuE(zh(hpoO3wIhgN"><value name="IF0"><block type="logic_compare" id="X/]m[y9y9(Rk^{hELL2V"><field name="OP">EQ</field>
                                  <value name="A"><block type="variables_get" id=",igPlR]2m|A#?)^T#TGp"><field name="VAR">Musik_durch_BWM</field></block></value> 
                                  <value name="B"><block type="logic_boolean" id="#xzxv},Xr!Wxn.D(V]oh"><field name="BOOL">FALSE</field></block></value></block></value> 
                              <statement name="DO0"><block type="variables_set" id=".k;M~55c]/RoO#*ALA`{"><field name="VAR">Musik_durch_BWM</field>
                                  <value name="VALUE"><block type="logic_boolean" id="|GLvhY,9D@f,,8}8QCRM"><field name="BOOL">TRUE</field></block></value></block></statement> 
                              <next><block type="control" id="XB/H3U!K90wtF[7|vbQ9"><mutation delay_input="false"></mutation>
                                  <field name="OID">sonos.0.root.10_0_0_61.volume</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE"><block type="math_number" id="(mhD+dAVVQVFv%YJTSoD"><field name="NUM">12</field></block></value> 
                                  <next><block type="control" id="nl98VkAw|z,C(emzqnj!"><mutation delay_input="false"></mutation>
                                      <field name="OID">sonos.0.root.10_0_0_61.state</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE"><block type="text" id="+vXq}[4M]dA+)4i@3z%]"><field name="TEXT">play</field></block></value> 
                                      <next><block type="control" id="OkL0pgQZ9`AJjQSPW#hH"><mutation delay_input="false"></mutation>
                                          <field name="OID">sonos.0.root.10_0_0_61.favorites_set</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="text" id="8|r]Y/R+ek~x#31fIu,P"><field name="TEXT">94.3 RS2</field></block></value> 
                                          <next><block type="control" id="qQ;MkWLC:,z,R5!S0wa."><mutation delay_input="false"></mutation>
                                              <field name="OID">sonos.0.root.10_0_0_61.stop</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE"><block type="logic_boolean" id="aZojuBdcU[bwg:4e2qyF"><field name="BOOL">FALSE</field></block></value> 
                                              <next><block type="control" id="iq0Sb}MvKL^iu:eM{`/y"><mutation delay_input="false"></mutation>
                                                  <field name="OID">sonos.0.root.10_0_0_61.play</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE"><block type="logic_boolean" id="[Z`0CFHd?tS?dPg!LQi8"><field name="BOOL">TRUE</field></block></value> 
                                                  <next><block type="control" id="6buX@Sdq!ibXvl94Upi,"><mutation delay_input="true"></mutation>
                                                      <field name="OID">sonos.0.root.10_0_0_61.state</field>
                                                      <field name="WITH_DELAY">TRUE</field>
                                                      <field name="DELAY_MS">5</field>
                                                      <field name="UNIT">min</field>
                                                      <field name="CLEAR_RUNNING">TRUE</field>
                                                      <value name="VALUE"><block type="text" id="@WZWY+M@Gt;BG|p=1nzk"><field name="TEXT">stop</field></block></value> 
                                                      <next><block type="control" id="v7b2,e:fQG!bAI1;?6;}"><mutation delay_input="true"></mutation>
                                                          <field name="OID">sonos.0.root.10_0_0_61.stop</field>
                                                          <field name="WITH_DELAY">TRUE</field>
                                                          <field name="DELAY_MS">5</field>
                                                          <field name="UNIT">min</field>
                                                          <field name="CLEAR_RUNNING">TRUE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="5W%zBmmorL.Yw(Rq0dT9"><field name="BOOL">TRUE</field></block></value> 
                                                          <next><block type="control" id="r?~AGLc9![dhMQ#P!GUt"><mutation delay_input="true"></mutation>
                                                              <field name="OID">sonos.0.root.10_0_0_61.play</field>
                                                              <field name="WITH_DELAY">TRUE</field>
                                                              <field name="DELAY_MS">5</field>
                                                              <field name="UNIT">min</field>
                                                              <field name="CLEAR_RUNNING">TRUE</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="z^?F.0o4/K-iK_Ey/;%k"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement> 
                      <next><block type="controls_if" id="g]X2ch:E`b5r~fWTf_uH"><value name="IF0"><block type="logic_compare" id="ka@,mcr|HqLDmoz)!M=="><field name="OP">LT</field>
                              <value name="A"><block type="get_value" id="T{:U-zon~czyj9n|e![a"><field name="ATTR">val</field>
                                  <field name="OID">zwave.0.NODE2.SENSOR_MULTILEVEL.Luminance_1</field></block></value> 
                              <value name="B"><block type="math_number" id="cLpWZSzugm|}d5q|cV[J"><field name="NUM">8</field></block></value></block></value> 
                          <statement name="DO0"><block type="controls_if" id="nT~K|+!t@y{^9WZ^q~:7"><value name="IF0"><block type="logic_compare" id="UmV3*_|f/8!ng.`R-4Ap"><field name="OP">EQ</field>
                                  <value name="A"><block type="variables_get" id="B6O9i@jnx#+DX;PB2v2E"><field name="VAR">Licht_durch_BWM</field></block></value> 
                                  <value name="B"><block type="logic_operation" id="UH`m)hy)A^5,h*XfA=2h"><field name="OP">OR</field>
                                      <value name="A"><block type="logic_boolean" id=")xfyHQGY+rpogwN8ixp!"><field name="BOOL">TRUE</field></block></value> 
                                      <value name="B"><block type="logic_compare" id="b9~6hg:oigB(?*[F^RR]"><field name="OP">EQ</field>
                                          <value name="A"><block type="get_value" id="g.VPx`kDLPza?lk=~uuN"><field name="ATTR">val</field>
                                              <field name="OID">hue.0.Philips_hue.Regal_Bad.on</field></block></value> 
                                          <value name="B"><block type="logic_boolean" id="Yg`lNrC%5%0ru{va|E[3"><field name="BOOL">FALSE</field></block></value></block></value></block></value></block></value> 
                              <statement name="DO0"><block type="controls_if" id="mAEP8mA|r@5V=P_0ukiu"><value name="IF0"><block type="logic_compare" id="Wz=fguf2ck]Q,id#ynJg"><field name="OP">EQ</field>
                                      <value name="A"><block type="variables_get" id="OBawk:X[5Prliz*N=Eb{"><field name="VAR">Licht_durch_BWM</field></block></value> 
                                      <value name="B"><block type="logic_boolean" id="s9R?@666qEoEszv.fXO`"><field name="BOOL">FALSE</field></block></value></block></value> 
                                  <statement name="DO0"><block type="variables_set" id="^sHWV(LmiRJ6nl-dTtl^"><field name="VAR">Licht_durch_BWM</field>
                                      <value name="VALUE"><block type="logic_boolean" id="^3`BbwC!zs(j~gw6Qt5|"><field name="BOOL">TRUE</field></block></value></block></statement> 
                                  <next><block type="control" id="G=qPrmHO5l+z^ZJE),L%"><mutation delay_input="false"></mutation>
                                      <field name="OID">hue.0.Philips_hue.Regal_Bad.on</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE"><block type="logic_boolean" id=".#=F^vP7ok^u}8eq]a-#"><field name="BOOL">TRUE</field></block></value> 
                                      <next><block type="control" id="[[!wWvXc~6!UX4WMU6N~"><mutation delay_input="true"></mutation>
                                          <field name="OID">hue.0.Philips_hue.Regal_Bad.on</field>
                                          <field name="WITH_DELAY">TRUE</field>
                                          <field name="DELAY_MS">5</field>
                                          <field name="UNIT">min</field>
                                          <field name="CLEAR_RUNNING">TRUE</field>
                                          <value name="VALUE"><block type="logic_boolean" id="h*ei|yucD)K}rUfzUvl1"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement> 
              <next><block type="controls_if" id="ENf_66UQK0e%V~!(`j0v"><value name="IF0"><block type="logic_compare" id="K90!{t2MSXCcP4Mi6ik2"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="8/3Dd:ZpJ:J1H(Sc)(:i"><field name="ATTR">val</field>
                          <field name="OID">zwave.0.NODE2.ALARM.Burglar_1</field></block></value> 
                      <value name="B"><block type="math_number" id="B@h!M6l0+NoJyU)1x}mS"><field name="NUM">0</field></block></value></block></value> 
                  <statement name="DO0"><block type="timeouts_settimeout" id="%RFowrkD6(Wcesw/WKy9"><field name="NAME">Licht_und_Musik_aus</field>
                      <field name="DELAY">5</field>
                      <field name="UNIT">min</field>
                      <statement name="STATEMENT"><block type="controls_if" id="uCHQOW?=Y@|HbQh+oLz;"><value name="IF0"><block type="logic_compare" id="Uko)*pmq6Kjbk|;c%?wm"><field name="OP">EQ</field>
                              <value name="A"><block type="variables_get" id="[jdSnXDRLZ`QT^+#O!Pg"><field name="VAR">Licht_durch_BWM</field></block></value> 
                              <value name="B"><block type="logic_boolean" id="8]BS})zA=rM]BHO|{UA;"><field name="BOOL">TRUE</field></block></value></block></value> 
                          <statement name="DO0"><block type="variables_set" id="i_j-Z.a_~CYy*bWDuoe="><field name="VAR">Licht_durch_BWM</field>
                              <value name="VALUE"><block type="logic_boolean" id="o-f.2Vb-pr[/GS1i%:S*"><field name="BOOL">FALSE</field></block></value></block></statement> 
                          <next><block type="controls_if" id="l#CPa!|xtwz8pC/:]ol!"><value name="IF0"><block type="logic_compare" id="),.LF[@9Fk2I^fUQS27s"><field name="OP">EQ</field>
                                  <value name="A"><block type="variables_get" id="Bs`W-TX!5~0T2~pEJHw4"><field name="VAR">Musik_durch_BWM</field></block></value> 
                                  <value name="B"><block type="logic_boolean" id="uxNFWebVF:d]!!0c=5bb"><field name="BOOL">TRUE</field></block></value></block></value> 
                              <statement name="DO0"><block type="variables_set" id="GBcIz6cpA6QG/!4!}hLG"><field name="VAR">Musik_durch_BWM</field>
                                  <value name="VALUE"><block type="logic_boolean" id="o4H.M#@!(-7D=r#?g(`T"><field name="BOOL">FALSE</field></block></value></block></statement></block></next></block></statement></block></statement></block></next></block></statement></block></xml> 
          

          ! ````

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

            @marphDE:

            habe das jetzt script jetzt mal so umgebaut, leider geht nun überhaupt kein Licht/Radio an.

            irgendwas mache ich doch hier falsch. ` Deine "oder" Verknüpfung stimmt nicht. Da hast Du einen falschen Baustein genommen.

            Nachtrag:

            Hier einmal mein Blockly Code

            ! ````
            <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="U483,(hxL/e15;B)@SF`" x="-1137" y="-137"><mutation items="1"></mutation>
            <field name="CONDITION">any</field>

            <value name="OID0"><shadow type="field_oid" id="Pa-qA=Dn}r9ur8r6wgGp"><field name="oid">hm-rpc.0.KEQ12121212.x.MOTION</field></shadow></value> 
            <statement name="STATEMENT"><block type="controls_if" id="=ARGVjwsv{+4ds|XcS*f"><value name="IF0"><block type="logic_compare" id="nJ}o3D5}^h{vKLHl,op7"><field name="OP">EQ</field>
                    <value name="A"><block type="get_value" id="5,2p_7](@1#WC-GM;jlg"><field name="ATTR">val</field>
                        <field name="OID">hm-rpc.0.KEQ1212121.1.MOTION</field></block></value> 
                    <value name="B"><block type="logic_boolean" id="acI^h6YE~65*J2r|i{:3"><field name="BOOL">TRUE</field></block></value></block></value> 
                <statement name="DO0"><block type="timeouts_cleartimeout" id="+e?um7Jc:~kgwi*o%@]W"><field name="NAME">Licht und Musik aus</field>
                    <next><block type="controls_if" id="{INp~_T{[vI6v{-Ip0B^"><value name="IF0"><block type="logic_operation" id="!jBD;S/n8f|zI%r+FOeQ"><field name="OP">AND</field>
                            <value name="A"><block type="time_compare" id="r:/v18n6|A|!_XZ~St]h"><mutation end_time="false"></mutation>
                                <field name="OPTION">>=</field>
                                <field name="START_TIME">04:53</field></block></value> 
                            <value name="B"><block type="time_compare" id="(yU+lA0=~g2vc-V|2ibT"><mutation end_time="false"></mutation>
                                <field name="OPTION"><</field>
                                <field name="START_TIME">22:00</field></block></value></block></value> 
                        <statement name="DO0"><block type="controls_if" id="(y~Tuc=/GJ*))Si3!=nj"><value name="IF0"><block type="logic_operation" id="O=ag~+wl7Q`x2dG~{C+U"><field name="OP">OR</field>
                                <value name="A"><block type="logic_compare" id="`l@oys0b.TKE,mLR`lP}"><field name="OP">EQ</field>
                                    <value name="A"><block type="variables_get" id="^Vu=(o~w}VJph7[)P=`b"><field name="VAR">Musik_durch_BWM</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="NO.fIAs]MPGU~=RewYMr"><field name="BOOL">TRUE</field></block></value></block></value> 
                                <value name="B"><block type="logic_compare" id="M(2rQuy)KuUu5h|QEFE!"><field name="OP">NEQ</field>
                                    <value name="A"><block type="get_value" id="=:b{G,IL_:As4n`O%06m"><field name="ATTR">val</field>
                                        <field name="OID">sonos.0.root.192_168_178_11.state</field></block></value> 
                                    <value name="B"><block type="text" id="ebxHm7Y.i`O8o+S;MGd,"><field name="TEXT">play</field></block></value></block></value></block></value> 
                            <statement name="DO0"><block type="controls_if" id="*{ssCe=GTf{}+`y!zgl4"><value name="IF0"><block type="logic_compare" id="hEkf8?%lwwTgPrqv=[!p"><field name="OP">EQ</field>
                                    <value name="A"><block type="variables_get" id=";OQZ#c~.PKGN[snL/YuU"><field name="VAR">Musik_durch_BWM</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="U[+|6[mnY?6duHbY@L8e"><field name="BOOL">FALSE</field></block></value></block></value> 
                                <statement name="DO0"><block type="variables_set" id="l3!gYz`US*u2deHu]%!9"><field name="VAR">Musik_durch_BWM</field>
                                    <value name="VALUE"><block type="logic_boolean" id=":eT/iqb+-KZz_TivGL{N"><field name="BOOL">TRUE</field></block></value></block></statement> 
                                <next><block type="control" id="zSZ{sgVVC{bbtvHDiu9Q"><mutation delay_input="false"></mutation>
                                    <field name="OID">sonos.0.root.192_168_178_11.state</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE"><block type="text" id="kNB=SaT.+vZXh@{qtY*k"><field name="TEXT">play</field></block></value> 
                                    <next><block type="control" id="DIH5?)PVTlvA~SGU-lJT"><mutation delay_input="false"></mutation>
                                        <field name="OID">sonos.0.root.192_168_178_11.favorites_set</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE"><block type="text" id="kVr:b_vWUzn[/@Qyaj;2"><field name="TEXT">94.3 RS2</field></block></value> 
                                        <next><block type="control" id="D)Sk0P{3UX^Mm%R!,o9="><mutation delay_input="false"></mutation>
                                            <field name="OID">sonos.0.root.192_168_178_11.volume</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE"><block type="math_number" id="KwZpBw0W^5`5sDBYPF?S"><field name="NUM">13</field></block></value> 
                                            <next><block type="control" id="#z4HZ8a}]K}4_pLrlxq{"><mutation delay_input="false"></mutation>
                                                <field name="OID">sonos.0.root.192_168_178_11.stop</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE"><block type="logic_boolean" id="AKK4@8*NeNmp%?UGZE4g"><field name="BOOL">FALSE</field></block></value> 
                                                <next><block type="control" id="1@B.6-o_[ZDJ#?nJz_P+"><mutation delay_input="false"></mutation>
                                                    <field name="OID">sonos.0.root.192_168_178_11.play</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE"><block type="logic_boolean" id="70f1gNz9e/+N=S5pVXwp"><field name="BOOL">TRUE</field></block></value> 
                                                    <next><block type="control" id="Yck?UlY;q1mON:T)pWgM"><mutation delay_input="true"></mutation>
                                                        <field name="OID">sonos.0.root.192_168_178_11.state</field>
                                                        <field name="WITH_DELAY">TRUE</field>
                                                        <field name="DELAY_MS">2</field>
                                                        <field name="UNIT">min</field>
                                                        <field name="CLEAR_RUNNING">TRUE</field>
                                                        <value name="VALUE"><block type="text" id=";(hB)JU_`8/,@*dM=Hfa"><field name="TEXT">stop</field></block></value> 
                                                        <next><block type="control" id="6Dm{OQ4s,zwEVId7KsV9"><mutation delay_input="true"></mutation>
                                                            <field name="OID">sonos.0.root.192_168_178_11.stop</field>
                                                            <field name="WITH_DELAY">TRUE</field>
                                                            <field name="DELAY_MS">2</field>
                                                            <field name="UNIT">min</field>
                                                            <field name="CLEAR_RUNNING">TRUE</field>
                                                            <value name="VALUE"><block type="logic_boolean" id="Pw2!gszd;Rj:k+mPXJBR"><field name="BOOL">TRUE</field></block></value> 
                                                            <next><block type="control" id="}vMO(SIFQF@02CJWpxw!"><mutation delay_input="true"></mutation>
                                                                <field name="OID">sonos.0.root.192_168_178_11.play</field>
                                                                <field name="WITH_DELAY">TRUE</field>
                                                                <field name="DELAY_MS">2</field>
                                                                <field name="UNIT">min</field>
                                                                <field name="CLEAR_RUNNING">TRUE</field>
                                                                <value name="VALUE"><block type="logic_boolean" id="_64r8_MXUJb.xqlNSwR["><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement> 
                        <next><block type="controls_if" id="SUOu9Sr45YHG3foJyhe?"><value name="IF0"><block type="logic_compare" id="xCiH;.Q_-@:Z-jn_+p^H"><field name="OP">LT</field>
                                <value name="A"><block type="get_value" id="WmbK3S5i)C:LRZgt5p@~"><field name="ATTR">val</field>
                                    <field name="OID">hm-rpc.0.KEQ0121212.1.BRIGHTNESS</field></block></value> 
                                <value name="B"><block type="math_number" id="mD*Ft_ZgNVRn.6)QX!;^"><field name="NUM">18</field></block></value></block></value> 
                            <statement name="DO0"><block type="controls_if" id=",,]#hQ^m/4CV`}Zbwep."><value name="IF0"><block type="logic_operation" id="N|Q]Qx*_yQx-%G[f?eZX"><field name="OP">OR</field>
                                    <value name="A"><block type="logic_compare" id="2EVH?JM*HWT{p4,#jdkr"><field name="OP">EQ</field>
                                        <value name="A"><block type="variables_get" id="/b-B?*NbQ+QjGy:1G;ox"><field name="VAR">Licht_Durch_BWM</field></block></value> 
                                        <value name="B"><block type="logic_boolean" id="ORZ2j;8Go=29-HypEWj`"><field name="BOOL">TRUE</field></block></value></block></value> 
                                    <value name="B"><block type="logic_compare" id="l(7noi9?vOs8ZLE0c#=w"><field name="OP">EQ</field>
                                        <value name="A"><block type="get_value" id="HLYsLn)5GAaF%Z`qjVKF"><field name="ATTR">val</field>
                                            <field name="OID">hm-rpc.1.JEQ0121212.16.STATE</field></block></value> 
                                        <value name="B"><block type="logic_boolean" id="urY(C2KU|al,HY#QyALr"><field name="BOOL">FALSE</field></block></value></block></value></block></value> 
                                <statement name="DO0"><block type="controls_if" id=";}hsm0X9fKSqkSRKtl[|"><value name="IF0"><block type="logic_compare" id=":BKRn:Je/R?K/DN)K@cE"><field name="OP">EQ</field>
                                        <value name="A"><block type="variables_get" id="84^-83P[y!nx%]n5Un=n"><field name="VAR">Licht_Durch_BWM</field></block></value> 
                                        <value name="B"><block type="logic_boolean" id="ugCk~XBX2;lk8uFU=lQR"><field name="BOOL">FALSE</field></block></value></block></value> 
                                    <statement name="DO0"><block type="variables_set" id="+VQOZs9`1s[Q(mL6.SYZ"><field name="VAR">Licht_Durch_BWM</field>
                                        <value name="VALUE"><block type="logic_boolean" id="do((eg8,=#m;^{n2oZh%"><field name="BOOL">TRUE</field></block></value></block></statement> 
                                    <next><block type="control" id="y;#4Vj(3;,}H9YNoVgTM"><mutation delay_input="false"></mutation>
                                        <field name="OID">hm-rpc.1.JEQ0121212.16.STATE</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE"><block type="logic_boolean" id="Y~f31c`1dG99}Q3?[G^c"><field name="BOOL">TRUE</field></block></value> 
                                        <next><block type="control" id=",Sa#o3?u%MDpK:lN/r`*"><mutation delay_input="true"></mutation>
                                            <field name="OID">hm-rpc.1.JEQ0121212.16.STATE</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">2</field>
                                            <field name="UNIT">min</field>
                                            <field name="CLEAR_RUNNING">TRUE</field>
                                            <value name="VALUE"><block type="logic_boolean" id="8s(q-CJW6U7Iz5iVO:c)"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement> 
                <next><block type="controls_if" id="0/6B_.qRph14YrAk4f_C"><value name="IF0"><block type="logic_compare" id="^u]/6H{LBDR,p{`b8_D0"><field name="OP">EQ</field>
                        <value name="A"><block type="get_value" id="8K;#P99xT3g2V2lXBf%H"><field name="ATTR">val</field>
                            <field name="OID">hm-rpc.0.KEQ0121212.1.MOTION</field></block></value> 
                        <value name="B"><block type="logic_boolean" id="`[aWf88pP=m@5(.yRZVf"><field name="BOOL">FALSE</field></block></value></block></value> 
                    <statement name="DO0"><block type="timeouts_settimeout" id="0c*a/St!C!%j_AMS9j}5"><field name="NAME">Licht und Musik aus</field>
                        <field name="DELAY">2</field>
                        <field name="UNIT">min</field>
                        <statement name="STATEMENT"><block type="controls_if" id="ty@#vv-?2mcUEI8%|U1)"><value name="IF0"><block type="logic_compare" id="`(J{}TUVBz6Xd|ci8I29"><field name="OP">EQ</field>
                                <value name="A"><block type="variables_get" id="gu3FfLIOy[wo;p3.}aGc"><field name="VAR">Licht_Durch_BWM</field></block></value> 
                                <value name="B"><block type="logic_boolean" id="sHl%FlCCSG7zknE}_/_C"><field name="BOOL">TRUE</field></block></value></block></value> 
                            <statement name="DO0"><block type="variables_set" id="cn-jDM%+JO)3M,k:*@Xu"><field name="VAR">Licht_Durch_BWM</field>
                                <value name="VALUE"><block type="logic_boolean" id="/nkSJnNM/b5Pign#Fn.z"><field name="BOOL">FALSE</field></block></value></block></statement> 
                            <next><block type="controls_if" id="fLqcWZzsrG2]M#aQwdi,"><value name="IF0"><block type="logic_compare" id="}B4CsH5PdSN2{de1BS9D"><field name="OP">EQ</field>
                                    <value name="A"><block type="variables_get" id="A^shH(+WM6V?)m@tb@J5"><field name="VAR">Musik_durch_BWM</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="%sVVHu@GDatqI1_8w}30"><field name="BOOL">TRUE</field></block></value></block></value> 
                                <statement name="DO0"><block type="variables_set" id="1,(qhc.l,}:Ep+;tfL[*"><field name="VAR">Musik_durch_BWM</field>
                                    <value name="VALUE"><block type="logic_boolean" id="du@0sq;v20uY%|i[G3H5"><field name="BOOL">FALSE</field></block></value></block></statement></block></next></block></statement></block></statement></block></next></block></statement></block></xml> 
            
            1 Reply Last reply Reply Quote 0
            • BBTown
              BBTown last edited by

              @Okidoki3009:

              Es läuft aber leider noch nicht rund, die Box geht mal an und mal aus. ` versuche es mal mit dem Einbau der Variablen wie hier beschrieben http://forum.iobroker.net/viewtopic.php … 17#p115911

              Nachtrag:

              • stelle den Trigger mal auf "aktualisiert" anstelle von "geändert"

              • bei deinem ersten "Falls" sagst Du "ungleich Bewegung" das müßte doch sicher "gleich Bewegung" heissen?!

              1 Reply Last reply Reply Quote 0
              • M
                marphDE last edited by

                Danke für die super Hilfe Heiko.

                Es schaltet sich bei Bewegung zumindest erstmal alles ein.

                Leider geht es trotzdem wieder aus und lässt sich nicht gleich wieder durch Bewegung aktivieren.

                Das Script schaltet definitiv nach dem eingestellten Timeout von 2 Minuten ab, auch wenn Bewegung ist.

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

                  Ich kann in meinem Script-Beispiel keinen Logikfehler finden 😞

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

                    Eine Alternative hätte ich noch anzubieten 😉
                    1917_sonosundlichtvariablen.jpg

                    1 Reply Last reply Reply Quote 0
                    • O
                      Okidoki3009 last edited by

                      @BBTown:

                      @Okidoki3009:

                      Es läuft aber leider noch nicht rund, die Box geht mal an und mal aus. ` versuche es mal mit dem Einbau der Variablen wie hier beschrieben http://forum.iobroker.net/viewtopic.php … 17#p115911

                      Nachtrag:

                      • stelle den Trigger mal auf "aktualisiert" anstelle von "geändert"

                      • bei deinem ersten "Falls" sagst Du "ungleich Bewegung" das müßte doch sicher "gleich Bewegung" heissen?! `

                      Danke Heiko für die Hilfe!!

                      Durch das ungleich in gleich hat sich vieles verbessert 😄

                      Ich muss es mal ausgiebig testen

                      1 Reply Last reply Reply Quote 0
                      • M
                        marphDE last edited by

                        Leider habe ich es noch nicht geschafft eine funktionierende Lösung auf die Beine zu stellen.

                        :roll: 😐

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        767
                        Online

                        31.9k
                        Users

                        80.1k
                        Topics

                        1.3m
                        Posts

                        5
                        36
                        4335
                        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