Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Anwesenheit mit 2 Personen

    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

    Anwesenheit mit 2 Personen

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

      Hallo zusammen
      Ich habe den Radar2 Adapter installiert.
      Jetzt brauche ich ein Blocky um ein Script ein und aus zuschalten. Ich bekomme es nicht hin , wenn beide weg sind , das was geschaltet werden soll und umgekehrt.
      Kann mir jemand ein Beispiel schicken ?

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

        @chucky666 sagte:

        Kann mir jemand ein Beispiel schicken ?

        Suche im Forum ergab

        1 Reply Last reply Reply Quote 0
        • E
          eMd last edited by

          Blocklyimport

          <xml xmlns="http://www.w3.org/1999/xhtml">
            <block type="on_ext" id="Jh[=rfzMv*8me+BZSL,1" x="63" y="-87">
              <mutation items="2"></mutation>
              <field name="CONDITION">any</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
                <shadow type="field_oid" id="vA(aMx#j?#RdTmQiZ!Pn">
                  <field name="oid">radar2.0.Mi8</field>
                </shadow>
              </value>
              <value name="OID1">
                <shadow type="field_oid" id="[MO:0aHP1UmWa}lKP+Pa">
                  <field name="oid">radar2.0.RedMi5Plus</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="controls_if" id="+nr4Q.X)L~Cn|kLQkYzc">
                  <mutation elseif="1"></mutation>
                  <value name="IF0">
                    <block type="logic_operation" id="/K,ghpx,wJfJ7W`7Ws4o">
                      <field name="OP">OR</field>
                      <value name="A">
                        <block type="logic_compare" id="$zNh)Ncf$frBFAWa_7i|">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="]OqOcY/EcQX|%-46;CpI">
                              <field name="ATTR">val</field>
                              <field name="OID">radar2.0.Mi8</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="0p7ZL:e0f}@s~dEKa1[.">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="g^y$j^X@Ye+oUgFhUng*">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="6}(=WW/NwMkiw0aZ|5P7">
                              <field name="ATTR">val</field>
                              <field name="OID">radar2.0.RedMi5Plus</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="+hT(L4z;:CQxUD!ei2;x">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="update" id="8/*P1Txi_+8.@W%h|)aw">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">javascript.0.jemandanwesend</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="Dt)){5!D#pO{?T86,1Zh">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                  <value name="IF1">
                    <block type="logic_operation" id="30k$#%/o(._QWWH$[WWf">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_compare" id="j!ChX]LGqbO^?KwD(+N#">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="wv7Fr*l0l-tb-_98-Y`~">
                              <field name="ATTR">val</field>
                              <field name="OID">radar2.0.Mi8</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="KSV~{Id?([xTz)3p/0k{">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="`EEmctf{HV1#{s/`Sm7p">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="!sO5~|y]Tq{D@s%C_=R%">
                              <field name="ATTR">val</field>
                              <field name="OID">radar2.0.RedMi5Plus</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id=";qD)Jy$GH05AB.{)Jb!2">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO1">
                    <block type="update" id="^iTw.Z=P=PT!r7Yd4_pn">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">javascript.0.jemandanwesend</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="R+yn0;4/vgem`xeVUJ^}">
                          <field name="BOOL">FALSE</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </xml>
          
          chucky666 1 Reply Last reply Reply Quote 0
          • chucky666
            chucky666 @eMd last edited by

            @eMd sagte in Anwesenheit mit 2 Personen:

            Blocklyimport

            <xml xmlns="http://www.w3.org/1999/xhtml">
              <block type="on_ext" id="Jh[=rfzMv*8me+BZSL,1" x="63" y="-87">
                <mutation items="2"></mutation>
                <field name="CONDITION">any</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="vA(aMx#j?#RdTmQiZ!Pn">
                    <field name="oid">radar2.0.Mi8</field>
                  </shadow>
                </value>
                <value name="OID1">
                  <shadow type="field_oid" id="[MO:0aHP1UmWa}lKP+Pa">
                    <field name="oid">radar2.0.RedMi5Plus</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="+nr4Q.X)L~Cn|kLQkYzc">
                    <mutation elseif="1"></mutation>
                    <value name="IF0">
                      <block type="logic_operation" id="/K,ghpx,wJfJ7W`7Ws4o">
                        <field name="OP">OR</field>
                        <value name="A">
                          <block type="logic_compare" id="$zNh)Ncf$frBFAWa_7i|">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="]OqOcY/EcQX|%-46;CpI">
                                <field name="ATTR">val</field>
                                <field name="OID">radar2.0.Mi8</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="0p7ZL:e0f}@s~dEKa1[.">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="g^y$j^X@Ye+oUgFhUng*">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="6}(=WW/NwMkiw0aZ|5P7">
                                <field name="ATTR">val</field>
                                <field name="OID">radar2.0.RedMi5Plus</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="+hT(L4z;:CQxUD!ei2;x">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="update" id="8/*P1Txi_+8.@W%h|)aw">
                        <mutation delay_input="false"></mutation>
                        <field name="OID">javascript.0.jemandanwesend</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="Dt)){5!D#pO{?T86,1Zh">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <value name="IF1">
                      <block type="logic_operation" id="30k$#%/o(._QWWH$[WWf">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="logic_compare" id="j!ChX]LGqbO^?KwD(+N#">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="wv7Fr*l0l-tb-_98-Y`~">
                                <field name="ATTR">val</field>
                                <field name="OID">radar2.0.Mi8</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="KSV~{Id?([xTz)3p/0k{">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="`EEmctf{HV1#{s/`Sm7p">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="!sO5~|y]Tq{D@s%C_=R%">
                                <field name="ATTR">val</field>
                                <field name="OID">radar2.0.RedMi5Plus</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id=";qD)Jy$GH05AB.{)Jb!2">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO1">
                      <block type="update" id="^iTw.Z=P=PT!r7Yd4_pn">
                        <mutation delay_input="false"></mutation>
                        <field name="OID">javascript.0.jemandanwesend</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="R+yn0;4/vgem`xeVUJ^}">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </xml>
            

            Danke euch , jetzt läuft es

            moppel2810 1 Reply Last reply Reply Quote 0
            • moppel2810
              moppel2810 @chucky666 last edited by

              Moin, ich hab euer skript übernommen und es macht was es soll zumindest fast🙄
              ich schalte damit 2 weitere skripte auf false und das geht auch nur arbeiten die skripte trotzdem weiter.
              licht.JPG

              <xml xmlns="http://www.w3.org/1999/xhtml">
                <block type="on_ext" id="Jh[=rfzMv*8me+BZSL,1" x="63" y="-87">
                  <mutation items="2"></mutation>
                  <field name="CONDITION">any</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="vA(aMx#j?#RdTmQiZ!Pn">
                      <field name="oid">radar2.0.Elli</field>
                    </shadow>
                  </value>
                  <value name="OID1">
                    <shadow type="field_oid" id="[MO:0aHP1UmWa}lKP+Pa">
                      <field name="oid">radar2.0.Moppel</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="+nr4Q.X)L~Cn|kLQkYzc">
                      <mutation elseif="1"></mutation>
                      <value name="IF0">
                        <block type="logic_operation" id="/K,ghpx,wJfJ7W`7Ws4o">
                          <field name="OP">OR</field>
                          <value name="A">
                            <block type="logic_compare" id="$zNh)Ncf$frBFAWa_7i|">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="]OqOcY/EcQX|%-46;CpI">
                                  <field name="ATTR">val</field>
                                  <field name="OID">radar2.0.Elli</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="0p7ZL:e0f}@s~dEKa1[.">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="g^y$j^X@Ye+oUgFhUng*">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="6}(=WW/NwMkiw0aZ|5P7">
                                  <field name="ATTR">val</field>
                                  <field name="OID">radar2.0.Moppel</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="+hT(L4z;:CQxUD!ei2;x">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="update" id="8/*P1Txi_+8.@W%h|)aw">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">javascript.0.scriptEnabled.Beleuchtung_Haus.Licht_Flur_unten</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="Dt)){5!D#pO{?T86,1Zh">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                          <next>
                            <block type="update" id="8Fd6b0gN]@`%[/SgO=@U">
                              <mutation delay_input="false"></mutation>
                              <field name="OID">javascript.0.scriptEnabled.Beleuchtung_Haus.Licht_Flur_oben</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="jL-;MBl%?c@Im9usfP%!">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <value name="IF1">
                        <block type="logic_operation" id="30k$#%/o(._QWWH$[WWf">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_compare" id="j!ChX]LGqbO^?KwD(+N#">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="wv7Fr*l0l-tb-_98-Y`~">
                                  <field name="ATTR">val</field>
                                  <field name="OID">radar2.0.Elli</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="KSV~{Id?([xTz)3p/0k{">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="`EEmctf{HV1#{s/`Sm7p">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="!sO5~|y]Tq{D@s%C_=R%">
                                  <field name="ATTR">val</field>
                                  <field name="OID">radar2.0.Moppel</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id=";qD)Jy$GH05AB.{)Jb!2">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO1">
                        <block type="update" id="^iTw.Z=P=PT!r7Yd4_pn">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">javascript.0.scriptEnabled.Beleuchtung_Haus.Licht_Flur_unten</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="R+yn0;4/vgem`xeVUJ^}">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="update" id="IFg8znJ|r@+O|XdwDXz+">
                              <mutation delay_input="false"></mutation>
                              <field name="OID">javascript.0.scriptEnabled.Beleuchtung_Haus.Licht_Flur_oben</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="^T6cM!A#6~lWYn)9av8b">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </xml>
              

              Ich möchte erreichen das wenn 2 Personen nicht im Haus sind die beiden BW nicht funktionieren da wir Katzen haben und diese ständig das licht einschalten was sie aber nicht brauchen.

              Danke schonmal für euere Hilfe

              J 1 Reply Last reply Reply Quote 0
              • J
                Jan1 @moppel2810 last edited by

                @moppel2810
                Am einfachsten ist es wenn Du einen Anwesenheits DP anlegst und den einfach als UND Bedingung bei Scripten abfragst die in Abhänigkeit der Anwasesenheit laufen sollen.

                moppel2810 1 Reply Last reply Reply Quote 0
                • moppel2810
                  moppel2810 @Jan1 last edited by

                  @Jan1
                  Was ist ein DP? Ich bin leider noch nicht so lange an iobroker und skripten dran hab da also noch nicht so viel Ahnung.

                  sigi234 J 2 Replies Last reply Reply Quote 0
                  • sigi234
                    sigi234 Forum Testing Most Active @moppel2810 last edited by

                    @moppel2810 sagte in Anwesenheit mit 2 Personen:

                    Was ist ein DP?

                    Datenpunkt

                    1 Reply Last reply Reply Quote 1
                    • J
                      Jan1 @moppel2810 last edited by

                      @moppel2810
                      Ein DatenPunkt der eben über das Script anzeigt ob Anwesenheit true oder false ist. Kannst manuell erstellen oder über Blockly machen lassen.

                      moppel2810 1 Reply Last reply Reply Quote 1
                      • moppel2810
                        moppel2810 @Jan1 last edited by

                        @Jan1
                        Also müßte ich in das skript welches das Licht steuert irgendwie die Anwesenheit mit einbinden das Licht nur gesteuert wird wenn einer von beiden anwesend ist?

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

                          <xml xmlns="http://www.w3.org/1999/xhtml">
                            <variables>
                              <variable type="undefined" id="timeout">timeout</variable>
                            </variables>
                            <block type="comment" id="JaAyU2y,{(6@:diUAQNL" x="-312" y="-1537">
                              <field name="COMMENT">Bewegungsmelder Treppe</field>
                              <next>
                                <block type="on" id="S9XTQg1w}QoHz7*_kQ,b">
                                  <field name="OID">deconz.0.Sensors.24.presence</field>
                                  <field name="CONDITION">any</field>
                                  <field name="ACK_CONDITION"></field>
                                  <statement name="STATEMENT">
                                    <block type="timeouts_cleartimeout" id="RLo#Q(I9N_J^h=zpR?1{">
                                      <field name="NAME">timeout</field>
                                      <next>
                                        <block type="controls_if" id="[+6pK-?N+WQ.)y(TXg7f">
                                          <mutation elseif="1"></mutation>
                                          <value name="IF0">
                                            <block type="logic_ternary" id="wGj;;=Ss[I[-{]7UubI]">
                                              <value name="IF">
                                                <block type="logic_operation" id="csg_mJs/3Pp{F3d3(e%]">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="get_value" id="mE3uVm96c#O`P%GDRv_/">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Elli</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="get_value" id="/`@w1FUQ,akFrg(D[4QK">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Moppel</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="THEN">
                                                <block type="logic_operation" id="xp8s;E6mdfRJ3Nqbi:As" inline="false">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="logic_compare" id="O+OB)G0w[.=-,gh}v(Q1">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="14ar~dElwIyL0TSmhwlI">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.22.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="^ljVS=y+vK!hnU5NWv9)">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="DnqN.CqO0l+JJkaO.qW}">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="uGgpU+W5ZND=z]Aw9!((">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.24.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="d:-_8#x+q`()c(?;eF/[">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="procedures_callnoreturn" id="KFE*W!t{vwv~S}[_e)D;">
                                              <mutation name="LichtEin"></mutation>
                                            </block>
                                          </statement>
                                          <value name="IF1">
                                            <block type="logic_ternary" id="3{8|1n50Y/dmST:jWf6Y">
                                              <value name="IF">
                                                <block type="logic_operation" id="lgQ@4/8k-CD?u$zBUC;%">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="get_value" id="F@,9$cMBOl1Pz6UglZ4q">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Elli</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="get_value" id="YS[@~*!Xy9@#.]#`Zo,d">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Moppel</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ELSE">
                                                <block type="logic_operation" id=")C^ymRknP$I2,-sxxE_," inline="false">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="logic_compare" id="+;G;TPy]A04sGE@[}Zy0">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="AZU$+X*.bh%@`#PbL2.^">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.22.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="6PTmy@[Lr|VD[ap^(ycB">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="UQe[=}kS]/eHJwFgwzjg">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="fPQjT=v6}syT#)gt=8H?">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.24.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="TG9sn=j?_:}+JmyIF~:l">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO1">
                                            <block type="procedures_callnoreturn" id="qI(:@,K3-%~k@q~5QYU*">
                                              <mutation name="LichtAus"></mutation>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                            <block type="comment" id="}RyaEXElWAG2x/SK(i%L" x="-1388" y="-1413">
                              <field name="COMMENT">Bewegungsmelder Flur oben</field>
                              <next>
                                <block type="on" id="Qfwz.Sg-A_%8B6m[U2m}">
                                  <field name="OID">deconz.0.Sensors.22.presence</field>
                                  <field name="CONDITION">any</field>
                                  <field name="ACK_CONDITION"></field>
                                  <statement name="STATEMENT">
                                    <block type="timeouts_cleartimeout" id="z239D8cLX|D=iPl3;D4^">
                                      <field name="NAME">timeout</field>
                                      <next>
                                        <block type="controls_if" id="_gcLj*t^DqEZ]!/B/JX[">
                                          <mutation elseif="1"></mutation>
                                          <value name="IF0">
                                            <block type="logic_ternary" id="X^IOeWi%.tR%%uSHvLHC">
                                              <value name="IF">
                                                <block type="logic_operation" id="/K,ghpx,wJfJ7W`7Ws4o">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="get_value" id="]OqOcY/EcQX|%-46;CpI">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Elli</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="get_value" id="6}(=WW/NwMkiw0aZ|5P7">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Moppel</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="THEN">
                                                <block type="logic_operation" id="Bl!KG[(Bz?#_pPYl%L%*" inline="false">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="logic_compare" id="$}3B,%c-i8|Ll;?Jb8b%">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="Xi;NNqR4P}W6U8N)Ws?[">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.22.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="{5Y3DYbmas,-~.{~HJHX">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="-q7)@@WEY[,Vv6e^4x1?">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="$GY|I:$(sm*/RIb~n:/c">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.24.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="GuD+@!I.2yZq~`aXh!G/">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="procedures_callnoreturn" id="[U(07y/di1Lah#}|?Fo+">
                                              <mutation name="LichtEin"></mutation>
                                            </block>
                                          </statement>
                                          <value name="IF1">
                                            <block type="logic_ternary" id="N?yYP4x#2VY=w6W:;aDp">
                                              <value name="IF">
                                                <block type="logic_operation" id="Qk=BV%uDk59nwzXulaU%">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="get_value" id="I63$*VtetdmqfS{|+F.E">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Elli</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="get_value" id="Cn.l85H=M#QHVf=NScD^">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">radar2.0.Moppel</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ELSE">
                                                <block type="logic_operation" id="-=@rt8N0Fl7!H^bX1enh" inline="false">
                                                  <field name="OP">OR</field>
                                                  <value name="A">
                                                    <block type="logic_compare" id="G^qc7*zDSJl1Qkoev/o4">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="P-REUF##P*f]aD}]U?Ah">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.22.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="L_zB}mJ5yri(AmzC4Qwn">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="8N]a7cY9teVw[v3SwrEF">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="m|n6weU5|FYXK,-5!`?D">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.24.presence</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="AN=*G]+S7b^I^])kV(l#">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO1">
                                            <block type="procedures_callnoreturn" id="~eR_,:~y}S*vx2a~@%FG">
                                              <mutation name="LichtAus"></mutation>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                            <block type="procedures_defnoreturn" id="=ecpK:QcQ6}Srk*]ID~{" x="-312" y="-987">
                              <field name="NAME">LichtAus</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK">
                                <block type="timeouts_settimeout" id="=2C#^/49i2XIrk/nGd)A">
                                  <field name="NAME">timeout</field>
                                  <field name="DELAY">30</field>
                                  <field name="UNIT">sec</field>
                                  <statement name="STATEMENT">
                                    <block type="control" id="%Z8Jlm0qgkQ.fM2?U;Fl">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">hm-rpc.1.000E1A498CCE86.2.LEVEL</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="math_number" id="jyHq%mcf)(kXsI!twT^1">
                                          <field name="NUM">0</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                            <block type="procedures_defnoreturn" id="}a~Yc4#7SiTBR.rQ)s{i" x="-1387" y="-787">
                              <field name="NAME">LichtEin</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK">
                                <block type="controls_if" id="!iO$$kwAdtjUyp+SbUD-">
                                  <mutation elseif="1" else="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_operation" id="ahjkAHocCu7rj;ZoU4@@" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="time_compare" id="B#?oX=Bv;mppdZgF(no{">
                                          <mutation end_time="true"></mutation>
                                          <field name="OPTION">between</field>
                                          <field name="START_TIME">18:00</field>
                                          <field name="END_TIME">19:59</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="^Y:GGp:;pn|F+7_Hsw1v" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="get_value" id="yg9V@[o_|C,;p4*C;|ad">
                                              <field name="ATTR">val</field>
                                              <field name="OID">deconz.0.Sensors.22.presence</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="get_value" id="owDR?[UN(aK3`b[1ujcA">
                                              <field name="ATTR">val</field>
                                              <field name="OID">deconz.0.Sensors.24.presence</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id="FXA/Vw1|{hK-3s(I1:gc">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">hm-rpc.1.000E1A498CCE86.2.LEVEL</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="math_number" id="0K4C!$9tB?I5KOZ:Qg)U">
                                          <field name="NUM">35</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="nt2#WxC%-nemqb[N`U6{">
                                          <mutation name="LichtAus"></mutation>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_operation" id="}xr3g6(F4w}1gn!nN}3i" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_operation" id="a?~^):5Ue|gf-b:]aCJY" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="time_compare" id="b[%.Px/JX82QQ%cT`o%w">
                                              <mutation end_time="true"></mutation>
                                              <field name="OPTION">between</field>
                                              <field name="START_TIME">20:00</field>
                                              <field name="END_TIME">23:59</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="time_compare" id="V;m%!/4s]IZt88Cp78qZ">
                                              <mutation end_time="true"></mutation>
                                              <field name="OPTION">between</field>
                                              <field name="START_TIME">00:00</field>
                                              <field name="END_TIME">07:00</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="$%oH~ohfn%5sY*})}/,n" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="get_value" id="PDqApLhbr.4bvxs)~Z8/">
                                              <field name="ATTR">val</field>
                                              <field name="OID">deconz.0.Sensors.22.presence</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="get_value" id="4Fc;y(ZD2*}15eKyN8;1">
                                              <field name="ATTR">val</field>
                                              <field name="OID">deconz.0.Sensors.24.presence</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="control" id="[9Ea]nJqm08TK(2@#!P8">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">hm-rpc.1.000E1A498CCE86.2.LEVEL</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="math_number" id="jeVvW[$,L]}[Ot$cpw9R">
                                          <field name="NUM">2</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="OD2^oqyZwVdj}1}U,Pwz">
                                          <mutation name="LichtAus"></mutation>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <statement name="ELSE">
                                    <block type="control" id="PbQ1;ebrN)H:O$ZVKH[Q">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">hm-rpc.1.000E1A498CCE86.2.LEVEL</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="math_number" id="trk!Ma2@w=[C~VKHG8M6">
                                          <field name="NUM">75</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="=$J*-o;,)i-yaX:`(XKj">
                                          <mutation name="LichtAus"></mutation>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </xml>
                          

                          So läuft das leider nicht aber ich hab bestimmt einen Denkfehler

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

                            Jetzt funktioniert es aber warum braucht es so lange nach Anwesenheitserkennung um zu funktionieren?

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              Jan1 @moppel2810 last edited by

                              @moppel2810
                              Poste doch mal das Blocky, oder machst das mit Javascript?
                              Hast ein DP angelegt der die Anwedenheit signalisiert? Wenn ja, dann schau doch mal wie und wann der DP wechselt.

                              moppel2810 1 Reply Last reply Reply Quote 0
                              • moppel2810
                                moppel2810 @Jan1 last edited by

                                @Jan1

                                Ich hab doch das exportierte Blocky gepostet.

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  Jan1 @moppel2810 last edited by

                                  @moppel2810
                                  Und ich soll das lesen können unter Palmen😎

                                  moppel2810 1 Reply Last reply Reply Quote 0
                                  • moppel2810
                                    moppel2810 @Jan1 last edited by

                                    @Jan1
                                    licht.JPG

                                    J 1 Reply Last reply Reply Quote 0
                                    • J
                                      Jan1 @moppel2810 last edited by

                                      @moppel2810
                                      Da hast aber was gebastelt😎
                                      Den Anwesenheits DP finde ich darin nicht und das mit Funktionen zu lösen ist auch etwas übertrieben, nutzt man eigentlich wenn ein und die selbe Funktion öfter verwendet wird, so wird das nur unübersuchtlich.
                                      Das prüfe in der falls Bedingungung ist wohl auch falsch, da das eigetlich schon die falls erledigen soll.

                                      moppel2810 1 Reply Last reply Reply Quote 0
                                      • moppel2810
                                        moppel2810 @Jan1 last edited by

                                        @Jan1

                                        Was müßte ich denn ändern das es funktioniert?

                                        J 1 Reply Last reply Reply Quote 0
                                        • J
                                          Jan1 @moppel2810 last edited by

                                          @moppel2810
                                          Leg doch mal den DP für die Anwesenheit an. Den fütterst Du dann mit einem separaten Script. Den DP kannst dann aber überall verwenden, wo etwas in Abhänigkeit der Anwesenheit passieren soll, hatte ich oben schon mal geschrieben. Das macht dann auch das Blockly übersichtlicher.
                                          Dann die falls mit dem angeschlossenen überprüfe Block ist unnötig und eh falsch, zumindest das was ich da rauslese. Einfach den falls Block und da die Bedingung dran, dann was passieren soll.
                                          Du willst was recht einfaches und verwndest dafür Funktionen, was das unnötig unübersichtlich macht.
                                          Eine falls Bedingung muss man auch nicht auf true prüfen, weil sie das eh macht.
                                          So kannst eigentlich ganz einfach das ganze in der Art aufbauen:
                                          Trigger Bewegung wurde erkannt.
                                          Falls jemand zu hause, dann Licht an.

                                          moppel2810 1 Reply Last reply Reply Quote 0
                                          • moppel2810
                                            moppel2810 @Jan1 last edited by

                                            @Jan1
                                            licht.JPG

                                            so in etwa?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            765
                                            Online

                                            31.9k
                                            Users

                                            80.3k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            24
                                            1545
                                            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