Navigation

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

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Bewegungsmelder script

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

      @paul53 Ich habe von 20-90 Sekunden in 10 Sek. Schritten probiert aber es funktioniert nicht. Die BWMs haben eine Duration von 30 Sekunden und schalten dann auf "false".

      2022-07-11 13:45:51.194 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_1:true
      2022-07-11 13:45:51.195 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: Bewegung Bad erkannt und Licht ein
      2022-07-11 13:45:51.614 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_2:true
      2022-07-11 13:45:51.615 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: Bewegung Bad erkannt und Licht ein
      2022-07-11 13:45:57.579 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: Bad Licht aus
      2022-07-11 13:46:21.468 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_1:false
      2022-07-11 13:46:22.108 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_2:false
      2022-07-11 13:48:29.329 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.FLUR_BEWEGUNG: Keine Bewegung im Flur erkannt und Licht aus
      2022-07-11 13:48:52.111 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: Keine Bewegung Bad erkannt und Licht aus
      
      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @Michael Schmitt last edited by paul53

        @michael-schmitt sagte:

        2022-07-11 13:45:57.579 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: Bad Licht aus
        2022-07-11 13:46:21.468 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_1:false
        2022-07-11 13:46:22.108 - info: javascript.0 (13166) script.js.common.Bewegungsmelder.BAD_BEWEGUNG_NEU_2: alias.0.Bewegungsmelder.BWM_Bad_2:false
        

        Demnach sollten 40 s als Freigabe-Verzögerung genügen.
        Der Trigger um 13:46:22.108 Uhr muss noch blockiert werden.

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

          @paul53 sagte in Bewegungsmelder script:

          Der Trigger um 13:46:22.108 Uhr muss noch blockiert werden.

          und wie stell ich das an ?

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

            @michael-schmitt sagte: und wie stell ich das an ?

            Mit 40 s Verzögerung für die Freigabe. Voraussetzung für die Sperre "manuell ein" ist allerdings, dass das Licht manuell eingeschaltet wurde, was offenbar nicht erfolgte.

            EDIT: Es wird wohl noch eine Variable manuell_aus benötigt?

            Bild_2022-07-11_142039651.png

            Michael Schmitt 2 Replies Last reply Reply Quote 1
            • Michael Schmitt
              Michael Schmitt @paul53 last edited by

              @paul53 das schaut gut aus .... werde mal die Zeiten wieder auf normal stellen, hatte ich zum testen verringert. Berichte dann noch wenn alles rund läuft. Dankeschön @paul53

              Michael Schmitt 1 Reply Last reply Reply Quote 0
              • Michael Schmitt
                Michael Schmitt @Michael Schmitt last edited by Michael Schmitt

                Hallo,
                das Script funktioniert einwandfrei. Hier nochmal komplett falls es jemand braucht.

                <xml xmlns="https://developers.google.com/blockly/xml">
                  <variables>
                    <variable id="qrCfu6RSlbXJjjCPf/P-">manuell_ein</variable>
                    <variable type="timeout" id="timeout">timeout</variable>
                    <variable id="pZ[L2!Sz/zZ8Tn.^iQ_n">manuell_aus</variable>
                    <variable type="timeout" id="timeout2">timeout2</variable>
                    <variable type="timeout" id="timeout4">timeout4</variable>
                    <variable type="timeout" id="timeout3">timeout3</variable>
                  </variables>
                  <block type="comment" id="y}~#(AZB|hTb^Ld_.JUl" x="-137" y="-112">
                    <field name="COMMENT">BWM</field>
                    <next>
                      <block type="on_ext" id="XZShE%!^7aSwliAf9~Rx">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                        <field name="CONDITION">ne</field>
                        <field name="ACK_CONDITION"></field>
                        <value name="OID0">
                          <shadow type="field_oid" id="L{OHfK*J*RCS6SxTvn.W">
                            <field name="oid">alias.0.Bewegungsmelder.BWM_Bad_1</field>
                          </shadow>
                        </value>
                        <value name="OID1">
                          <shadow type="field_oid" id="G/Yr4W}YyjpF]+|%z/EC">
                            <field name="oid">alias.0.Bewegungsmelder.BWM_Bad_2</field>
                          </shadow>
                        </value>
                        <statement name="STATEMENT">
                          <block type="timeouts_cleartimeout" id="toBX/cPb=i?Or$.qiN,F">
                            <field name="NAME">timeout2</field>
                            <next>
                              <block type="timeouts_cleartimeout" id="_Hz+||A6ro8|8yv8]Ooi">
                                <field name="NAME">timeout</field>
                                <next>
                                  <block type="controls_if" id="Vwd`yH-?dfX(g?Yz#vYe">
                                    <value name="IF0">
                                      <block type="logic_negate" id=",LLLwoaashRhQLF/$id:">
                                        <value name="BOOL">
                                          <block type="variables_get" id="inbzB=3u.=59#v8Z=b=6">
                                            <field name="VAR" id="qrCfu6RSlbXJjjCPf/P-">manuell_ein</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="controls_if" id="e@LN;c0-3IiQ3mPlWpKL">
                                        <mutation elseif="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_operation" id="6v~3[Iz6cF1M~J(S25+G" inline="false">
                                            <field name="OP">AND</field>
                                            <value name="A">
                                              <block type="on_source" id="cRq(*e^$wwz39yls}{S-">
                                                <field name="ATTR">state.val</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="@^Dp2#8GB.Oy@4/MB-vg">
                                                <field name="OP">LT</field>
                                                <value name="A">
                                                  <block type="get_value" id="7g|W6K@c0DT:HJ*+4ah3">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">deconz.0.Sensors.53.lux</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="j2%%WLUaz-KTRbmljU4#">
                                                    <field name="NUM">30</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="control" id="$XZ-=YslQG]u-p;EEF#U">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">deconz.0.Groups.8.on</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="w~mMGbfeV-X~0!%vn`c.">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="*SPNj7{@=N{N%oO!3H~]">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">deconz.0.Groups.8.level</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="t}=aW)^Z`;h+qCZbF2XT">
                                                    <field name="NUM">60</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="/}Lh|M^gv9R|glZ_S1#S">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="Kjf7:mgncC3)9VTO/OC]">
                                                        <field name="TEXT">Bewegung Bad erkannt und Licht ein</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <value name="IF1">
                                          <block type="logic_negate" id="^{YtaV0y5~2[=lKpQAL-">
                                            <value name="BOOL">
                                              <block type="variables_get" id="I!~xR%=zNGWL`zz^=zO$">
                                                <field name="VAR" id="pZ[L2!Sz/zZ8Tn.^iQ_n">manuell_aus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO1">
                                          <block type="timeouts_settimeout" id="@8?nIfDj6,k({35ys);-">
                                            <field name="NAME">timeout</field>
                                            <field name="DELAY">270</field>
                                            <field name="UNIT">sec</field>
                                            <statement name="STATEMENT">
                                              <block type="control" id="hyd4D(bw]R)6Eqc4T:cg">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">deconz.0.Groups.8.level</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="~C;z/$$W`Lj@Q_#1xt=6">
                                                    <field name="NUM">30</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="FLx$#Esc,{WeXH_)Uzh)">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="EZrd7+22lfbP!E,,dU|F">
                                                        <field name="TEXT">Bad Level 30%</field>
                                                      </shadow>
                                                    </value>
                                                    <next>
                                                      <block type="timeouts_settimeout" id="CF3;eZo]Eo9getERiifI">
                                                        <field name="NAME">timeout2</field>
                                                        <field name="DELAY">50</field>
                                                        <field name="UNIT">sec</field>
                                                        <statement name="STATEMENT">
                                                          <block type="control" id="*^7bIYM3vHC69N7p1xbg">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">deconz.0.Groups.8.on</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="logic_boolean" id="qboY~;^nMM6jj;+3$MC/">
                                                                <field name="BOOL">FALSE</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="debug" id="e?zC_:GX/.@u!`}SQ7P4">
                                                                <field name="Severity">log</field>
                                                                <value name="TEXT">
                                                                  <shadow type="text" id="HfoKib*o7AG:EM$;dKxK">
                                                                    <field name="TEXT">Keine Bewegung Bad erkannt und Licht aus</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                  <block type="comment" id="NY-@v@#r:`0vft9X@NKp" x="563" y="-112">
                    <field name="COMMENT">Lichtschalter</field>
                    <next>
                      <block type="on_ext" id="6Ep1xYZhs;fE6{ULi%Jt">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                        <field name="CONDITION">ne</field>
                        <field name="ACK_CONDITION"></field>
                        <value name="OID0">
                          <shadow type="field_oid" id="AE4kvQEZVO!/B=Wlkv4T">
                            <field name="oid">deconz.0.Sensors.33.buttonpressed</field>
                          </shadow>
                        </value>
                        <value name="OID1">
                          <shadow type="field_oid" id="La(|naQX?J|zf8Q^n5VV">
                            <field name="oid">deconz.0.Sensors.43.buttonpressed</field>
                          </shadow>
                        </value>
                        <statement name="STATEMENT">
                          <block type="controls_if" id="Fkmp#,:[](:u|m1#rZ_M">
                            <mutation elseif="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="^)G:O?pb#Tbd271bURO$">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="on_source" id="?6-BDA}x4o%Aln2|96fd">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="@%Ajr9?},raMKRV!(=/=">
                                    <field name="NUM">1002</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="timeouts_cleartimeout" id="{SHPTG__y3ak6N9v^oCO">
                                <field name="NAME">timeout</field>
                                <next>
                                  <block type="timeouts_cleartimeout" id="di*i)K3`C=Vv=*8+ZTyK">
                                    <field name="NAME">timeout2</field>
                                    <next>
                                      <block type="variables_set" id="F{0JN,.1_g`wZWYrw.pR">
                                        <field name="VAR" id="qrCfu6RSlbXJjjCPf/P-">manuell_ein</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="*wTIZ1^W|{M;oGnj3Q0+">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="._;caH:!d941]JJqQ)Bq">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">deconz.0.Groups.8.on</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="`16Y0trSNFT_B7k@{9BC">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="+aG3-VAYoW0pMMChPL1?">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">deconz.0.Groups.8.level</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="A3zgfihO$uonYS1s~`O=">
                                                    <field name="NUM">90</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="s27(YkT^AGc`83_%J3Zd">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="Q||#DNqJ/[9n5RS[6PP2">
                                                        <field name="TEXT">Bad Licht ein</field>
                                                      </shadow>
                                                    </value>
                                                    <next>
                                                      <block type="timeouts_cleartimeout" id="_E8?epb.J!$fTY1MBN=s">
                                                        <field name="NAME">timeout3</field>
                                                        <next>
                                                          <block type="timeouts_settimeout" id="V_2-N,X]ya1S?r+Q,J()">
                                                            <field name="NAME">timeout3</field>
                                                            <field name="DELAY">30</field>
                                                            <field name="UNIT">min</field>
                                                            <statement name="STATEMENT">
                                                              <block type="variables_set" id="-s[lpxk5doij*w1,UvMA">
                                                                <field name="VAR" id="qrCfu6RSlbXJjjCPf/P-">manuell_ein</field>
                                                                <value name="VALUE">
                                                                  <block type="logic_boolean" id="w?GQqiy04Q492pLC(nU)">
                                                                    <field name="BOOL">FALSE</field>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="control" id="sM[^@W|+zd]m9ARP?-gD">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">deconz.0.Groups.8.on</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="logic_boolean" id="eD@WOW(a|3-0(ry1xknq">
                                                                        <field name="BOOL">FALSE</field>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="debug" id="/4|EcQ]TynC4o+noB;3a">
                                                                        <field name="Severity">log</field>
                                                                        <value name="TEXT">
                                                                          <shadow type="text" id=";PqhWZ5LTye-)S}yNyT8">
                                                                            <field name="TEXT">Bad Licht aus</field>
                                                                          </shadow>
                                                                        </value>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </statement>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <value name="IF1">
                              <block type="logic_compare" id=";4#O$q`D[B#=f,^9NGI*">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="on_source" id="H.t!a2Lu/rQwl^GKA1u#">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="YLPM8pOSPN|R3K2~Mfma">
                                    <field name="NUM">2002</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO1">
                              <block type="timeouts_cleartimeout" id="cvldmkj?L,L$,[t:LanB">
                                <field name="NAME">timeout</field>
                                <next>
                                  <block type="timeouts_cleartimeout" id="Uw3Ay8-ZqW2+]$/25[h$">
                                    <field name="NAME">timeout2</field>
                                    <next>
                                      <block type="timeouts_cleartimeout" id="P^vLE*)N--2h!42cHFH6">
                                        <field name="NAME">timeout3</field>
                                        <next>
                                          <block type="variables_set" id="%(48J6sJ#-|Rr]:QL,Q$">
                                            <field name="VAR" id="pZ[L2!Sz/zZ8Tn.^iQ_n">manuell_aus</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="3gg;50[h953%nvHozWmA">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="8rIG})y1{r`bWzJaxSfc">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">deconz.0.Groups.8.on</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="kS1@UaWUS.|}:!En8EjD">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="k)[PJ.|/R~/N#P#WB`Ix">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="]vzf`[9YDH~Mx(_k=!cT">
                                                        <field name="TEXT">Bad Licht aus</field>
                                                      </shadow>
                                                    </value>
                                                    <next>
                                                      <block type="timeouts_settimeout" id="`MGIftqgU}6Wm`fbe[10">
                                                        <field name="NAME">timeout4</field>
                                                        <field name="DELAY">40</field>
                                                        <field name="UNIT">sec</field>
                                                        <statement name="STATEMENT">
                                                          <block type="variables_set" id="Gn_Ru)Jnrgbqz6q7oVxn">
                                                            <field name="VAR" id="pZ[L2!Sz/zZ8Tn.^iQ_n">manuell_aus</field>
                                                            <value name="VALUE">
                                                              <block type="logic_boolean" id="f-CJ_Jv6Vs%FG!m-1V_r">
                                                                <field name="BOOL">FALSE</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="variables_set" id="Y8tI~`!iCw9ose3:)5kJ">
                                                                <field name="VAR" id="qrCfu6RSlbXJjjCPf/P-">manuell_ein</field>
                                                                <value name="VALUE">
                                                                  <block type="logic_boolean" id="^1zjkY*Rc`Cp7Ru}~VhZ">
                                                                    <field name="BOOL">FALSE</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </xml>
                

                Anmerkung 2022-07-12 211030.jpg

                EDIT: der Fehler den ich im unteren Beitrag noch hatte ist nun behoben.

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

                  @paul53 scheint doch noch ein Problem zu geben.

                  Wenn ich ins Bad gehe geht das Licht per BWM an. Wenn ich nun aus dem Bad gehe und nicht sofort das Licht ausschalte und "BWM_Bad_1:false" und "BWM_Bad_2:false" sind vor dem ausschalten per Taster/Schalter auf false dann kommt trotzdem das dimmen auf 30%.

                  2022-07-14 03:44:27.157 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: alias.0.Bewegungsmelder.BWM_Bad_1:true
                  2022-07-14 03:44:27.158 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: Bewegung Bad erkannt und Licht ein
                  2022-07-14 03:44:27.917 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: alias.0.Bewegungsmelder.BWM_Bad_2:true
                  2022-07-14 03:44:27.919 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: Bewegung Bad erkannt und Licht ein
                  2022-07-14 03:44:57.231 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: alias.0.Bewegungsmelder.BWM_Bad_1:false
                  2022-07-14 03:44:57.811 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: alias.0.Bewegungsmelder.BWM_Bad_2:false
                  2022-07-14 03:44:59.551 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: deconz.0.Sensors.43.buttonpressed:2002
                  2022-07-14 03:44:59.551 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: Bad Licht aus
                  2022-07-14 03:45:00.350 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: deconz.0.Sensors.43.buttonpressed:0
                  2022-07-14 03:47:04.146 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.FLUR_BEWEGUNG: Keine Bewegung im Flur erkannt und Licht aus
                  2022-07-14 03:47:47.813 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: Bad Level 30%
                  2022-07-14 03:48:18.814 - info: javascript.0 (24042) script.js.common.Bewegungsmelder.BAD_BEWEGUNG: Keine Bewegung Bad erkannt und Licht aus
                  
                  paul53 1 Reply Last reply Reply Quote 0
                  • paul53
                    paul53 @Michael Schmitt last edited by

                    @michael-schmitt sagte: kommt trotzdem das dimmen auf 30%.

                    Stoppe timeout bei jeder Tastenbetätigung.

                    Michael Schmitt L 2 Replies Last reply Reply Quote 1
                    • Michael Schmitt
                      Michael Schmitt @paul53 last edited by

                      @paul53 danke funktioniert 👍

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

                        @paul53

                        Ich reihe mich mal mit meiner Frage hier ein...

                        Da nicht immer dran gedacht wird, die Tür nach dem Verlassen nochmal kurz zu öffnen/schliessen, würde ich gerne einen Block einfügen, dass die Musik bei keiner Bewegung nach 5 Minuten stoppt. Oder hat jemand eine andere Idee für das stoppen der Musik? Wäre für jeden Ratschlag dankbar.

                        Bad_Musik_hinten.png

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

                          @lustig29 sagte: Da nicht immer dran gedacht wird, die Tür nach dem Verlassen nochmal kurz zu öffnen/schliessen

                          Wird die Tür nicht beim Verlassen geöffnet?

                          @lustig29 sagte in Bewegungsmelder script:

                          die Musik bei keiner Bewegung nach 5 Minuten stoppt.

                          Bild_2022-07-18_204346087.png

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

                            @paul53 Doch, aber manchmal geht man halt rein und lässt die Tür auf. Dann muss man sie kurz schliessen/öffnen/schließen, damit die Musik stoppt.

                            L 1 Reply Last reply Reply Quote 0
                            • L
                              lustig29 @lustig29 last edited by

                              Gibt es denn da keine Möglichkeit? Es soll ja nur eine zusätzliche Sicherheit, falls das stoppen mit der Tür nicht funktioniert

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

                                @lustig29 sagte: Gibt es denn da keine Möglichkeit?

                                Funktioniert es mit dem zusätzlichen Timeout nicht?

                                Michael Schmitt 1 Reply Last reply Reply Quote 1
                                • Michael Schmitt
                                  Michael Schmitt @paul53 last edited by Michael Schmitt

                                  @paul53 ich habs mal wieder mit einem Bewegungsmelder.

                                  Das Licht soll nach einer bestimmten Zeit dimmen, damit man erkennt das dieses gleich aus geht.
                                  Das Problem wenn es hell ist geht das Licht wie gewollt nicht an, aber der Timer läuft und schaltet dann auf 60%.

                                  <xml xmlns="https://developers.google.com/blockly/xml">
                                    <variables>
                                      <variable type="timeout" id="timeout">timeout</variable>
                                      <variable type="timeout" id="timeout2">timeout2</variable>
                                    </variables>
                                    <block type="comment" id="M#Itf%?w)g;W_NV:LrCD" x="247" y="-196">
                                      <field name="COMMENT">Küche</field>
                                      <next>
                                        <block type="on_ext" id="XZShE%!^7aSwliAf9~Rx">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                          <field name="CONDITION">ne</field>
                                          <field name="ACK_CONDITION"></field>
                                          <value name="OID0">
                                            <shadow type="field_oid" id="_eW).)0ak/qQ]I)8oZf+">
                                              <field name="oid">alias.0.Bewegungsmelder.BWM_Küche_1</field>
                                            </shadow>
                                          </value>
                                          <value name="OID1">
                                            <shadow type="field_oid" id=")0^n!lxls~t=zH$c#xBk">
                                              <field name="oid">alias.0.Bewegungsmelder.BWM_Küche_2</field>
                                            </shadow>
                                          </value>
                                          <statement name="STATEMENT">
                                            <block type="timeouts_cleartimeout" id="Cp4}tZsbrS.Mr]/dX*WU">
                                              <field name="NAME">timeout</field>
                                              <next>
                                                <block type="timeouts_cleartimeout" id="-o[:H+Vc~AA]-;M?d`fq">
                                                  <field name="NAME">timeout2</field>
                                                  <next>
                                                    <block type="controls_if" id="e@LN;c0-3IiQ3mPlWpKL">
                                                      <mutation else="1"></mutation>
                                                      <value name="IF0">
                                                        <block type="logic_operation" id="1izx-;Zex-%rg*o;pEfg" inline="false">
                                                          <field name="OP">AND</field>
                                                          <value name="A">
                                                            <block type="on_source" id="YF0p~HYg^fvS2:AAqffX">
                                                              <field name="ATTR">state.val</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="logic_compare" id="z=%N/{7Y)XQ@XBzBakY[">
                                                              <field name="OP">LT</field>
                                                              <value name="A">
                                                                <block type="get_value" id="uN-R/ufjXJbjRX_6g6:Q">
                                                                  <field name="ATTR">val</field>
                                                                  <field name="OID">deconz.0.Sensors.62.lux</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <block type="math_number" id="8:zQPz!8:^SgCK|EZI,8">
                                                                  <field name="NUM">8</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <statement name="DO0">
                                                        <block type="control" id="nxly#K96X$mp@Gi#@,gy">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                          <field name="OID">deconz.0.Lights.26.on</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="n2{fjUsZBnz7b)`R+PJ~">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="control" id="v2.kUwM)QLSCY*s;a.a%">
                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                              <field name="OID">deconz.0.Lights.26.level</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="math_number" id="WA)KR!t7M6g-?2:99ic~">
                                                                  <field name="NUM">100</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="debug" id="t{tcabMV%zgl:VxJ{+U;">
                                                                  <field name="Severity">log</field>
                                                                  <value name="TEXT">
                                                                    <shadow type="text" id="2ef,,:9LWc*WJdg@di*I">
                                                                      <field name="TEXT">Bewegung in Küche erkannt und Licht ein</field>
                                                                    </shadow>
                                                                  </value>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                      <statement name="ELSE">
                                                        <block type="timeouts_settimeout" id="yCutu!$pMQ|(uT+cjX(N">
                                                          <field name="NAME">timeout</field>
                                                          <field name="DELAY">60</field>
                                                          <field name="UNIT">sec</field>
                                                          <statement name="STATEMENT">
                                                            <block type="control" id="|48:}Q!T`_w%Q7H^8UR6">
                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                              <field name="OID">deconz.0.Lights.26.level</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="math_number" id="~(.Mo;nX5QT$c8qg*N~$">
                                                                  <field name="NUM">60</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="debug" id="Gl=/gGlpBZb|z?2(uk@W">
                                                                  <field name="Severity">log</field>
                                                                  <value name="TEXT">
                                                                    <shadow type="text" id="]*s_**1STaopKhmRh/zw">
                                                                      <field name="TEXT">Küche BWM Lampe 60%</field>
                                                                    </shadow>
                                                                  </value>
                                                                  <next>
                                                                    <block type="timeouts_settimeout" id="q8w4fioamocb#(LaHw{$">
                                                                      <field name="NAME">timeout2</field>
                                                                      <field name="DELAY">45</field>
                                                                      <field name="UNIT">sec</field>
                                                                      <statement name="STATEMENT">
                                                                        <block type="control" id="rX--zGLj0prOJT**!1uz">
                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                          <field name="OID">deconz.0.Lights.26.on</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE">
                                                                            <block type="logic_boolean" id="Vj+C/7Mhb/b,8J=RJW8R">
                                                                              <field name="BOOL">FALSE</field>
                                                                            </block>
                                                                          </value>
                                                                          <next>
                                                                            <block type="debug" id="B;Fu-[8*LH=H,y-5LbxU">
                                                                              <field name="Severity">log</field>
                                                                              <value name="TEXT">
                                                                                <shadow type="text" id="c0BU#W5fq{/!wccf|O[V">
                                                                                  <field name="TEXT">Keine Bewegung in Küche erkannt und Licht aus</field>
                                                                                </shadow>
                                                                              </value>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </statement>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </statement>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </xml>
                                  
                                  paul53 1 Reply Last reply Reply Quote 0
                                  • paul53
                                    paul53 @Michael Schmitt last edited by

                                    @michael-schmitt sagte: wenn es hell ist geht das Licht wie gewollt nicht an, aber der Timer läuft und schaltet dann auf 60%.

                                    Mache eine zusätzliche Abfrage:

                                    Bild_2022-08-11_170132223.png

                                    Michael Schmitt 1 Reply Last reply Reply Quote 1
                                    • Michael Schmitt
                                      Michael Schmitt @paul53 last edited by

                                      @paul53 @paul53 leider sind dann die Lux höher als sie es sein dürfen damit das Licht an geht

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

                                        @michael-schmitt sagte: leider sind dann die Lux höher als sie es sein dürfen damit das Licht an geht

                                        Was hat die Abfrage im sonst-Zweig mit dem Einschalten zu tun?

                                        Da zwei BWM triggern, kann man nicht Wert auswerten, sondern man benötigt eine Oder-Verknüpfung beider Bewegungen:

                                        Bild_2022-08-11_171404881.png

                                        Michael Schmitt 1 Reply Last reply Reply Quote 1
                                        • Michael Schmitt
                                          Michael Schmitt @paul53 last edited by

                                          @paul53 das Licht wird nun auf 60% gedimmt aber bei erneuter Bewegung wird nicht auf 100% erhöht

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

                                            @michael-schmitt sagte: bei erneuter Bewegung wird nicht auf 100% erhöht

                                            Wenn "level mit 100" aus der zweiten falls-Klammer raus genommen wird?

                                            Bild_2022-08-11_174833824.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            460
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            84
                                            5417
                                            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