Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Badlicht geht kurz nach dem Verlassen wieder an (Gelöst)

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Badlicht geht kurz nach dem Verlassen wieder an (Gelöst)

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

      Hallo,

      das ist das Skript von unserem Badlicht Ledstreifen. Es soll beim betreten durch einen Bewegungsmelder ausgelöst werden und beim verlassen durch einen Türkontakt ausgeschaltet werden. Das funktioniert auch eigentlich ganz gut.
      Nur leider geht das Licht kurz nach dem verlassen wieder an. Ich weiß nicht wo der Fehler liegt.

      Badlichtan.png

      J paul53 2 Replies Last reply Reply Quote 0
      • J
        Jan1 @lustig29 last edited by

        @lustig29
        Das ist etwas ungeschickt gelöst, Da Du ein PD des BWM über das Script änderst. Was ist, wen der BWM das Schließen der Tür erfasst? Genau, das Licht geht wieder an 😉
        Erst mal das ganz =wahr raus, weil unnötig (Grundfunktion des FALLS Block, dann würde ich das Licht einfach etwas verzögert ausschalten und den und den BWM DP gar nicht manuell ändern, da der eh wieder auf FALSE springt, wenn keine Bewegung erkannt wird.

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

          @lustig29 sagte: Es soll beim betreten durch einen Bewegungsmelder ausgelöst werden und beim verlassen durch einen Türkontakt ausgeschaltet werden.

          Damit während des Schließens der Tür der BWM nicht dazwischen funkt, sollte das Licht besser erst bei "Tür geschlossen" ausgeschaltet werden; aber nur dann, wenn es beim Öffnen der Tür eingeschaltet war. Vorschlag:

          Bild_2021-04-10_191236.png

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

            @paul53
            Hab es jetzt so gemacht, aber das Badlicht bleibt aus. Habe ich einen Fehler gemacht?

            Bad_Licht_Paul.png

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

              @lustig29 sagte: das Badlicht bleibt aus.

              Der obere Trigger, der das Licht einschaltet, macht das gleiche wie Dein BWM-Trigger: Bei Wechsel von falsch nach wahr sollte zwischen 20:00 Uhr und 4:29 Uhr das Licht eingeschaltet werden.

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

                @paul53 Was muss ich ändern damit es funktioniert?

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

                  @lustig29
                  978ce12a-2985-4a12-9f14-adffcf6063b3-image.png

                  paul53 L 2 Replies Last reply Reply Quote 0
                  • paul53
                    paul53 @MCU last edited by

                    @mcu

                    Bild_2021-04-11_001858.png

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

                      @mcu Habe ich gemacht, geht aber leider immer noch nicht

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

                        @lustig29 sagte: geht aber leider immer noch nicht

                        Poste bitte den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

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

                          <xml xmlns="https://developers.google.com/blockly/xml">
                            <variables>
                              <variable id="8MAF.csR[(52pI#qwi;?">Licht_war_ein</variable>
                            </variables>
                            <block type="on_ext" id="=nE#LR?z0:UzlZKC/5Ug" x="-1037" y="-312">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                              <field name="CONDITION">gt</field>
                              <field name="ACK_CONDITION"></field>
                              <value name="OID0">
                                <shadow type="field_oid" id="Zc9nOfd#Fs+m1z1d@20s">
                                  <field name="oid">deconz.0.Sensors.22.presence</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="#hwdGCHz(H??F9Y}~t[5">
                                  <value name="IF0">
                                    <block type="time_compare_ex" id="3T!R]d3|vGCT9,}H3vV1">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" 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="k$Po3v6n@Wy[z6.,)o}R">
                                          <field name="TEXT">04:29</field>
                                        </shadow>
                                      </value>
                                      <value name="END_TIME">
                                        <shadow type="text" id="):z1J,|3xLL,sm-8cL3.">
                                          <field name="TEXT">20:00</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id="b$_8eW^uoCp[wzvbK@Z|">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="^4kZ)%I$9Q5d`4.8]78}">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                              <next>
                                <block type="on_ext" id="O[[TUf8YZ-]Lrr4sVQRX">
                                  <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="Qn,oN#g}t;H@AFVS?QlL">
                                      <field name="oid">deconz.0.Sensors.9.open</field>
                                    </shadow>
                                  </value>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id="4JN=MX]Q`X{.ub|W[Jt#">
                                      <mutation elseif="1"></mutation>
                                      <value name="IF0">
                                        <block type="on_source" id="X?;z}=)3K]Zm5MsS~!,6">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="variables_set" id="{:pC$tlSnpUD``D.aVIy">
                                          <field name="VAR" id="8MAF.csR[(52pI#qwi;?">Licht_war_ein</field>
                                          <value name="VALUE">
                                            <block type="get_value" id="vf6e56ttbuhH({/]5ikV">
                                              <field name="ATTR">val</field>
                                              <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                      <value name="IF1">
                                        <block type="variables_get" id="LXO4YblF-l_%!n6!]ylf">
                                          <field name="VAR" id="8MAF.csR[(52pI#qwi;?">Licht_war_ein</field>
                                        </block>
                                      </value>
                                      <statement name="DO1">
                                        <block type="control" id="hpHn7Sr^w$9SuJk+Fm)y">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="R+q[t`=Yl#G6xyDoeiRD">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                            <block type="on_ext" id="i{jd{V.-z+h6y.(nlH!n" disabled="true" x="313" y="-112">
                              <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="^HBV`n$_ef6|?B+RC2%w">
                                  <field name="oid">deconz.0.Sensors.22.presence</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="F$@31zC[tDPP-Xlx3;WP">
                                  <value name="IF0">
                                    <block type="logic_operation" id="6N?S^%%PR,0SVYRTD@Bx" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="on_source" id="7VNmA)kB.aGnQJ5R7ii%">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="time_compare_ex" id="C.1.DJDdk%KF/)Ky^)GF">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" 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="UpRn]kA!s2-P/skVLMMd">
                                              <field name="TEXT">04:29</field>
                                            </shadow>
                                          </value>
                                          <value name="END_TIME">
                                            <shadow type="text" id="O!;[Y]vc8DTjxJPQDL|_">
                                              <field name="TEXT">17:00</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id="X,Yz`Fq2b7otAW*|iv/R">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="G[.UPk-gJ#)0l;dpJq}m">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                              <next>
                                <block type="on_ext" id="q|U6*z.*e]|:]gSGFDw/" disabled="true">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                  <field name="CONDITION">true</field>
                                  <field name="ACK_CONDITION"></field>
                                  <value name="OID0">
                                    <shadow type="field_oid" id="[8/]]Fek5Yj3M_Hva|JY">
                                      <field name="oid">deconz.0.Sensors.9.open</field>
                                    </shadow>
                                  </value>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id="sQs_!c258UK=#@`E-KF^">
                                      <value name="IF0">
                                        <block type="logic_operation" id="sul3BfDAr_Z6!xA5n2m!">
                                          <field name="OP">AND</field>
                                          <value name="A">
                                            <block type="on_source" id="LivL,vrQnLYL.BkjNJZS">
                                              <field name="ATTR">state.val</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_compare" id="(N67u;VC(f_X/nAziqfU">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="8$xx+]^0IQ{|[M!-L[%g">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="V`m}j#oC!ExZGa8y6xO-">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="control" id=".Otz2nuG-@pk-Y.]~M.0">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                          <field name="OID">tuya.0.874142072cf4321d6403.20</field>
                                          <field name="WITH_DELAY">TRUE</field>
                                          <field name="DELAY_MS">2</field>
                                          <field name="UNIT">sec</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="[:}udH%-ECHCgh_oV^$V">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </xml>
                          
                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @lustig29 last edited by

                            @lustig29
                            Kann keinen Fehler entdecken, sollte also funktionieren.

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

                              @paul53 Ok, ich werde es nochmal testen. Danke schon mal für eure Hilfe

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

                                @paul53 Es funktioniert leider nicht

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

                                  @lustig29 sagte: Es funktioniert leider nicht

                                  Das Licht schaltet nicht ein? Um die Ursache zu finden, ergänze mal um Debug-Ausgaben:

                                  Bild_2021-04-11_232636.png

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

                                    @paul53 Hat sich erledigt.
                                    Bwm hatte eine Macke. Habe ihn gleich entsorgt.😊

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

                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    564
                                    Online

                                    32.0k
                                    Users

                                    80.5k
                                    Topics

                                    1.3m
                                    Posts

                                    4
                                    16
                                    412
                                    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