Weiter zum Inhalt
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Hell
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dunkel
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Bei Bewegung und Licht schalten

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    5
    1
    153

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    8
    1
    178

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    876

Bei Bewegung und Licht schalten

Geplant Angeheftet Gesperrt Verschoben Blockly
3 Beiträge 3 Kommentatoren 220 Aufrufe 2 Beobachtet
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • S Offline
    S Offline
    Sarah
    schrieb am zuletzt editiert von Homoran
    #1

    Hallo, ich bin in sachen script schreiben vollkommen neu.

    Mein Ziel:
    Licht bei unterschreiten von 200 lux und erkannter Bewegung einschalten und falls keine Bewegung erkannt 5 min Später aus.

    Kann da einer helfen? Hardware hab ich Schalter und Sensoren von Xiaomi und als Gateway einen ConBee II.

    Mir fehlt sicher noch Übung.

    Versucht hab ich mit folgendem:

    <xml xmlns="https://developers.google.com/blockly/xml">
      <block type="on_ext" id="J^V:?i(?I[76Y)f51U|I" x="-263" y="-362">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">ne</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="]$w0#p=ciU2rOBf2G]?a">
            <field name="oid">default</field>
          </shadow>
          <block type="logic_compare" id="^_!,8bEk@r]*RH~#w`qr">
            <field name="OP">LT</field>
            <value name="A">
              <block type="get_value" id="6,b;Ld,lC2ZZ~)WoP/2.">
                <field name="ATTR">val</field>
                <field name="OID">deconz.0.Sensors.27.lux</field>
              </block>
            </value>
            <value name="B">
              <block type="math_number" id="[KidI)n#+QBW_brL5p*f">
                <field name="NUM">200</field>
              </block>
            </value>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="1?0XbxLFe^.|ZA@WMWP7">
            <mutation else="1"></mutation>
            <value name="IF0">
              <block type="logic_compare" id="q2[w$pyQY9Zc+nPS8T^d">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="get_value" id="nEpQZ;9Z)DVrl(6e-98/">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.Lights.11.on</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="*Q=:OGs_k5c(:X-p4#_a">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="control" id="*#Uh!TMj4SYlJw:^6|//">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                <field name="OID">deconz.0.Lights.11.on</field>
                <field name="WITH_DELAY">FALSE</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="a]k.d=zbPyw49|1T@bN9">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </statement>
            <statement name="ELSE">
              <block type="control" id="`?FeP*D:dM,8m}XBd|7U">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                <field name="OID">deconz.0.Lights.11.on</field>
                <field name="WITH_DELAY">TRUE</field>
                <field name="DELAY_MS">20</field>
                <field name="UNIT">sec</field>
                <field name="CLEAR_RUNNING">FALSE</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="qZ$IXjQ2NFg-xH!Dv[O+">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
              </block>
            </statement>
          </block>
        </statement>
      </block>
    </xml>
    

    MOD_Edit: Code in code-tags gesetzt!

    FredFF paul53P 2 Antworten Letzte Antwort
    0
    • S Sarah

      Hallo, ich bin in sachen script schreiben vollkommen neu.

      Mein Ziel:
      Licht bei unterschreiten von 200 lux und erkannter Bewegung einschalten und falls keine Bewegung erkannt 5 min Später aus.

      Kann da einer helfen? Hardware hab ich Schalter und Sensoren von Xiaomi und als Gateway einen ConBee II.

      Mir fehlt sicher noch Übung.

      Versucht hab ich mit folgendem:

      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="J^V:?i(?I[76Y)f51U|I" x="-263" y="-362">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="]$w0#p=ciU2rOBf2G]?a">
              <field name="oid">default</field>
            </shadow>
            <block type="logic_compare" id="^_!,8bEk@r]*RH~#w`qr">
              <field name="OP">LT</field>
              <value name="A">
                <block type="get_value" id="6,b;Ld,lC2ZZ~)WoP/2.">
                  <field name="ATTR">val</field>
                  <field name="OID">deconz.0.Sensors.27.lux</field>
                </block>
              </value>
              <value name="B">
                <block type="math_number" id="[KidI)n#+QBW_brL5p*f">
                  <field name="NUM">200</field>
                </block>
              </value>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="1?0XbxLFe^.|ZA@WMWP7">
              <mutation else="1"></mutation>
              <value name="IF0">
                <block type="logic_compare" id="q2[w$pyQY9Zc+nPS8T^d">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="nEpQZ;9Z)DVrl(6e-98/">
                      <field name="ATTR">val</field>
                      <field name="OID">deconz.0.Lights.11.on</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="*Q=:OGs_k5c(:X-p4#_a">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="control" id="*#Uh!TMj4SYlJw:^6|//">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">deconz.0.Lights.11.on</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="a]k.d=zbPyw49|1T@bN9">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </statement>
              <statement name="ELSE">
                <block type="control" id="`?FeP*D:dM,8m}XBd|7U">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                  <field name="OID">deconz.0.Lights.11.on</field>
                  <field name="WITH_DELAY">TRUE</field>
                  <field name="DELAY_MS">20</field>
                  <field name="UNIT">sec</field>
                  <field name="CLEAR_RUNNING">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="qZ$IXjQ2NFg-xH!Dv[O+">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      MOD_Edit: Code in code-tags gesetzt!

      FredFF Online
      FredFF Online
      FredF
      Most Active Forum Testing
      schrieb am zuletzt editiert von
      #2

      @Sarah
      hier mal ein Bespiel
      c98888e2-5139-4672-9fdf-ec35fbc0ee8f-grafik.png

      Wert findest du unter Trigger als Objekt ID Block, der per Drop Down auf Wert umgestellt wird. Bei erkannter Bewegung wird Wert = true

      1 Antwort Letzte Antwort
      0
      • S Sarah

        Hallo, ich bin in sachen script schreiben vollkommen neu.

        Mein Ziel:
        Licht bei unterschreiten von 200 lux und erkannter Bewegung einschalten und falls keine Bewegung erkannt 5 min Später aus.

        Kann da einer helfen? Hardware hab ich Schalter und Sensoren von Xiaomi und als Gateway einen ConBee II.

        Mir fehlt sicher noch Übung.

        Versucht hab ich mit folgendem:

        <xml xmlns="https://developers.google.com/blockly/xml">
          <block type="on_ext" id="J^V:?i(?I[76Y)f51U|I" x="-263" y="-362">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="]$w0#p=ciU2rOBf2G]?a">
                <field name="oid">default</field>
              </shadow>
              <block type="logic_compare" id="^_!,8bEk@r]*RH~#w`qr">
                <field name="OP">LT</field>
                <value name="A">
                  <block type="get_value" id="6,b;Ld,lC2ZZ~)WoP/2.">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.Sensors.27.lux</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="[KidI)n#+QBW_brL5p*f">
                    <field name="NUM">200</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="1?0XbxLFe^.|ZA@WMWP7">
                <mutation else="1"></mutation>
                <value name="IF0">
                  <block type="logic_compare" id="q2[w$pyQY9Zc+nPS8T^d">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="get_value" id="nEpQZ;9Z)DVrl(6e-98/">
                        <field name="ATTR">val</field>
                        <field name="OID">deconz.0.Lights.11.on</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="*Q=:OGs_k5c(:X-p4#_a">
                        <field name="BOOL">FALSE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="control" id="*#Uh!TMj4SYlJw:^6|//">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">deconz.0.Lights.11.on</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="a]k.d=zbPyw49|1T@bN9">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="control" id="`?FeP*D:dM,8m}XBd|7U">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                    <field name="OID">deconz.0.Lights.11.on</field>
                    <field name="WITH_DELAY">TRUE</field>
                    <field name="DELAY_MS">20</field>
                    <field name="UNIT">sec</field>
                    <field name="CLEAR_RUNNING">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="qZ$IXjQ2NFg-xH!Dv[O+">
                        <field name="BOOL">FALSE</field>
                      </block>
                    </value>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        

        MOD_Edit: Code in code-tags gesetzt!

        paul53P Offline
        paul53P Offline
        paul53
        schrieb am zuletzt editiert von paul53
        #3

        @Sarah sagte:

        Versucht hab ich mit folgendem:

        Der BWM muss triggern.

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable type="timeout" id="timeout">timeout</variable>
         </variables>
         <block type="comment" id="OSO=R5pTa5dd57(pCHBQ" x="-238" y="-387">
           <field name="COMMENT">BWM</field>
           <next>
             <block type="on_ext" id="J^V:?i(?I[76Y)f51U|I">
               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
               <field name="CONDITION">ne</field>
               <field name="ACK_CONDITION"></field>
               <value name="OID0">
                 <shadow type="field_oid" id="]$w0#p=ciU2rOBf2G]?a">
                   <field name="oid">default</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="%d|($)|c;/b1CQs_?eXp">
                   <mutation else="1"></mutation>
                   <value name="IF0">
                     <block type="on_source" id="?-T@4I@+ZNcSeEc5$$x:">
                       <field name="ATTR">state.val</field>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="timeouts_cleartimeout" id="G1m!h!r*477zG[FxYi4W">
                       <field name="NAME">timeout</field>
                       <next>
                         <block type="controls_if" id="1?0XbxLFe^.|ZA@WMWP7">
                           <value name="IF0">
                             <block type="logic_compare" id="^_!,8bEk@r]*RH~#w`qr">
                               <field name="OP">LT</field>
                               <value name="A">
                                 <block type="get_value" id="6,b;Ld,lC2ZZ~)WoP/2.">
                                   <field name="ATTR">val</field>
                                   <field name="OID">deconz.0.Sensors.27.lux</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="[KidI)n#+QBW_brL5p*f">
                                   <field name="NUM">200</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="control" id="*#Uh!TMj4SYlJw:^6|//">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">deconz.0.Lights.11.on</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="logic_boolean" id="a]k.d=zbPyw49|1T@bN9">
                                   <field name="BOOL">TRUE</field>
                                 </block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <statement name="ELSE">
                     <block type="timeouts_settimeout" id="i_.N-{0pYsV./^Gbd)9#">
                       <field name="NAME">timeout</field>
                       <field name="DELAY">5</field>
                       <field name="UNIT">min</field>
                       <statement name="STATEMENT">
                         <block type="control" id="`?FeP*D:dM,8m}XBd|7U">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">deconz.0.Lights.11.on</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="qZ$IXjQ2NFg-xH!Dv[O+">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
           </next>
         </block>
        </xml>
        

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        1 Antwort Letzte Antwort
        0

        Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.

        Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.

        Mit deinem Input könnte dieser Beitrag noch besser werden 💗

        Registrieren Anmelden
        Antworten
        • In einem neuen Thema antworten
        Anmelden zum Antworten
        • Älteste zuerst
        • Neuste zuerst
        • Meiste Stimmen


        Support us

        ioBroker
        Community Adapters
        Donate

        545

        Online

        32.8k

        Benutzer

        82.7k

        Themen

        1.3m

        Beiträge
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
        ioBroker Community 2014-2025
        logo
        • Anmelden

        • Du hast noch kein Konto? Registrieren

        • Anmelden oder registrieren, um zu suchen
        • Erster Beitrag
          Letzter Beitrag
        0
        • Home
        • Aktuell
        • Tags
        • Ungelesen 0
        • Kategorien
        • Unreplied
        • Beliebt
        • GitHub
        • Docu
        • Hilfe