Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Gelöst] Erkennung Anwesenheit / Abwesenheit per Wlan. Mein Skript ist noch fehlerhaft

    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] Erkennung Anwesenheit / Abwesenheit per Wlan. Mein Skript ist noch fehlerhaft

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

      Die Anwesenheit funktioniert so aber nicht korrekt….Die Zeitabfrage muss wenn überhaupt in den Triggerblock (das rote Objekt) rein.

      1 Reply Last reply Reply Quote 0
      • R
        Rippchen last edited by

        Welchen auslöser hast Du verwendet? Den active kann ich nicht verwenden da sich mein Iphone bei verwendung von "active" im Standby abmeldet und somit "abwesend" ist.

        1 Reply Last reply Reply Quote 0
        • V
          vaprinz last edited by

          Bei mir funktioniert es so auch ganz gut.

          Das ist mein erstes Skript!
          18700_anwesend.png

          1 Reply Last reply Reply Quote 0
          • BigWumpus
            BigWumpus last edited by

            Oje,

            2 Personen, 2 Handys, egal wer da = Anwesenheit ja, keiner da = nach 5 Minuten Anwesenheit aus, Wohnung aus.

            mein Anwesenheits-Script:

             <xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="TH,;gu3Xd0I)51=2wR}i" x="-413" y="-363"><field name="COMMENT">Anwesenheit Bernd</field>
                <next><block type="on" id="kfhthl4A_O7c}!^iGR`I"><field name="OID">tr-064.0.devices.Bernd-S9.active</field>
                    <field name="CONDITION">any</field>
                    <field name="ACK_CONDITION">true</field>
                    <statement name="STATEMENT"><block type="controls_if" id="h,hR16M;yVA1T7@}{FDq"><mutation else="1"></mutation>
                        <value name="IF0"><block type="variables_get" id="ROHg,c51][lDw5Elq9WQ"><field name="VAR">value</field></block></value> 
                        <statement name="DO0"><block type="update" id="?@YMzuJn`ZO[DfO2!HiI"><mutation delay_input="true"></mutation>
                            <field name="OID">admin.0.Anwesenheit.Bernd</field>
                            <field name="WITH_DELAY">TRUE</field>
                            <field name="DELAY_MS">0</field>
                            <field name="UNIT">ms</field>
                            <field name="CLEAR_RUNNING">TRUE</field>
                            <value name="VALUE"><block type="logic_boolean" id=",),eUcCn.}Q(RejIR6XX"><field name="BOOL">TRUE</field></block></value></block></statement> 
                        <statement name="ELSE"><block type="update" id="k)b?lWig(po!O1=%K3`0"><mutation delay_input="true"></mutation>
                            <field name="OID">admin.0.Anwesenheit.Bernd</field>
                            <field name="WITH_DELAY">TRUE</field>
                            <field name="DELAY_MS">5</field>
                            <field name="UNIT">min</field>
                            <field name="CLEAR_RUNNING">TRUE</field>
                            <value name="VALUE"><block type="logic_boolean" id="=f7~uNZjuwBm}Yi6AU-~"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement> 
                    <next><block type="comment" id="9:8E5Qz0#O]zSzEzHdl-"><field name="COMMENT">Anwesenheit Valentina</field>
                        <next><block type="on" id="|V:kU=)Z8](#y4o.Sn[k"><field name="OID">tr-064.0.devices.iPhone.active</field>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION">true</field>
                            <statement name="STATEMENT"><block type="controls_if" id="`=u0q7JK*r8ox}wp6{S."><mutation else="1"></mutation>
                                <value name="IF0"><block type="variables_get" id="S`zjp]fX{i6~*7mG4ywc"><field name="VAR">value</field></block></value> 
                                <statement name="DO0"><block type="update" id="DAU9B17C(EQZ!h2,w7X7"><mutation delay_input="true"></mutation>
                                    <field name="OID">admin.0.Anwesenheit.Val</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">0</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">TRUE</field>
                                    <value name="VALUE"><block type="logic_boolean" id="BLKO%x).AdcMLrb/f|h:"><field name="BOOL">TRUE</field></block></value></block></statement> 
                                <statement name="ELSE"><block type="update" id="Pn^N=BLa:mq(@.4@jq1Y"><mutation delay_input="true"></mutation>
                                    <field name="OID">admin.0.Anwesenheit.Val</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">5</field>
                                    <field name="UNIT">min</field>
                                    <field name="CLEAR_RUNNING">TRUE</field>
                                    <value name="VALUE"><block type="logic_boolean" id="6|t[3q?)X3!!%XkuHIRX"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement> 
                            <next><block type="schedule" id="=:%3E--`sgvxL#0Jwn/D" disabled="true"><field name="SCHEDULE">*/5 9-22 * * *</field>
                                <statement name="STATEMENT"><block type="controls_if" id="dc~4EAADd2J]xk`J[*@u"><value name="IF0"><block type="get_value" id="n1]K,(@]P7pB`q(CS{xG"><field name="ATTR">val</field>
                                        <field name="OID">admin.0.Anwesenheit.Val</field></block></value> 
                                    <statement name="DO0"><block type="controls_if" id="qtKy+#reegSQ]LiiZ,:e"><value name="IF0"><block type="logic_negate" id="pOH^Y1O{P0tL-8yDbfdW"><value name="BOOL"><block type="get_value" id="?!D4tDC=bYy_jRh#}[nn"><field name="ATTR">val</field>
                                                <field name="OID">tr-064.0.devices.iPhone.active</field></block></value></block></value> 
                                        <statement name="DO0"><block type="update" id="AgIOd}a8|;A.LTvtGW*~"><mutation delay_input="true"></mutation>
                                            <field name="OID">admin.0.Anwesenheit.Val</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">60</field>
                                            <field name="UNIT">min</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="VALUE"><block type="logic_boolean" id="fA;^.W@~/QC;-}*l9jTs"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement></block></statement> 
                                <next><block type="comment" id="si/kP(R[dy9l*+E]Wuk="><field name="COMMENT">Anwesenheit Irgendjemand</field>
                                    <next><block type="on_ext" id=":*j}F2t1pyx6Yj@P@==8"><mutation items="2"></mutation>
                                        <field name="CONDITION">ne</field>
            
                                        <value name="OID0"><shadow type="field_oid" id=";s5b0_,!u0C{AK/hhLTM"><field name="oid">admin.0.Anwesenheit.Bernd</field></shadow></value> 
                                        <value name="OID1"><shadow type="field_oid" id=":#zLyra}hnJthGnZ:zM-"><field name="oid">admin.0.Anwesenheit.Val</field></shadow></value> 
                                        <statement name="STATEMENT"><block type="update" id="^sMeY1%o2!5|[ZV:mgOo"><mutation delay_input="false"></mutation>
                                            <field name="OID">admin.0.Anwesenheit.Person</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE"><block type="logic_operation" id="T`]hKTTvk0^+Hjn?)QZ(" inline="false"><field name="OP">OR</field>
                                                <value name="A"><block type="get_value" id="l3JT}#:((!O3OsWa(B8L"><field name="ATTR">val</field>
                                                    <field name="OID">admin.0.Anwesenheit.Bernd</field></block></value> 
                                                <value name="B"><block type="get_value" id="e56o0lRxha7s}B2,c+?h"><field name="ATTR">val</field>
                                                    <field name="OID">admin.0.Anwesenheit.Val</field></block></value></block></value></block></statement> 
                                        <next><block type="on" id="OO)%KkH[6r(swsji*%m9"><field name="OID">admin.0.Anwesenheit.Person</field>
                                            <field name="CONDITION">ne</field>
            
                                            <statement name="STATEMENT"><block type="update" id="(x~j.2p4xN*XK%/N-v=."><mutation delay_input="false"></mutation>
                                                <field name="OID">admin.0.WoZi-Heizdecke.Switch</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE"><block type="variables_get" id="4;f5t0yf=Y~.d`8mR?[d"><field name="VAR">value</field></block></value> 
                                                <next><block type="controls_if" id="!f?6wt/Q~Qi9QLWE_WET"><mutation else="1"></mutation>
                                                    <value name="IF0"><block type="variables_get" id="RlnHGO.(X_]q##c,:Sl5"><field name="VAR">value</field></block></value> 
                                                    <statement name="DO0"><block type="timeouts_cleartimeout" id="b%jHZsPuzuBc8,wmn:c+"><field name="NAME">timeout</field></block></statement> 
                                                    <statement name="ELSE"><block type="timeouts_settimeout" id="f%p3lbDC~c+hfPd4@)m_"><field name="NAME">timeout</field>
                                                        <field name="DELAY">5</field>
                                                        <field name="UNIT">min</field>
                                                        <statement name="STATEMENT"><block type="update" id="bg}o;`[xKgaZ?IpO{=y3"><mutation delay_input="false"></mutation>
                                                            <field name="OID">admin.0.Alles_</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE"><block type="logic_boolean" id="_J3Q};?BaDJvRVVgh8.)"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></xml> 
            
            Röstkartoffel 1 Reply Last reply Reply Quote 0
            • A
              Atze68 last edited by

              @Rippchen:

              Welchen auslöser hast Du verwendet? Den active kann ich nicht verwenden da sich mein Iphone bei verwendung von "active" im Standby abmeldet und somit "abwesend" ist. `

              Hallo, mich würde das auch interessieren. Mein Handy geht nach paar Minuten in den Standby und die Abfrage geht auf "false" dann bin ich nicht mehr zu Hause, obwohl ich es bin 🙂

              Gibt es da ne Lösung zu ?

              Danke

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

                Gelöst,

                Wlan im Standby einfach anlassen 🙂

                1 Reply Last reply Reply Quote 0
                • Negalein
                  Negalein Global Moderator last edited by

                  @Atze68:

                  Gelöst,

                  Wlan im Standby einfach anlassen 🙂 `

                  Welches Handy?

                  Android oder das Äpfelchen?

                  Ich hab Android 8 und da geht es mit dieser Methode nicht!

                  Kaum ist das Handy ein paar Minuten im Standby, schaltet das WLAN aus.

                  Einzig wenn es am Strom hängt funktioniert es.

                  Dies haben wir dem dummen Energiesparmodus zu verdanken, den Android eingeführt hat.

                  1 Reply Last reply Reply Quote 0
                  • K
                    knx last edited by

                    falls du in den Developer Mode deines Androids reinkommst, kannst du den Deep und Light Idle ausschalten, welcher dazu führt dass das Wlan ausgeschaltet wird.

                    Siehe auch meinen Thread, Lösung auf der letzten Seite:

                    viewtopic.php?f=21&t=20250&start=20

                    Ansonsten arbeiten auch einige mit dem Radar Adapter und Gtags, also Bluetooth.

                    1 Reply Last reply Reply Quote 0
                    • T
                      TDCroPower last edited by TDCroPower

                      Hi, ich klinke mich mal hier mit rein, da meine Frage zur Erkennung der Anwesenheit / Abwesenheit passt.

                      Ich trigger aktuell mit einem Xiaomi Fenster/Tür Sensor (Objekt Is open) die Eingangstür, dann soll geprüft werden ob die 2 WLan Geräte (Objekt active) über Tr-064 angemeldet sind.
                      Wenn mindestens einer angemeldet ist, wird der Datenpunkt Anwesenheit auf true gesetzt.
                      Wenn beide nicht angemeldet sind, wird der Datenpunkt Anwesenheit auf false gesetzt.

                      Den Datenpunkt verwende/trigger ich dann in meinen anderen Skripten um bestimmte Geräte nur einzuschalten, wenn auch jemand zuhause ist.

                      Kann mir jemand sagen wie ich den keiner zuhause Teil erweitern kann, das er öfter prüft nachdem er getriggert wurde?
                      Problem mit der aktuellen Version, sobald der Sensor triggert weil wir raus gehen sind wir natürlich aber noch im WLan angemeldet und er wird nie false. Erst einige Minuten später verlieren wir unsere WLan Verbindung und der Datenpunkt kann auf false gesetzt werden.
                      Kann man den keiner zuhause Teil irgendwie alle 5 min laufen lassen, sodass mehrfach geprüft wird bis wir endlich ausserhalb der WLan Reichweite sind?

                      Hier mein aktuelles Blockly Script und der Export...


                      anwesenheitcheck.png

                      Blockly Script

                      <xml xmlns="http://www.w3.org/1999/xhtml">
                        <block type="on_ext" id="*ctj5(w8M#@^j=zB-ic=" x="13" y="13">
                          <mutation items="1"></mutation>
                          <field name="CONDITION">ne</field>
                          <field name="ACK_CONDITION"></field>
                          <value name="OID0">
                            <shadow type="field_oid" id="CE=xcG061g|xnoYnT8`;">
                              <field name="oid">zigbee.0.00158d0002e694df.opened</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="comment" id="U[c]J,:u7fS7Nmh`QqWQ">
                              <field name="COMMENT">min. einer zuhause</field>
                              <next>
                                <block type="controls_if" id="_@z*T/e|S/KN!,KJn=LU">
                                  <value name="IF0">
                                    <block type="logic_operation" id="J()`x(SC,p.1Sif=:8r2" inline="false">
                                      <field name="OP">OR</field>
                                      <value name="A">
                                        <block type="logic_compare" id="Wl]-cig_2`lY5?T,vK|k">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="*!wI%miKD6Y!,LjcLo|R">
                                              <field name="ATTR">val</field>
                                              <field name="OID">tr-064.0.devices.DrMic-iP7.active</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="OtcaN2oI!v;=._D.+1mK">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="P}`JBjN3xcW:G+q`SpPl">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="lcJiDjY*!,[81k0A9S*%">
                                              <field name="ATTR">val</field>
                                              <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="7,F}%3uG#Bi:uD%p]%}o">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id="7Y;9Y2Z_rMOf1sdc}10y">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">javascript.0.Anwesenheit</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="ZEePuUdX9,I0rWdANKfB">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="comment" id="[;z^HU/QD!oLJ+lt1EZe">
                                      <field name="COMMENT">keiner zuhause</field>
                                      <next>
                                        <block type="controls_if" id="%U{[fwxDo~MPOY2evjWi">
                                          <value name="IF0">
                                            <block type="logic_operation" id="M/!Fb;Al{TdHcc7)]8rC" inline="false">
                                              <field name="OP">AND</field>
                                              <value name="A">
                                                <block type="logic_compare" id="}AXjNcs:X.I5[x*H1.#_">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="dZMWFAufisYnnu1r[fAi">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">tr-064.0.devices.DrMic-iP7.active</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="X?dcQE|f-?hzKUUlYH._">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_compare" id="kz|`]FG0Xs-R1luj[y3f">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="8d,!2v!c~eO4-f}=_L{/">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="cix193XtLTO(g_uvrl1J">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="control" id="d{)D-H;MPMB-=~?raiZ:">
                                              <mutation delay_input="false"></mutation>
                                              <field name="OID">javascript.0.Anwesenheit</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="F2fO6cAA=H`??LHom@Pn">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </xml>
                      

                      1 Reply Last reply Reply Quote 0
                      • L
                        lesiflo Most Active last edited by lesiflo

                        Du könntest den "keiner zuhause" Teil in einen eigenen cronjob packen der dann alle 5 Minuten oder weniger läuft. Oder auch das gesamte Script über den cronjob laufen lassen.

                        T 1 Reply Last reply Reply Quote 0
                        • T
                          TDCroPower @lesiflo last edited by TDCroPower

                          @lesiflo das gesammte Script hilft mir leider nicht, da ich es ja nur triggern will sobald die Tür geöffnet wird ( der logische Fall, wann die Anwesenheit geprüft werden sollte ).
                          Mit dem Cronjob alle 5 Min würde mir ja dann andauernd keiner zuhause aufrufen bis die Tür erneut geöffnet wird oder?

                          edit:
                          wäre das vielleicht eine Lösung oder gibt es da was sinnvolleres?
                          Blockly screenshot


                          abwesenheitchecken2.png

                          Export


                          <xml xmlns="http://www.w3.org/1999/xhtml">
                          <block type="on_ext" id="ctj5(w8M#@^j=zB-ic=" x="13" y="13">
                          <mutation items="1"></mutation>
                          <field name="CONDITION">ne</field>
                          <field name="ACK_CONDITION"></field>
                          <value name="OID0">
                          <shadow type="field_oid" id="CE=xcG061g|xnoYnT8;"> <field name="oid">zigbee.0.00158d0002e694df.opened</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="U[c]J,:u7fS7NmhQqWQ">
                          <field name="COMMENT">min. einer zuhause</field>
                          <next>
                          <block type="controls_if" id="_@z
                          T/e|S/KN!,KJn=LU">
                          <value name="IF0">
                          <block type="logic_operation" id="J()x(SC,p.1Sif=:8r2" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="Wl]-cig_2lY5?T,vK|k">
                          <field name="OP">EQ</field>
                          <value name="A">
                          <block type="get_value" id="!wI%miKD6Y!,LjcLo|R">
                          <field name="ATTR">val</field>
                          <field name="OID">tr-064.0.devices.DrMic-iP7.active</field>
                          </block>
                          </value>
                          <value name="B">
                          <block type="logic_boolean" id="OtcaN2oI!v;=._D.+1mK">
                          <field name="BOOL">TRUE</field>
                          </block>
                          </value>
                          </block>
                          </value>
                          <value name="B">
                          <block type="logic_compare" id="P}JBjN3xcW:G+qSpPl">
                          <field name="OP">EQ</field>
                          <value name="A">
                          <block type="get_value" id="lcJiDjY
                          !,[81k0A9S*%">
                          <field name="ATTR">val</field>
                          <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                          </block>
                          </value>
                          <value name="B">
                          <block type="logic_boolean" id="7,F}%3uG#Bi:uD%p]%}o">
                          <field name="BOOL">TRUE</field>
                          </block>
                          </value>
                          </block>
                          </value>
                          </block>
                          </value>
                          <statement name="DO0">
                          <block type="control" id="7Y;9Y2Z_rMOf1sdc}10y">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">javascript.0.Anwesenheit</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                          <block type="logic_boolean" id="ZEePuUdX9,I0rWdANKfB">
                          <field name="BOOL">TRUE</field>
                          </block>
                          </value>
                          </block>
                          </statement>
                          <next>
                          <block type="comment" id="[;z^HU/QD!oLJ+lt1EZe">
                          <field name="COMMENT">keiner zuhause</field>
                          <next>
                          <block type="controls_repeat_ext" id="j,3*EPFHsY@OP=rlpa:#">
                          <value name="TIMES">
                          <shadow type="math_number" id=")6n{lLkxF4SE+_k+Pg+"> <field name="NUM">10</field> </shadow> </value> <statement name="DO"> <block type="timeouts_cleartimeout" id="hfsMc#FWV[uaHT;5hXN/"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="w!t}fSz^.YM|FSHqE/_i"> <field name="NAME">timeout</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="%U{[fwxDo~MPOY2evjWi"> <value name="IF0"> <block type="logic_operation" id="M/!Fb;Al{TdHcc7)]8rC" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="}AXjNcs:X.I5[x*H1.#_"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="dZMWFAufisYnnu1r[fAi"> <field name="ATTR">val</field> <field name="OID">tr-064.0.devices.DrMic-iP7.active</field> </block> </value> <value name="B"> <block type="logic_boolean" id="X?dcQE|f-?hzKUUlYH._"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="kz|]FG0Xs-R1luj[y3f">
                          <field name="OP">EQ</field>
                          <value name="A">
                          <block type="get_value" id="8d,!2v!c~eO4-f}=_L{/">
                          <field name="ATTR">val</field>
                          <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                          </block>
                          </value>
                          <value name="B">
                          <block type="logic_boolean" id="cix193XtLTO(g_uvrl1J">
                          <field name="BOOL">FALSE</field>
                          </block>
                          </value>
                          </block>
                          </value>
                          </block>
                          </value>
                          <statement name="DO0">
                          <block type="control" id="d{)D-H;MPMB-=~?raiZ:">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">javascript.0.Anwesenheit</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                          <block type="logic_boolean" id="F2fO6cAA=H`??LHom@Pn">
                          <field name="BOOL">FALSE</field>
                          </block>
                          </value>
                          </block>
                          </statement>
                          </block>
                          </statement>
                          </block>
                          </next>
                          </block>
                          </statement>
                          </block>
                          </next>
                          </block>
                          </next>
                          </block>
                          </next>
                          </block>
                          </statement>
                          </block>
                          </xml>

                          L 1 Reply Last reply Reply Quote 0
                          • L
                            lesiflo Most Active @TDCroPower last edited by lesiflo

                            @TDCroPower

                            Es wird zwar alle 5 Minuten geprüft aber der Wert wird ja nur unwahr sobald keiner mehr zu Hause ist, unabhängig von
                            der Türöffnung. Ok wenn man nur eine Tür hat durch die man reinkommen kann macht das Sinn. Sind das jedoch mehrere (Keller, Nebeneingang ...) wird das schon schwieriger.

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              TDCroPower @lesiflo last edited by TDCroPower

                              @lesiflo ich glaube ich habe die Lösung, macht das Sinn?

                              edit:
                              ja habe nur eine Wohnungstür 😉

                              Blocky


                              abwesenheitchecken3.png

                              Export


                              <xml xmlns="http://www.w3.org/1999/xhtml">
                              <block type="on_ext" id="ctj5(w8M#@^j=zB-ic=" x="13" y="13">
                              <mutation items="1"></mutation>
                              <field name="CONDITION">ne</field>
                              <field name="ACK_CONDITION"></field>
                              <value name="OID0">
                              <shadow type="field_oid" id="CE=xcG061g|xnoYnT8;"> <field name="oid">zigbee.0.00158d0002e694df.opened</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="U[c]J,:u7fS7NmhQqWQ">
                              <field name="COMMENT">min. einer zuhause</field>
                              <next>
                              <block type="controls_if" id="_@z
                              T/e|S/KN!,KJn=LU">
                              <value name="IF0">
                              <block type="logic_operation" id="J()x(SC,p.1Sif=:8r2" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="Wl]-cig_2lY5?T,vK|k">
                              <field name="OP">EQ</field>
                              <value name="A">
                              <block type="get_value" id="!wI%miKD6Y!,LjcLo|R">
                              <field name="ATTR">val</field>
                              <field name="OID">tr-064.0.devices.DrMic-iP7.active</field>
                              </block>
                              </value>
                              <value name="B">
                              <block type="logic_boolean" id="OtcaN2oI!v;=._D.+1mK">
                              <field name="BOOL">TRUE</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <value name="B">
                              <block type="logic_compare" id="P}JBjN3xcW:G+qSpPl">
                              <field name="OP">EQ</field>
                              <value name="A">
                              <block type="get_value" id="lcJiDjY
                              !,[81k0A9S*%">
                              <field name="ATTR">val</field>
                              <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                              </block>
                              </value>
                              <value name="B">
                              <block type="logic_boolean" id="7,F}%3uG#Bi:uD%p]%}o">
                              <field name="BOOL">TRUE</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              </block>
                              </value>
                              <statement name="DO0">
                              <block type="control" id="7Y;9Y2Z_rMOf1sdc}10y">
                              <mutation delay_input="false"></mutation>
                              <field name="OID">javascript.0.Anwesenheit</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                              <block type="logic_boolean" id="ZEePuUdX9,I0rWdANKfB">
                              <field name="BOOL">TRUE</field>
                              </block>
                              </value>
                              </block>
                              </statement>
                              <next>
                              <block type="comment" id="[;z^HU/QD!oLJ+lt1EZe">
                              <field name="COMMENT">keiner zuhause</field>
                              <next>
                              <block type="controls_whileUntil" id="]oC67J2QL]GFVv+HkBM"> <field name="MODE">UNTIL</field> <value name="BOOL"> <block type="logic_compare" id="jb2%Px_/.:UptyJ^v7P("> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="Q!=}jm0tpS;bG9LfX++G"> <field name="ATTR">val</field> <field name="OID">javascript.0.Anwesenheit</field> </block> </value> <value name="B"> <block type="logic_boolean" id="XW!YQ0u!{KUb[y0wXYZ%"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO"> <block type="timeouts_cleartimeout" id="hfsMc#FWV[uaHT;5hXN/"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="w!t}fSz^.YM|FSHqE/_i"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="%U{[fwxDo~MPOY2evjWi"> <value name="IF0"> <block type="logic_operation" id="M/!Fb;Al{TdHcc7)]8rC" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="}AXjNcs:X.I5[x*H1.#_"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="dZMWFAufisYnnu1r[fAi"> <field name="ATTR">val</field> <field name="OID">tr-064.0.devices.DrMic-iP7.active</field> </block> </value> <value name="B"> <block type="logic_boolean" id="X?dcQE|f-?hzKUUlYH._"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="kz|]FG0Xs-R1luj[y3f">
                              <field name="OP">EQ</field>
                              <value name="A">
                              <block type="get_value" id="8d,!2v!c~eO4-f}=_L{/">
                              <field name="ATTR">val</field>
                              <field name="OID">tr-064.0.devices.Mellys-iPhone.active</field>
                              </block>
                              </value>
                              <value name="B">
                              <block type="logic_boolean" id="cix193XtLTO(g_uvrl1J">
                              <field name="BOOL">FALSE</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              </block>
                              </value>
                              <statement name="DO0">
                              <block type="control" id="d{)D-H;MPMB-=~?raiZ:">
                              <mutation delay_input="false"></mutation>
                              <field name="OID">javascript.0.Anwesenheit</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                              <block type="logic_boolean" id="F2fO6cAA=H`??LHom@Pn">
                              <field name="BOOL">FALSE</field>
                              </block>
                              </value>
                              </block>
                              </statement>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </xml>

                              1 Reply Last reply Reply Quote 0
                              • L
                                lesiflo Most Active last edited by lesiflo

                                Könnte klappen, einfach mal ausprobieren.

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  TDCroPower @lesiflo last edited by

                                  @lesiflo ist schon live geschaltet muss ich später mal testen, wenn ich wieder zuhause bin.
                                  So erspare ich mir das er die ganze Zeit das Script ausführt, obwohl die Situation sich geklärt hatte.

                                  L 1 Reply Last reply Reply Quote 0
                                  • L
                                    lesiflo Most Active @TDCroPower last edited by lesiflo

                                    @TDCroPower
                                    Hallo nochmal, deine Lösung hat aber eine große Schwäche. Sollten die Handies beim Betreten
                                    aus sein oder WLAN ist inaktiv wird die Anwesenheit nicht gesetzt. Deshalb ja das ganze am besten über Cron, der ständig prüft ob jemand zu Hause ist.

                                    T 1 Reply Last reply Reply Quote 0
                                    • T
                                      TDCroPower @lesiflo last edited by TDCroPower

                                      @lesiflo wenn man aber ständig prüft, ob die Geräte anwesend sind und man die Geräte zuhause mal aus dem WLan nimmt würde alles auf Abwesend geschaltet werden.
                                      Oder bleiben die aktuellen Smartphone Modelle/Firmware dauerhaft eingeloggt im Router? Hatte da mal von Schwierigkeiten irgendwo gelesen gehabt.
                                      Im Normalfall haben unsere beiden Geräte ihr WLan immer eingeschaltet, so wäre die Tür Kontrolle theoretisch möglich... glaube ich zu mindestens.
                                      Aktuell schalte ich lediglich die passive Astrogeschaltete Flurbeleuchtung auf ein/aus falls Abwesenheit true/false ist.

                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        lesiflo Most Active last edited by

                                        Eigentlich bleiben die Handies immer im WLAN angemeldet. Ist zumindest bei meiner Fritz!Box so. Um ein eventuelles Abmelden aber zu vermeiden kannst eine kleine Wartezeit einbauen. Dazu einfach bei "steuere Anwesenheit mit unwahr" eine Verzögerung setzen. Da bei mir die Anwesenheitssteuerung über ein Zusatzprogramm in Homematic läuft kann ich dir leider kein Blockly Script dafür zeigen.

                                        1 Reply Last reply Reply Quote 0
                                        • Röstkartoffel
                                          Röstkartoffel @BigWumpus last edited by

                                          @BigWumpus sagte in [Gelöst] Erkennung Anwesenheit / Abwesenheit per Wlan. Mein Skript ist noch fehlerhaft:

                                          Oje,

                                          2 Personen, 2 Handys, egal wer da = Anwesenheit ja, keiner da = nach 5 Minuten Anwesenheit aus, Wohnung aus.

                                          mein Anwesenheits-Script:

                                          Kurze Frage: was meinst du mit "Wohnung aus" und was machst du mit

                                          admin.0.WoZi-Heizdecke.Switch
                                          
                                          BigWumpus 1 Reply Last reply Reply Quote 0
                                          • BigWumpus
                                            BigWumpus @Röstkartoffel last edited by

                                            @Röstkartoffel
                                            Hallo,
                                            "Wohnung Aus" ist ein Script, der einfach alle 6 einzelnen Zimmer ausschaltet (bin ja nur Single).
                                            Jedes Zimmer für sich schaltet dann alle Geräte darin aus.
                                            Heizung bleibt an.
                                            "WoZi-Heizdecke" ist ein Schalter im Wohnzimmer, wo die Heizdecke für meine Freundin dranhängt, die ausgeschaltet sein soll, wenn niemand da ist... Sie auch nicht.
                                            ".Switch" ist immer ein Datenpunkt (ein/aus), der dann per passendem Script einen Schaltvorgang am Schalter auslöst.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            515
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            17
                                            35
                                            9288
                                            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