Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Steckdose verzögert ausschalten

    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

    Steckdose verzögert ausschalten

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

      Vielen Dank, funktioniert einwandfrei!

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

        Nur mit meinem Handy funktioniert das gut. Jetzt hab ich versucht auch das Handy von meiner Frau mit einzubinden.

        Die Steckdose soll nur ausschalten wenn beide außer Haus sind. Wenn einer noch zuhause ist soll sie an bleiben.

        Leider funktioniert das nicht. Sobald einer von beiden testweise sein Wlan ausschaltet schaltet auch die Steckdose ab obwohl der andere noch im Wlan ist. Sieht jemand meinen Fehler?

        6697_blockly.png

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

          Ich weiß nicht ob ich es richtig verstanden habe, aber vielleicht so…?

          ! ````
          <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id=":|*wI_yl~;=[jd^wxIaX" x="-437" y="-138"><mutation items="2"></mutation>
          <field name="CONDITION">ne</field>

          <value name="OID0"><shadow type="field_oid" id="N%Qs(~jB3}{[+)ft@zZb"><field name="oid">javascript.1.Bluetooth.Device.7c2f80d17bd2.lastState</field></shadow></value> 
          <value name="OID1"><shadow type="field_oid" id="tCD8.wX4?usFO1O_o=sP"><field name="oid">default</field></shadow></value> 
          <statement name="STATEMENT"><block type="controls_if" id="MWr?=5Rc=O#(-H+3sF%V"><mutation elseif="1"></mutation>
              <value name="IF0"><block type="logic_operation" id="LL*tgdlry?DDLGx2PU++" inline="false"><field name="OP">OR</field>
                  <value name="A"><block type="logic_compare" id=":e`,63VnN^d+*L2]qc[i"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="LdAdt(FIp.Qaut:Q?LKS"><field name="ATTR">val</field>
                          <field name="OID">javascript.1.Bluetooth.Device.7c2f80d17bd2.lastState</field></block></value> 
                      <value name="B"><block type="logic_boolean" id="tp82#wr{Bkk7NpPLpqup"><field name="BOOL">TRUE</field></block></value></block></value> 
                  <value name="B"><block type="logic_compare" id="!JliWy#}E3oSZv5;Gpos"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="rR^~`SK7JJK@WWZVm:a+"><field name="ATTR">val</field>
                          <field name="OID">javascript.1.Bluetooth.Device.7c2f80d17bd2.lastState</field></block></value> 
                      <value name="B"><block type="logic_boolean" id="oCJvS:U8,B61,dYlEVI^"><field name="BOOL">TRUE</field></block></value></block></value></block></value> 
              <statement name="DO0"><block type="control" id="5:n6a3`*kC=)FY{^GdJJ"><mutation delay_input="false"></mutation>
                  <field name="OID">sonoff.0.Sonoff POW 3er.POWER</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE"><block type="logic_boolean" id="i)w.i,?1gycyOhm(X3QX"><field name="BOOL">TRUE</field></block></value></block></statement> 
              <value name="IF1"><block type="logic_operation" id="f3`*P^HYf3i46qI]M^UZ" inline="false"><field name="OP">AND</field>
                  <value name="A"><block type="logic_compare" id="XT*ki,(suZLi8[}nnd_F"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="ofH.2LdM8my%P#:+`%Cl"><field name="ATTR">val</field>
                          <field name="OID">javascript.1.Bluetooth.Device.7c2f80d17bd2.lastState</field></block></value> 
                      <value name="B"><block type="logic_boolean" id="z7brw.McTt==t@SGY]ly"><field name="BOOL">FALSE</field></block></value></block></value> 
                  <value name="B"><block type="logic_compare" id="`O*DH(W%w~Hn[nfZzIt!"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="zRfsL5~mqqB8sZw{d}2N"><field name="ATTR">val</field>
                          <field name="OID">javascript.1.Bluetooth.Device.7c2f80d17bd2.lastState</field></block></value> 
                      <value name="B"><block type="logic_boolean" id="NqxWh9}u(U/kLVo;*,:k"><field name="BOOL">FALSE</field></block></value></block></value></block></value> 
              <statement name="DO1"><block type="timeouts_cleartimeout" id="!#L~*:}X|PzA|.-79%)2"><field name="NAME">timeout</field>
                  <next><block type="timeouts_settimeout" id="b.R/)AOT=x/74Je0UW4S"><field name="NAME">timeout</field>
                      <field name="DELAY">15</field>
                      <field name="UNIT">min</field>
                      <statement name="STATEMENT"><block type="control" id="h%-=?/AUJ*A9f@~=DJEr"><mutation delay_input="false"></mutation>
                          <field name="OID">sonoff.0.Sonoff POW 3er.POWER</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE"><block type="logic_boolean" id="M6=CF?U1q?qnR05i-dZj"><field name="BOOL">FALSE</field></block></value></block></statement></block></next></block></statement></block></statement></block></xml> 
          
          
           ![3822_test.jpg](/assets/uploads/files/3822_test.jpg) 
          1 Reply Last reply Reply Quote 0
          • Bluemoon
            Bluemoon last edited by

            6284_zwischenablage02.jpg

            Du musst bei der und bzw oder Verknüpfung jeweils eine abfrage machen, dann sollte es gehen.

            Viel Spaß

            Gruß Bluemoon

            ps.

            damit und/oder untereinander steht, rechts klicken und auf externen Eingang umschalten.

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

              Danke, funktioniert einwandfrei!

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

                @Apropo:

                Danke, funktioniert einwandfrei! `

                Nur zu meinem Verständnis, welches Blockly funktioniert denn jetzt bei Dir ?

                Ich habe so etwas ähnliches vor und habe es mit anderen Geräten nachgestellt.

                Konkret habe ich zwei Präsenzmelder und eine Steckdose, an der eine Lampe hängt genommen.

                Bei mir funktioniert mein Script, aber vielleicht gibt es ja auch mehrere Wege die funktionieren.

                In meinem Beispiel: wenn einer der beiden Präsenzmelder eine Bewegung erkennt, also seinen Zustand ändert, (bei Dir dann die Handys im WLAN),

                dann wird die Steckdose eingeschaltet wenn der geänderte Zustand mindestens eines Melders (Handys) wahr ist/wird.

                Sollte noch mindestens ein Präsenzmelder (bei Dir mindestens ein Handy ist wahr) eine Bewegung erkennen passiert nichts, die Steckdose bleibt an.

                Wenn beide Bewegungsmelder (bei Dir wieder beide Handys) auf false wechseln/der Zustand auf unwahr gewechselt wird, läuft der Timer mit der eingestellten Zeit los und die Steckdose geht aus.

                Wenn jetzt während dieser Zeit, in der der Timer läuft wieder ein Präsenzmelder, oder auch beide Präsenzmelder( Deine Handys) wieder auf wahr wechseln wird der Timer gestoppt.

                Ich habe das bei mir so probiert und es funktioniert. Aber ist es denn auch richtig ? (weil die oben aufgeführten Vorschläge komplett anders aussehen ?)

                Hier noch ein Blockly Export von meinem Script

                ! ````
                <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="^#-F|-hS_c`jHqjr02bg" x="-588" y="-387"><mutation items="2"></mutation>
                <field name="CONDITION">ne</field>

                <comment pinned="true" h="48" w="223">Trigger, falls sich der Zustand von Handy 1 oder Handy 2 ändert</comment>
                <value name="OID0"><shadow type="field_oid" id="Alk}@/p3LUfi)W{gm;ci"><field name="oid">default</field></shadow></value> 
                <value name="OID1"><shadow type="field_oid" id="ynzI0PQCmD5AT@2A[0XJ"><field name="oid">default</field></shadow></value> 
                <statement name="STATEMENT"><block type="timeouts_cleartimeout" id="A.r/q]7NP],WOajnH*RZ"><field name="NAME">timeout</field>
                    <comment pinned="true" h="43" w="361">wenn innerhalb der 30 Sekunden wieder mindestens 1 Handy erreichbar, dann stoppe den Timer erreichbar</comment>
                    <next><block type="controls_if" id="tlwC+!,i8l72Ln@mc(@o"><mutation elseif="1"></mutation>
                        <value name="IF0"><block type="logic_operation" id="!U[Bw6v6)JaURE2iv5b|" inline="false"><field name="OP">AND</field>
                            <value name="A"><block type="logic_operation" id="ry.Lxcvr}S:9_{1Ug`:i" inline="false"><field name="OP">OR</field>
                                <value name="A"><block type="logic_compare" id="/3tUVJP6h;wLIfZijY?^"><field name="OP">EQ</field>
                                    <value name="A"><block type="get_value" id="hOME?s{#9Lzy#Fl|?zy8"><field name="ATTR">val</field>
                                        <field name="OID">ID auswählen</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="nhcI!27`Ac_e@C7Tynn@"><field name="BOOL">TRUE</field>
                                        <comment pinned="true" h="32" w="193">falls Handy 1 oder 2 erreichbar</comment></block></value></block></value> 
                                <value name="B"><block type="logic_compare" id="8E32oNgCGo/Oj{^NHocX"><field name="OP">EQ</field>
                                    <value name="A"><block type="get_value" id="j/H]k1+%d]1EGtaI/_rz"><field name="ATTR">val</field>
                                        <field name="OID">ID auswählen</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="JVC2H)Lm:N]:p`Ngrq[e"><field name="BOOL">TRUE</field>
                                        <comment pinned="true" h="33" w="198">falls Handy 1 oder 2 erreichbar</comment></block></value></block></value></block></value> 
                            <value name="B"><block type="logic_compare" id="GgBA-Q0MV*-GrOwHFYn."><field name="OP">EQ</field>
                                <value name="A"><block type="get_value" id="Qyd]FN*za;N/L`J0r!`-"><field name="ATTR">val</field>
                                    <field name="OID">ID auswählen</field></block></value> 
                                <value name="B"><block type="logic_boolean" id="[|#xh6;@E^3QPM_Lv.Vc"><field name="BOOL">FALSE</field>
                                    <comment pinned="true" h="32" w="204">und falls Gerät aus ist...(Steckdose)</comment></block></value></block></value></block></value> 
                        <statement name="DO0"><block type="control" id="!dnJ.dQI^XjQ8tK;6=}H"><mutation delay_input="false"></mutation>
                            <field name="OID">Object ID</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <comment pinned="true" h="35" w="214">dann schalte Gerät (Steckdose ein)</comment>
                            <value name="VALUE"><block type="logic_boolean" id=";#Snq=X,,@z5kk,y0:ki"><field name="BOOL">TRUE</field></block></value></block></statement> 
                        <value name="IF1"><block type="logic_operation" id="UA4BIaZ+hA-,@w[)DP1%" inline="false"><field name="OP">AND</field>
                            <value name="A"><block type="logic_operation" id="?.-In,E?^LzLhaPKe^0j" inline="false"><field name="OP">AND</field>
                                <value name="A"><block type="logic_compare" id="E!Sly^7B#;^M[_h3R0iG"><field name="OP">EQ</field>
                                    <value name="A"><block type="get_value" id="AI|#}BSSj1KZCQ`{ji5^"><field name="ATTR">val</field>
                                        <field name="OID">ID auswählen</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="/!jh)SQsL)1Ok+SR!tzH"><field name="BOOL">FALSE</field>
                                        <comment pinned="true" h="38" w="241">wenn Handy 1 und Handy 2 nicht erreichbar</comment></block></value></block></value> 
                                <value name="B"><block type="logic_compare" id="!W#,uc!ljV1/qJRMTn2I"><field name="OP">EQ</field>
                                    <value name="A"><block type="get_value" id="XD80]/CK,NK%AcYJ|m{4"><field name="ATTR">val</field>
                                        <field name="OID">ID auswählen</field></block></value> 
                                    <value name="B"><block type="logic_boolean" id="H~YN-%c3FOyzf4I(cBr]"><field name="BOOL">FALSE</field>
                                        <comment pinned="true" h="38" w="242">wenn Handy 1 und Handy 2 nicht erreichbar</comment></block></value></block></value></block></value> 
                            <value name="B"><block type="logic_compare" id="`FphRIt|0nul()eykhVc"><field name="OP">EQ</field>
                                <value name="A"><block type="get_value" id="|EGX8j[isT4[5YA9K:iK"><field name="ATTR">val</field>
                                    <field name="OID">ID auswählen</field></block></value> 
                                <value name="B"><block type="logic_boolean" id="[]}99B@j7{SZzC(6~rPe"><field name="BOOL">TRUE</field>
                                    <comment pinned="true" h="38" w="155">und das Gerät noch an ist</comment></block></value></block></value></block></value> 
                        <statement name="DO1"><block type="timeouts_settimeout" id="=)|hV^+*V5]=;{Em~Omp"><field name="NAME">timeout</field>
                            <field name="DELAY">30</field>
                            <field name="UNIT">sec</field>
                            <comment pinned="true" h="32" w="243">schalte das Gerät 30 Sekunden später aus</comment>
                            <statement name="STATEMENT"><block type="control" id="Fm*S}jKLVd4/90`ke[ly"><mutation delay_input="false"></mutation>
                                <field name="OID">Object ID</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE"><block type="logic_boolean" id="okn}Jn}1qjwOX~CsqoV0"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement></block></next></block></statement></block></xml> 
                
                
                 ![3822_timer.jpg](/assets/uploads/files/3822_timer.jpg) 
                1 Reply Last reply Reply Quote 0
                • A
                  Apropo last edited by

                  Ich habs jetzt folgendermaßen gelöst. Anscheinend führen mehrere Wege zum gleichen Ergebnis

                  6697_blockly.png

                  1 Reply Last reply Reply Quote 0
                  • J
                    J Riemann last edited by

                    Wenn ich mich nicht täusche ist die doppelte Abfrag „Handy unwahr“ überflüssig. 6696_2c2737eb-ae41-4b6f-9259-a709674f3a98.jpeg

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

                      @J Riemann:

                      Wenn ich mich nicht täusche ist die doppelte Abfrag „Handy unwahr“ überflüssig. filename="2C2737EB-AE41-4B6F-9259-A709674F3A98.jpeg" index="0">~~ ` ja, das denke ich auch…

                      sieht irgendwie alles doppelt gemoppelt aus.

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

                        Ihr habt natürlich recht. Ich habe die eine Abfrage jetzt raus genommen und es funktioniert auch so.

                        Die doppelte Abfrage hatte ich so aus dem Vorschlag von Bluemoon am Anfang übernommen und mir ist der "Fehler" nicht aufgefallen.

                        Jetzt sieht es so aus:

                        6697_blockly.png

                        Danke nochmal!

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        808
                        Online

                        31.9k
                        Users

                        80.2k
                        Topics

                        1.3m
                        Posts

                        4
                        12
                        1150
                        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