Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Gelöst] Bewegungsmelder nur an bestimmten Tagen

    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

    [Gelöst] Bewegungsmelder nur an bestimmten Tagen

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

      Hallo,

      für viele von euch vermutlich eine einfache Sache, ich jedoch verzweifel leider dran:

      Folgendes Szenario:

      Ein Bewegungsmelder soll zu bestimmten Tageszeiten Lampen einschalten und nach einer bestimmten Zeit wieder ausschalten.
      Das ist für mich kein Problem und funktioniert auch soweit für verschiedene Lampen und mit verschiedenen Bewegungsmeldern.

      Hier mal eines der Blockly-Scripte als Beispiel:

      Blockly.PNG

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="undefined" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="YM.#/9w.1y~Z9?XJhnN5" x="-737" y="-312">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="%jTnyCDn%PgYB{8*.0lt">
              <field name="oid">deconz.0.Sensors.38.presence</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="f`]_ZnrJPO+/s2gj8/sr">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_operation" id="Yy~I1gw@#1s|eb*^QU]s" inline="false">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_compare" id="r[c7):%ov;xLJI)7=6ST">
                      <field name="OP">EQ</field>
                      <comment pinned="false" h="53" w="139">Hier nog den wert Bewegung rein</comment>
                      <value name="A">
                        <block type="get_value" id="sqj9[y%2m,F4*NXI!T,-">
                          <field name="ATTR">val</field>
                          <field name="OID">deconz.0.Sensors.38.presence</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="`]V~(Hc7DDwYjOh=4tq=">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="time_compare" id="|aO7.)q!RGOq;}PjafsQ">
                      <mutation end_time="true"></mutation>
                      <field name="OPTION">between</field>
                      <field name="START_TIME">16:00</field>
                      <field name="END_TIME">23:30</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="timeouts_cleartimeout" id="7rw,zduV-62(pcZLAR4;">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="control" id="mI`EgR`8+db0n(%}Vc8)">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-1#259E76#1.Relay0.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="oVMRZlhJOU{,VJk)%39h">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="control" id="!:/RPg{2#fSDK*t9QvL3">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">shelly.0.SHSW-1#50093B#1.Relay0.Switch</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="bSq]eby#Yi?K]%BVt=?5">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                          <next>
                            <block type="telegram" id="zn^H--Fs{DIKJ+ag@TjA" disabled="true">
                              <field name="INSTANCE"></field>
                              <field name="LOG"></field>
                              <field name="SILENT">FALSE</field>
                              <field name="PARSEMODE">default</field>
                              <value name="MESSAGE">
                                <shadow type="text" id="`iIiT6Hh[lQEBiHOU@!D">
                                  <field name="TEXT">Licht in der Küche eingeschaltet.</field>
                                </shadow>
                              </value>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_operation" id="/-_f3+ASJ5XKG_mMgs@," inline="false">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_compare" id="{o^.hqVW39lTed3knIlm">
                      <field name="OP">EQ</field>
                      <comment pinned="false" h="53" w="139">Hier nog den wert Bewegung rein</comment>
                      <value name="A">
                        <block type="get_value" id="pHv;,Z39DwtkG9XuOhs#">
                          <field name="ATTR">val</field>
                          <field name="OID">deconz.0.Sensors.38.presence</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="5btnzvrp:f2#:u`x,wC~">
                          <field name="BOOL">FALSE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="time_compare" id="Q~sZ.8CNwwI~oqY(:B^$">
                      <mutation end_time="true"></mutation>
                      <field name="OPTION">between</field>
                      <field name="START_TIME">16:00</field>
                      <field name="END_TIME">23:30</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="timeouts_cleartimeout" id="48kyiz7c9o!iu:6.^{Vw">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="timeouts_settimeout" id="EWUG;n=f.[20rin0,hE9">
                      <field name="NAME">timeout</field>
                      <field name="DELAY">60</field>
                      <field name="UNIT">sec</field>
                      <statement name="STATEMENT">
                        <block type="control" id="n,cWi0{qY;;2M`YgMX#.">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">shelly.0.SHSW-1#1CE4B8#1.Relay0.Switch</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="/rl|kRWsx3,,oO79(wuR">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="8O}+x|ARl|bt)pnwDD_z">
                              <mutation delay_input="true"></mutation>
                              <field name="OID">shelly.0.SHSW-1#259E76#1.Relay0.Switch</field>
                              <field name="WITH_DELAY">TRUE</field>
                              <field name="DELAY_MS">1000</field>
                              <field name="UNIT">ms</field>
                              <field name="CLEAR_RUNNING">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="~3M?gNm=L$st*leAdJk3">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="vev+r;;J{;?-:vR1QR+^">
                                  <mutation delay_input="true"></mutation>
                                  <field name="OID">shelly.0.SHSW-1#50093B#1.Relay0.Switch</field>
                                  <field name="WITH_DELAY">TRUE</field>
                                  <field name="DELAY_MS">2000</field>
                                  <field name="UNIT">ms</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="37q6I9S@6`lnYp/6t;m_">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="telegram" id=";tgX+7%y|DPx*aV{(p`v" disabled="true">
                                      <field name="INSTANCE"></field>
                                      <field name="LOG"></field>
                                      <field name="SILENT">FALSE</field>
                                      <field name="PARSEMODE">default</field>
                                      <value name="MESSAGE">
                                        <shadow type="text" id="B;Q+mI`b_NetqXR{(0@{">
                                          <field name="TEXT">Licht in der Küche ausgeschaltet.</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      Nun möchte ich aber noch zusätzlich, das dies nur an bestimmten Tagen auslöst, sprich z.b. nur von Montag-Donnerstag.

      Und da komme ich nicht weiter, habe versucht es mit einem Zeitplan zu machen aber bin da grandios dran gescheitert.

      Kann mir da jemand helfen?

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

        @Ash2k sagte in Bewegungsmelder nur an bestimmten Tagen:

        Nun möchte ich aber noch zusätzlich, das dies nur an bestimmten Tagen auslöst, sprich z.b. nur von Montag-Donnerstag.

        So vielleicht ?

        Bildschirmfoto 2020-01-29 um 22.28.10.png

        Wenn einzelne Tage dann mit oder und Tagnummer einzeln

        Bildschirmfoto 2020-01-29 um 22.33.26.png

        <xml xmlns="http://www.w3.org/1999/xhtml">
          <variables>
            <variable type="undefined" id="timeout">timeout</variable>
          </variables>
          <block type="on_ext" id="YM.#/9w.1y~Z9?XJhnN5" x="-737" y="-312">
            <mutation items="1"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="%jTnyCDn%PgYB{8*.0lt">
                <field name="oid">deconz.0.Sensors.38.presence</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="f`]_ZnrJPO+/s2gj8/sr">
                <mutation elseif="1"></mutation>
                <value name="IF0">
                  <block type="logic_operation" id="Yy~I1gw@#1s|eb*^QU]s" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_compare" id="r[c7):%ov;xLJI)7=6ST">
                        <field name="OP">EQ</field>
                        <comment pinned="false" h="53" w="139">Hier nog den wert Bewegung rein</comment>
                        <value name="A">
                          <block type="get_value" id="sqj9[y%2m,F4*NXI!T,-">
                            <field name="ATTR">val</field>
                            <field name="OID">deconz.0.Sensors.38.presence</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="`]V~(Hc7DDwYjOh=4tq=">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_operation" id="V4Qg$EiXl/L8]RB%)BBM" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="time_compare" id="|aO7.)q!RGOq;}PjafsQ">
                            <mutation end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">16:00</field>
                            <field name="END_TIME">23:30</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="H|NsGNw,-?`R02wXf{D)">
                            <field name="OP">LT</field>
                            <value name="A">
                              <block type="time_get" id="JsWKoIhr?!tt?fI+*)]M">
                                <mutation format="false" language="false"></mutation>
                                <field name="OPTION">wd</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="e$Q*xmVZ{z7Q$zv;*{Ry">
                                <field name="NUM">5</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="timeouts_cleartimeout" id="7rw,zduV-62(pcZLAR4;">
                    <field name="NAME">timeout</field>
                    <next>
                      <block type="control" id="mI`EgR`8+db0n(%}Vc8)">
                        <mutation delay_input="false"></mutation>
                        <field name="OID">shelly.0.SHSW-1#259E76#1.Relay0.Switch</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="oVMRZlhJOU{,VJk)%39h">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="!:/RPg{2#fSDK*t9QvL3">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">shelly.0.SHSW-1#50093B#1.Relay0.Switch</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="bSq]eby#Yi?K]%BVt=?5">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                            <next>
                              <block type="telegram" id="zn^H--Fs{DIKJ+ag@TjA" disabled="true">
                                <field name="INSTANCE"></field>
                                <field name="LOG"></field>
                                <field name="SILENT">FALSE</field>
                                <field name="PARSEMODE">default</field>
                                <value name="MESSAGE">
                                  <shadow type="text" id="`iIiT6Hh[lQEBiHOU@!D">
                                    <field name="TEXT">Licht in der Küche eingeschaltet.</field>
                                  </shadow>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF1">
                  <block type="logic_operation" id="LJC)NoJ:`:`n[UMV$pm%" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_compare" id="~Iy%)?A%H@n@R8XVDJRr">
                        <field name="OP">EQ</field>
                        <comment pinned="false" h="53" w="139">Hier nog den wert Bewegung rein</comment>
                        <value name="A">
                          <block type="get_value" id="ZX*q.0*zK^umC|d7tTkN">
                            <field name="ATTR">val</field>
                            <field name="OID">deconz.0.Sensors.38.presence</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="/#,E(pmTm.u?@|9SH8Ak">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_operation" id="qxThzSeux%Rb(]~NRRUU" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="time_compare" id="u.vT(/IR-y|kjQh[lX=O">
                            <mutation end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">16:00</field>
                            <field name="END_TIME">23:30</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="E/?Br~VGnNNou=bwO%vx">
                            <field name="OP">LT</field>
                            <value name="A">
                              <block type="time_get" id="*_yh8i8.Q(c@vm:`W[w*">
                                <mutation format="false" language="false"></mutation>
                                <field name="OPTION">wd</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="SuW?8j:ANkYc#Lx([AZ;">
                                <field name="NUM">5</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO1">
                  <block type="timeouts_cleartimeout" id="48kyiz7c9o!iu:6.^{Vw">
                    <field name="NAME">timeout</field>
                    <next>
                      <block type="timeouts_settimeout" id="EWUG;n=f.[20rin0,hE9">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">60</field>
                        <field name="UNIT">sec</field>
                        <statement name="STATEMENT">
                          <block type="control" id="n,cWi0{qY;;2M`YgMX#.">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">shelly.0.SHSW-1#1CE4B8#1.Relay0.Switch</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="/rl|kRWsx3,,oO79(wuR">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                            <next>
                              <block type="control" id="8O}+x|ARl|bt)pnwDD_z">
                                <mutation delay_input="true"></mutation>
                                <field name="OID">shelly.0.SHSW-1#259E76#1.Relay0.Switch</field>
                                <field name="WITH_DELAY">TRUE</field>
                                <field name="DELAY_MS">1000</field>
                                <field name="UNIT">ms</field>
                                <field name="CLEAR_RUNNING">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="~3M?gNm=L$st*leAdJk3">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="vev+r;;J{;?-:vR1QR+^">
                                    <mutation delay_input="true"></mutation>
                                    <field name="OID">shelly.0.SHSW-1#50093B#1.Relay0.Switch</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">2000</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="37q6I9S@6`lnYp/6t;m_">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="telegram" id=";tgX+7%y|DPx*aV{(p`v" disabled="true">
                                        <field name="INSTANCE"></field>
                                        <field name="LOG"></field>
                                        <field name="SILENT">FALSE</field>
                                        <field name="PARSEMODE">default</field>
                                        <value name="MESSAGE">
                                          <shadow type="text" id="B;Q+mI`b_NetqXR{(0@{">
                                            <field name="TEXT">Licht in der Küche ausgeschaltet.</field>
                                          </shadow>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        

        A 1 Reply Last reply Reply Quote 0
        • A
          Ash2k @dslraser last edited by

          @dslraser

          man lernt nie aus, ich hatte mir das mit den Wochentagen als Nummer angesehen aber nicht verstanden...aber scheinbar ganz einfach 1=Montag, 2=Dienstag usw?!?

          Manchmal kann es so einfach sein 😄

          Ich probiere es morgen mal aus!

          1 Reply Last reply Reply Quote 0
          • A
            Ash2k last edited by

            Bislang funktioniert es so ohne Probleme, Danke für die schnelle Hilfe! 🙂

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

            Support us

            ioBroker
            Community Adapters
            Donate

            919
            Online

            31.9k
            Users

            80.1k
            Topics

            1.3m
            Posts

            2
            4
            334
            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