Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [gelöst] Blockly Licht über Bewegungsmelder, Dauerlicht über Taster

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    17
    1
    597

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    5.6k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

[gelöst] Blockly Licht über Bewegungsmelder, Dauerlicht über Taster

Scheduled Pinned Locked Moved Skripten / Logik
48 Posts 8 Posters 13.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rantanplanR Offline
    rantanplanR Offline
    rantanplan
    wrote on last edited by
    #41

    @marphDE:

    habe das Script auch mal so nachgebaut, allerdings mit der Ausnahme das ich keine Taster zum auswerten der manuellen Schaltung nutze sondern einfach den momentanen Status der Lampe auswerte um zu entscheiden ob manuell geschalten oder nicht.

    Leider geht bei mir die Lampe anscheinen nicht mehr aus nach den 3 Minuten. `
    Setze mal direkt vor dem Timer ein "Stop timer".

    Also da wo der Kommentar "Leuchten 3 Min. an" steht.

    Grüße

    Rantanplan

    CCU3 / MS Server 2019(VM) / Scripten mit Blockly

    1 Reply Last reply
    0
    • M Offline
      M Offline
      marphDE
      wrote on last edited by
      #42

      habe ich getan, leider bleibt die Lampe an auch wenn der BWM bereits auf false steht.

      1 Reply Last reply
      0
      • rantanplanR Offline
        rantanplanR Offline
        rantanplan
        wrote on last edited by
        #43

        @marphDE:

        habe ich getan, leider bleibt die Lampe an auch wenn der BWM bereits auf false steht. `
        So wie Du das vor hast, wird es auch nicht funktionieren.

        Grüße

        Rantanplan

        CCU3 / MS Server 2019(VM) / Scripten mit Blockly

        1 Reply Last reply
        0
        • M Offline
          M Offline
          marphDE
          wrote on last edited by
          #44

          was mache ich denn falsch bzw. wie könnte ich das umsetzen ?

          1 Reply Last reply
          0
          • rantanplanR Offline
            rantanplanR Offline
            rantanplan
            wrote on last edited by
            #45

            @marphDE:

            was mache ich denn falsch bzw. wie könnte ich das umsetzen ? `
            Hallo marphDE

            Der Titel dieses Threads lautet "….Dauerlicht über Taster" und ist [gelöst]

            Dein Vorhaben hat nichts mit dem Thema zutun.

            Zudem verstehe ich auch nicht richtig was Du vorhast.

            Mach doch bitte einen neuen Thread auf und beschreibe Dein Problem/Vorhaben genauer.

            Grüße

            Rantanplan

            CCU3 / MS Server 2019(VM) / Scripten mit Blockly

            1 Reply Last reply
            0
            • M Offline
              M Offline
              marphDE
              wrote on last edited by
              #46

              auch das hatte ich bereits, allerdings kam ich dabei null weiter und habe es nun mit diesem Script hier versucht.

              Ich wollte einfach Licht und Sonos per BWM einschalten, aber nur dann wenn es nicht bereits vorher manuell angeschalten war.

              Bzw. 1. Wenn an -> Keine Änderrung per BWM (muss manuell ausgeschalten werden).

              2. Wenn aus -> Bewegungsmelder schaltet Licht und Sonos ein (wird automatisch ausgeschalten)

              hier der Link dazu: http://forum.iobroker.net/viewtopic.php … ilit=Sonos

              1 Reply Last reply
              0
              • rantanplanR Offline
                rantanplanR Offline
                rantanplan
                wrote on last edited by
                #47

                @marphDE:

                hier der Link dazu: http://forum.iobroker.net/viewtopic.php … ilit=Sonos `
                Und da hast Du Dich auch nicht mehr gemeldet. :roll:

                Grüße

                Rantanplan

                CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SoerenKaiser99
                  wrote on last edited by
                  #48

                  Moin Zs & frohe Weihnachten :)

                  tolles Skript & super Idee!

                  Da ichs grad nachgebaut habe, hier der komplette Code zum kopieren:

                   <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="6pd/xciykWrf#,/RkX%W" x="-1688" y="-963"><mutation items="1"></mutation>
                      <field name="CONDITION">true</field>
                  
                      <value name="OID0"><shadow type="field_oid" id="jpxnz})h~8%*H1Tfe!G|"><field name="oid">zigbee.0.00158d00023f34e1.occupancy</field></shadow> 
                        <block type="logic_operation" id=",MsXJd2F67!F=dtje9aq"><field name="OP">AND</field>
                          <value name="A"><block type="logic_compare" id="m72*Le8d:a7pB}+#oaJ3"><field name="OP">EQ</field>
                              <value name="A"><block type="get_value" id="}%d-3jEZm:=UcMSKgCo."><field name="ATTR">val</field>
                                  <field name="OID">zigbee.0.00158d00023f34e1.occupancy</field></block></value> 
                              <value name="B"><block type="logic_boolean" id="oTD8^~ndr6:Mb(v6,5I6"><field name="BOOL">TRUE</field></block></value></block></value> 
                          <value name="B"><block type="time_compare_ex" id="+{@VLL|:gi~#k/j0pWk?"><mutation end_time="true" actual_time="true"></mutation>
                              <field name="USE_ACTUAL_TIME">TRUE</field>
                              <field name="OPTION">not between</field>
                              <value name="START_TIME"><shadow type="text" id="1[(WPy+={:AiX{b?hvgd"><field name="TEXT">12:00</field></shadow> 
                                <block type="time_astro" id="J!|CySOfjSiq5M,hi^%d"><field name="TYPE">sunrise</field>
                                  <field name="OFFSET">0</field></block></value> 
                              <value name="END_TIME"><shadow type="text" id="`QEn)Bq-kHk`*tVUG,Z5"><field name="TEXT">18:00</field></shadow> 
                                <block type="time_astro" id="hZc00OWZ6qAf~16x;92@"><field name="TYPE">sunset</field>
                                  <field name="OFFSET">0</field></block></value></block></value></block></value> 
                      <statement name="STATEMENT"><block type="controls_if" id="}[l(7.}CP@g:G9x6aFEg"><value name="IF0"><block type="logic_compare" id="VPjAhD]`.0]1lK5lJvU+"><field name="OP">EQ</field>
                              <value name="A"><block type="variables_get" id="DrWHe%XUh9Nnk,`aaY{)"><field name="VAR">Kueche_Licht_manuell</field></block></value> 
                              <value name="B"><block type="logic_boolean" id="x9cCshY.w:Ws/^-3T}FR"><field name="BOOL">FALSE</field></block></value></block></value> 
                          <statement name="DO0"><block type="procedures_callnoreturn" id="Tb|#Q@!7T;z#n{0gefM="><mutation name="LeuchteSchalten"><arg name="x"></arg></mutation> 
                              <value name="ARG0"><block type="logic_boolean" id="(F;{6ygml~3cw22**5rd"><field name="BOOL">TRUE</field></block></value> 
                              <next><block type="timeouts_settimeout" id="II3lv;mVPw+j|5f9,Ts6"><field name="NAME">timeout</field>
                                  <field name="DELAY">120000</field>
                                  <field name="UNIT">ms</field>
                                  <statement name="STATEMENT"><block type="controls_if" id="^Yh#3=Q:c|bL2yV6Y3,|"><value name="IF0"><block type="logic_compare" id="=|;WdiP;`t}~_NPS~ppj"><field name="OP">EQ</field>
                                          <value name="A"><block type="variables_get" id="jK25Gn0s*5#}O,88ki`T"><field name="VAR">Kueche_Licht_manuell</field></block></value> 
                                          <value name="B"><block type="logic_boolean" id="{WLO|B20tt!=Kv{^v4d}"><field name="BOOL">FALSE</field></block></value></block></value> 
                                      <statement name="DO0"><block type="procedures_callnoreturn" id="C|gBFV;|H0G0kiX.sos%"><mutation name="LeuchteSchalten"><arg name="x"></arg></mutation> 
                                          <value name="ARG0"><block type="logic_boolean" id="Op97M]g;p!(?2qX{5Zmu"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement></block></next></block></statement></block></statement></block> 
                    <block type="variables_set" id="4`Ix7sE|REGj#F`.Iv|h" x="-1088" y="-888"><field name="VAR">Kueche_Licht_manuell</field>
                      <value name="VALUE"><block type="logic_boolean" id="o+p;z5wf,^W~ybsF)Jyt"><field name="BOOL">FALSE</field></block></value></block> 
                    <block type="on_ext" id="y;21U{a(QUd~zbz7P4=n" x="-1062" y="-838"><mutation items="1"></mutation>
                      <field name="CONDITION">true</field>
                  
                      <value name="OID0"><shadow type="field_oid" id="Ig[)B3B`(*w;p5_9,(K["><field name="oid">sonoff.0.Küchenlicht.POWER</field></shadow></value> 
                      <statement name="STATEMENT"><block type="variables_set" id="[0vqh:][W%?un-`kB%3d"><field name="VAR">Kueche_Licht_manuell</field>
                          <value name="VALUE"><block type="logic_negate" id="z6r+!7{eC?2{e8Ak@Bax"><value name="BOOL"><block type="variables_get" id="ikrlXZk_+?(UvBLj}o}f"><field name="VAR">Kueche_Licht_manuell</field></block></value></block></value> 
                          <next><block type="controls_if" id="oQ/8VZ_VR8W3=a*Cz1/a"><mutation else="1"></mutation>
                              <value name="IF0"><block type="logic_compare" id="l-Kq.C,:NZ})Mo7?88gx"><field name="OP">EQ</field>
                                  <value name="A"><block type="variables_get" id="P_b9AhEv|DUNbUCnD~V9"><field name="VAR">Kueche_Licht_manuell</field></block></value> 
                                  <value name="B"><block type="logic_boolean" id="+q53(0dE^F4YZ(6,UFdG"><field name="BOOL">TRUE</field></block></value></block></value> 
                              <statement name="DO0"><block type="procedures_callnoreturn" id="S_+q~E~?i8y*R1Ybo9bY"><mutation name="LeuchteSchalten"><arg name="x"></arg></mutation> 
                                  <value name="ARG0"><block type="logic_boolean" id="^6|UBhjwwQs0JEwBJx8]"><field name="BOOL">TRUE</field></block></value></block></statement> 
                              <statement name="ELSE"><block type="procedures_callnoreturn" id="AV}Jzk[*c?bs@.y)_9Z^"><mutation name="LeuchteSchalten"><arg name="x"></arg></mutation> 
                                  <value name="ARG0"><block type="logic_boolean" id="_T5.%nC.;76l:NEc(m%x"><field name="BOOL">FALSE</field></block></value></block></statement></block></next></block></statement></block> 
                    <block type="procedures_defnoreturn" id="-Ts^et}f~sjE_@F_b@Zr" x="-1738" y="-562"><mutation><arg name="x"></arg></mutation> 
                      <field name="NAME">LeuchteSchalten</field>
                      <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                      <statement name="STACK"><block type="comment" id="*6FI2{TA*|L*sW+,L(}?"><field name="COMMENT">Funktion Leuchte ein- oder ausschalten</field>
                          <next><block type="controls_if" id="9?aGD0/BVm_Gr=?2ms+r"><value name="IF0"><block type="logic_compare" id="Yv]yu9}8NM]KwDy7Dkc5"><field name="OP">NEQ</field>
                                  <value name="A"><block type="get_value" id="7DWzNGXN52r-5ejij|N%"><field name="ATTR">val</field>
                                      <field name="OID">sonoff.0.Küchenlicht.POWER</field></block></value> 
                                  <value name="B"><block type="variables_get" id="WOJ,=X],[ZWF1cE5o.B#"><field name="VAR">x</field></block></value></block></value> 
                              <statement name="DO0"><block type="control" id="*B4#g]93@QAUExJcA+k4"><mutation delay_input="false"></mutation>
                                  <field name="OID">sonoff.0.Küchenlicht.POWER</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE"><block type="variables_get" id="L}Bsm|]1G@6~G)e^!?(i"><field name="VAR">x</field></block></value></block></statement></block></next></block></statement></block></xml> 
                  

                  Ich habe lediglich noch eine Funktion für Dunkelheit eingefügt da mein Bewegungsmelder (Occupancy) nur triggern soll wenn es Dämmert und bis es hell wird und die Zeit auf 2 Min. geändert.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  300

                  Online

                  32.7k

                  Users

                  82.6k

                  Topics

                  1.3m

                  Posts
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                  ioBroker Community 2014-2025
                  logo
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Home
                  • Recent
                  • Tags
                  • Unread 0
                  • Categories
                  • Unreplied
                  • Popular
                  • GitHub
                  • Docu
                  • Hilfe