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

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

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [gelöst]Türenabfrage Hilfe

NEWS

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

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

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

[gelöst]Türenabfrage Hilfe

Scheduled Pinned Locked Moved Blockly
26 Posts 2 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K kuessel25

    @paul53

    würde es jetzt noch eine möglichkeit geben das sich das sonst in der logik erst auslöst nach dem der erste timer 10min abgelaufen ist?
    So wie es jetzt aktuell ist kommt die Ansage danke auch schon nach kurzem öffnen der Tür,das würde ich gerne verhindern.

    paul53P Offline
    paul53P Offline
    paul53
    wrote on last edited by
    #7

    @kuessel25 sagte:

    erst auslöst nach dem der erste timer 10min abgelaufen ist?

    Bild_2021-01-24_150055.png

    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

    K 1 Reply Last reply
    0
    • paul53P paul53

      @kuessel25 sagte:

      erst auslöst nach dem der erste timer 10min abgelaufen ist?

      Bild_2021-01-24_150055.png

      K Offline
      K Offline
      kuessel25
      wrote on last edited by
      #8

      @paul53
      besten dank,genau so funktioniert es top.:+1:
      Mir selber ist das alles noch zu hoch auch nach 20stunden bekomm ich solche sachen nicht ans laufen,wenn du mir noch
      bei meinem nächsten problem helfen könnstest wäre ich noch glücklicher :grinning:

      und zwar ,ich weiß ist für dich ein klacks ich sitze schon seit 2 stunden daran und bekomme es nicht gebügelt.
      Also wunsch ist das wenn ich die Balkontüre öffne z.b das Licht in der Küche einschaltet und beim schliessen der Türe sich das Licht wieder ausschaltet.
      (ab hier komm ich nicht weiter)
      Aber wenn das licht vorher schon an war möchte ich auch das sich das licht nicht durch das blockly ausschaltet wenn die türe geschlossen wird.

      paul53P 1 Reply Last reply
      0
      • K kuessel25

        @paul53
        besten dank,genau so funktioniert es top.:+1:
        Mir selber ist das alles noch zu hoch auch nach 20stunden bekomm ich solche sachen nicht ans laufen,wenn du mir noch
        bei meinem nächsten problem helfen könnstest wäre ich noch glücklicher :grinning:

        und zwar ,ich weiß ist für dich ein klacks ich sitze schon seit 2 stunden daran und bekomme es nicht gebügelt.
        Also wunsch ist das wenn ich die Balkontüre öffne z.b das Licht in der Küche einschaltet und beim schliessen der Türe sich das Licht wieder ausschaltet.
        (ab hier komm ich nicht weiter)
        Aber wenn das licht vorher schon an war möchte ich auch das sich das licht nicht durch das blockly ausschaltet wenn die türe geschlossen wird.

        paul53P Offline
        paul53P Offline
        paul53
        wrote on last edited by paul53
        #9

        @kuessel25 sagte: wenn das licht vorher schon an war möchte ich auch das sich das licht nicht durch das blockly ausschaltet wenn die türe geschlossen wird.

        Bild_2021-01-24_155732.png

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        K 1 Reply Last reply
        0
        • paul53P paul53

          @kuessel25 sagte: wenn das licht vorher schon an war möchte ich auch das sich das licht nicht durch das blockly ausschaltet wenn die türe geschlossen wird.

          Bild_2021-01-24_155732.png

          K Offline
          K Offline
          kuessel25
          wrote on last edited by kuessel25
          #10

          @paul53
          so habs mal nachgebaut aber irgenwie klappts noch nicht ganz,kannst du bitte nochmal drüber schauen wo ich einen Fehler eingebaut habe

          licht ist aus balkontür wird geöffnet = licht geht an (klappt) :+1:

          balkontür wird geschlossen = licht geht leider nicht aus ,hier sollte es ausgehen :-1:

          licht ist an balkontüre wird geöffnet und geschlossen = keine lichtsteuerung(so wie gewünscht):+1:

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</variable>
              <variable id="ab}EYSQ+h$QV@^IsPFg$">urspung</variable>
            </variables>
            <block type="comment" id="#RhA$;TwFmjX_6S+m5P2" x="362" y="188">
              <field name="COMMENT">Balkontür</field>
              <next>
                <block type="on_ext" id="=XrcLs#9F|dOr(~yJ)ZQ">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="N{6a=8^g8lb^;;$k+UdG">
                      <field name="oid">zigbee.0.00158d0003d08254.opened</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="uUb*rPJ@7HKh}ePQ3+xD">
                      <value name="IF0">
                        <block type="logic_negate" id="zyl4Zcnu_xbM[v@Zd5RM">
                          <value name="BOOL">
                            <block type="variables_get" id="BW0,yyG3`QdHS[L4wlqX">
                              <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="control" id="p,,XTU`6Jdn+y:`k#dt1">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">sonoff.0.Küche Licht.POWER</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="on_source" id="Tf6L/nv9R/H)ZTt=9V$e">
                              <field name="ATTR">state.val</field>
                            </block>
                          </value>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="x?AK=5B8AdQ},}Mxukdr">
                      <field name="COMMENT">licht</field>
                      <next>
                        <block type="on_ext" id="@r$eP`sbs0{,PL!|m;5D">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                          <field name="CONDITION">ne</field>
                          <field name="ACK_CONDITION"></field>
                          <value name="OID0">
                            <shadow type="field_oid" id="qT1RXo6F*|^$jtr^Yv6U">
                              <field name="oid">sonoff.0.Küche Licht.POWER</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="variables_set" id="!]8t5(L*PiH)r+(Bj-#z">
                              <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                              <value name="VALUE">
                                <block type="logic_operation" id="rLOKk==CX,Tg.n5wKQ{2" inline="false">
                                  <field name="OP">AND</field>
                                  <value name="A">
                                    <block type="on_source" id=":A14~8y%)G)E?n{_^m+$">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_compare" id="vQwA^K*~+n4JQ-AvIi4f">
                                      <field name="OP">NEQ</field>
                                      <value name="A">
                                        <block type="variables_get" id="9/AXWZ{q.V1|l*YkAwQW">
                                          <field name="VAR" id="ab}EYSQ+h$QV@^IsPFg$">urspung</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="text" id="1PB*GEO1qU=wc3x[2y@!">
                                          <field name="TEXT">javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </xml>
          
          
          
          paul53P 1 Reply Last reply
          0
          • K kuessel25

            @paul53
            so habs mal nachgebaut aber irgenwie klappts noch nicht ganz,kannst du bitte nochmal drüber schauen wo ich einen Fehler eingebaut habe

            licht ist aus balkontür wird geöffnet = licht geht an (klappt) :+1:

            balkontür wird geschlossen = licht geht leider nicht aus ,hier sollte es ausgehen :-1:

            licht ist an balkontüre wird geöffnet und geschlossen = keine lichtsteuerung(so wie gewünscht):+1:

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</variable>
                <variable id="ab}EYSQ+h$QV@^IsPFg$">urspung</variable>
              </variables>
              <block type="comment" id="#RhA$;TwFmjX_6S+m5P2" x="362" y="188">
                <field name="COMMENT">Balkontür</field>
                <next>
                  <block type="on_ext" id="=XrcLs#9F|dOr(~yJ)ZQ">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                      <shadow type="field_oid" id="N{6a=8^g8lb^;;$k+UdG">
                        <field name="oid">zigbee.0.00158d0003d08254.opened</field>
                      </shadow>
                    </value>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="uUb*rPJ@7HKh}ePQ3+xD">
                        <value name="IF0">
                          <block type="logic_negate" id="zyl4Zcnu_xbM[v@Zd5RM">
                            <value name="BOOL">
                              <block type="variables_get" id="BW0,yyG3`QdHS[L4wlqX">
                                <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="control" id="p,,XTU`6Jdn+y:`k#dt1">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">sonoff.0.Küche Licht.POWER</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="on_source" id="Tf6L/nv9R/H)ZTt=9V$e">
                                <field name="ATTR">state.val</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                      </block>
                    </statement>
                    <next>
                      <block type="comment" id="x?AK=5B8AdQ},}Mxukdr">
                        <field name="COMMENT">licht</field>
                        <next>
                          <block type="on_ext" id="@r$eP`sbs0{,PL!|m;5D">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <value name="OID0">
                              <shadow type="field_oid" id="qT1RXo6F*|^$jtr^Yv6U">
                                <field name="oid">sonoff.0.Küche Licht.POWER</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="variables_set" id="!]8t5(L*PiH)r+(Bj-#z">
                                <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                                <value name="VALUE">
                                  <block type="logic_operation" id="rLOKk==CX,Tg.n5wKQ{2" inline="false">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="on_source" id=":A14~8y%)G)E?n{_^m+$">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_compare" id="vQwA^K*~+n4JQ-AvIi4f">
                                        <field name="OP">NEQ</field>
                                        <value name="A">
                                          <block type="variables_get" id="9/AXWZ{q.V1|l*YkAwQW">
                                            <field name="VAR" id="ab}EYSQ+h$QV@^IsPFg$">urspung</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="text" id="1PB*GEO1qU=wc3x[2y@!">
                                            <field name="TEXT">javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </xml>
            
            
            
            paul53P Offline
            paul53P Offline
            paul53
            wrote on last edited by
            #11

            @kuessel25 sagte so habs mal nachgebaut aber irgenwie klappts noch nicht

            Nicht wirklich im letzten Block.

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</variable>
             </variables>
             <block type="comment" id="#RhA$;TwFmjX_6S+m5P2" x="362" y="188">
               <field name="COMMENT">Balkontür</field>
               <next>
                 <block type="on_ext" id="=XrcLs#9F|dOr(~yJ)ZQ">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                   <field name="CONDITION">ne</field>
                   <field name="ACK_CONDITION"></field>
                   <value name="OID0">
                     <shadow type="field_oid" id="N{6a=8^g8lb^;;$k+UdG">
                       <field name="oid">zigbee.0.00158d0003d08254.opened</field>
                     </shadow>
                   </value>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="uUb*rPJ@7HKh}ePQ3+xD">
                       <value name="IF0">
                         <block type="logic_negate" id="zyl4Zcnu_xbM[v@Zd5RM">
                           <value name="BOOL">
                             <block type="variables_get" id="BW0,yyG3`QdHS[L4wlqX">
                               <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="p,,XTU`6Jdn+y:`k#dt1">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">sonoff.0.Küche Licht.POWER</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="on_source" id="Tf6L/nv9R/H)ZTt=9V$e">
                               <field name="ATTR">state.val</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                   <next>
                     <block type="comment" id="x?AK=5B8AdQ},}Mxukdr">
                       <field name="COMMENT">licht</field>
                       <next>
                         <block type="on_ext" id="@r$eP`sbs0{,PL!|m;5D">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                           <field name="CONDITION">ne</field>
                           <field name="ACK_CONDITION"></field>
                           <value name="OID0">
                             <shadow type="field_oid" id="qT1RXo6F*|^$jtr^Yv6U">
                               <field name="oid">sonoff.0.Küche Licht.POWER</field>
                             </shadow>
                           </value>
                           <statement name="STATEMENT">
                             <block type="variables_set" id="!]8t5(L*PiH)r+(Bj-#z">
                               <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                               <value name="VALUE">
                                 <block type="logic_operation" id="rLOKk==CX,Tg.n5wKQ{2" inline="false">
                                   <field name="OP">AND</field>
                                   <value name="A">
                                     <block type="on_source" id=":A14~8y%)G)E?n{_^m+$">
                                       <field name="ATTR">state.val</field>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <block type="logic_compare" id="vQwA^K*~+n4JQ-AvIi4f">
                                       <field name="OP">NEQ</field>
                                       <value name="A">
                                         <block type="on_source" id="?`Ai_Zrwsb||L=WLn,.9">
                                           <field name="ATTR">state.from</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="text" id="1PB*GEO1qU=wc3x[2y@!">
                                           <field name="TEXT">system.adapter.javascript.0</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
            </xml>
            

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            K 2 Replies Last reply
            0
            • paul53P paul53

              @kuessel25 sagte so habs mal nachgebaut aber irgenwie klappts noch nicht

              Nicht wirklich im letzten Block.

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</variable>
               </variables>
               <block type="comment" id="#RhA$;TwFmjX_6S+m5P2" x="362" y="188">
                 <field name="COMMENT">Balkontür</field>
                 <next>
                   <block type="on_ext" id="=XrcLs#9F|dOr(~yJ)ZQ">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                     <field name="CONDITION">ne</field>
                     <field name="ACK_CONDITION"></field>
                     <value name="OID0">
                       <shadow type="field_oid" id="N{6a=8^g8lb^;;$k+UdG">
                         <field name="oid">zigbee.0.00158d0003d08254.opened</field>
                       </shadow>
                     </value>
                     <statement name="STATEMENT">
                       <block type="controls_if" id="uUb*rPJ@7HKh}ePQ3+xD">
                         <value name="IF0">
                           <block type="logic_negate" id="zyl4Zcnu_xbM[v@Zd5RM">
                             <value name="BOOL">
                               <block type="variables_get" id="BW0,yyG3`QdHS[L4wlqX">
                                 <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="control" id="p,,XTU`6Jdn+y:`k#dt1">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">sonoff.0.Küche Licht.POWER</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="on_source" id="Tf6L/nv9R/H)ZTt=9V$e">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                           </block>
                         </statement>
                       </block>
                     </statement>
                     <next>
                       <block type="comment" id="x?AK=5B8AdQ},}Mxukdr">
                         <field name="COMMENT">licht</field>
                         <next>
                           <block type="on_ext" id="@r$eP`sbs0{,PL!|m;5D">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                             <field name="CONDITION">ne</field>
                             <field name="ACK_CONDITION"></field>
                             <value name="OID0">
                               <shadow type="field_oid" id="qT1RXo6F*|^$jtr^Yv6U">
                                 <field name="oid">sonoff.0.Küche Licht.POWER</field>
                               </shadow>
                             </value>
                             <statement name="STATEMENT">
                               <block type="variables_set" id="!]8t5(L*PiH)r+(Bj-#z">
                                 <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                                 <value name="VALUE">
                                   <block type="logic_operation" id="rLOKk==CX,Tg.n5wKQ{2" inline="false">
                                     <field name="OP">AND</field>
                                     <value name="A">
                                       <block type="on_source" id=":A14~8y%)G)E?n{_^m+$">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_compare" id="vQwA^K*~+n4JQ-AvIi4f">
                                         <field name="OP">NEQ</field>
                                         <value name="A">
                                           <block type="on_source" id="?`Ai_Zrwsb||L=WLn,.9">
                                             <field name="ATTR">state.from</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="text" id="1PB*GEO1qU=wc3x[2y@!">
                                             <field name="TEXT">system.adapter.javascript.0</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
              </xml>
              

              K Offline
              K Offline
              kuessel25
              wrote on last edited by
              #12

              @paul53 said in Türenabfrage Hilfe:

              <xml xmlns="https://developers.google.com/blockly/xml">

              leider keine änderung:cry:

              1 Reply Last reply
              0
              • paul53P paul53

                @kuessel25 sagte so habs mal nachgebaut aber irgenwie klappts noch nicht

                Nicht wirklich im letzten Block.

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</variable>
                 </variables>
                 <block type="comment" id="#RhA$;TwFmjX_6S+m5P2" x="362" y="188">
                   <field name="COMMENT">Balkontür</field>
                   <next>
                     <block type="on_ext" id="=XrcLs#9F|dOr(~yJ)ZQ">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                       <field name="CONDITION">ne</field>
                       <field name="ACK_CONDITION"></field>
                       <value name="OID0">
                         <shadow type="field_oid" id="N{6a=8^g8lb^;;$k+UdG">
                           <field name="oid">zigbee.0.00158d0003d08254.opened</field>
                         </shadow>
                       </value>
                       <statement name="STATEMENT">
                         <block type="controls_if" id="uUb*rPJ@7HKh}ePQ3+xD">
                           <value name="IF0">
                             <block type="logic_negate" id="zyl4Zcnu_xbM[v@Zd5RM">
                               <value name="BOOL">
                                 <block type="variables_get" id="BW0,yyG3`QdHS[L4wlqX">
                                   <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="control" id="p,,XTU`6Jdn+y:`k#dt1">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">sonoff.0.Küche Licht.POWER</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="on_source" id="Tf6L/nv9R/H)ZTt=9V$e">
                                   <field name="ATTR">state.val</field>
                                 </block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </statement>
                       <next>
                         <block type="comment" id="x?AK=5B8AdQ},}Mxukdr">
                           <field name="COMMENT">licht</field>
                           <next>
                             <block type="on_ext" id="@r$eP`sbs0{,PL!|m;5D">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                               <field name="CONDITION">ne</field>
                               <field name="ACK_CONDITION"></field>
                               <value name="OID0">
                                 <shadow type="field_oid" id="qT1RXo6F*|^$jtr^Yv6U">
                                   <field name="oid">sonoff.0.Küche Licht.POWER</field>
                                 </shadow>
                               </value>
                               <statement name="STATEMENT">
                                 <block type="variables_set" id="!]8t5(L*PiH)r+(Bj-#z">
                                   <field name="VAR" id="Jgx}Uo]|)`]qL]]Vs.M3">manuell_ein</field>
                                   <value name="VALUE">
                                     <block type="logic_operation" id="rLOKk==CX,Tg.n5wKQ{2" inline="false">
                                       <field name="OP">AND</field>
                                       <value name="A">
                                         <block type="on_source" id=":A14~8y%)G)E?n{_^m+$">
                                           <field name="ATTR">state.val</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="logic_compare" id="vQwA^K*~+n4JQ-AvIi4f">
                                           <field name="OP">NEQ</field>
                                           <value name="A">
                                             <block type="on_source" id="?`Ai_Zrwsb||L=WLn,.9">
                                               <field name="ATTR">state.from</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <block type="text" id="1PB*GEO1qU=wc3x[2y@!">
                                               <field name="TEXT">system.adapter.javascript.0</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </statement>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
                </xml>
                

                K Offline
                K Offline
                kuessel25
                wrote on last edited by
                #13

                @paul53
                mit dem script funktioniert es noch nicht ganz.
                nach dem script läuft es so

                (licht ist vorher aus)
                öffne ich die Tür = Licht geht an(richtig) :+1:
                schließe ich die Tür = Licht bleibt an(falsch sollte ausgehen) :-1:

                (licht war vorher an)
                öffne ich die Tür = Licht bleibt an (richtig) :+1:
                schließe ich die Tür = licht bleibt an (richtig) :+1:

                paul53P 1 Reply Last reply
                0
                • K kuessel25

                  @paul53
                  mit dem script funktioniert es noch nicht ganz.
                  nach dem script läuft es so

                  (licht ist vorher aus)
                  öffne ich die Tür = Licht geht an(richtig) :+1:
                  schließe ich die Tür = Licht bleibt an(falsch sollte ausgehen) :-1:

                  (licht war vorher an)
                  öffne ich die Tür = Licht bleibt an (richtig) :+1:
                  schließe ich die Tür = licht bleibt an (richtig) :+1:

                  paul53P Offline
                  paul53P Offline
                  paul53
                  wrote on last edited by
                  #14

                  @kuessel25 sagte: schließe ich die Tür = Licht bleibt an(falsch sollte ausgehen)

                  Dann muss manuell_ein auf true sein, was nicht sein sollte. Bei anderen Nutzern funktioniert es so. Bau mal im unteren Trigger einen Debug-Block ein, der den Wert und Ursprung ausgibt.

                  Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                  Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                  K 1 Reply Last reply
                  0
                  • paul53P paul53

                    @kuessel25 sagte: schließe ich die Tür = Licht bleibt an(falsch sollte ausgehen)

                    Dann muss manuell_ein auf true sein, was nicht sein sollte. Bei anderen Nutzern funktioniert es so. Bau mal im unteren Trigger einen Debug-Block ein, der den Wert und Ursprung ausgibt.

                    K Offline
                    K Offline
                    kuessel25
                    wrote on last edited by
                    #15

                    @paul53
                    Hallo Paul,hab ein wenig gedult mit mir :blush:
                    du müsstet mir das genauer erklären mit Debug-Block
                    hab es jetzt mal so versucht

                    Unbenannt1.PNG

                    paul53P 1 Reply Last reply
                    0
                    • K kuessel25

                      @paul53
                      Hallo Paul,hab ein wenig gedult mit mir :blush:
                      du müsstet mir das genauer erklären mit Debug-Block
                      hab es jetzt mal so versucht

                      Unbenannt1.PNG

                      paul53P Offline
                      paul53P Offline
                      paul53
                      wrote on last edited by
                      #16

                      @kuessel25 sagte: hab es jetzt mal so versucht

                      Ja, in etwa. Besser:

                      Bild_2021-01-25_111101.png

                      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                      K 1 Reply Last reply
                      0
                      • paul53P paul53

                        @kuessel25 sagte: hab es jetzt mal so versucht

                        Ja, in etwa. Besser:

                        Bild_2021-01-25_111101.png

                        K Offline
                        K Offline
                        kuessel25
                        wrote on last edited by
                        #17

                        @paul53
                        beim öffnen der tür (licht war aus) :

                        javascript.0 2021-01-25 11:17:22.719 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Licht:trueUrsprung:system.adapter.javascript.0
                        javascript.0 2021-01-25 11:17:22.705 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:true

                        beim schliessen der tür (licht war angegangen) :

                        javascript.0 2021-01-25 11:18:32.842 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:false

                        paul53P 1 Reply Last reply
                        0
                        • K kuessel25

                          @paul53
                          beim öffnen der tür (licht war aus) :

                          javascript.0 2021-01-25 11:17:22.719 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Licht:trueUrsprung:system.adapter.javascript.0
                          javascript.0 2021-01-25 11:17:22.705 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:true

                          beim schliessen der tür (licht war angegangen) :

                          javascript.0 2021-01-25 11:18:32.842 info (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:false

                          paul53P Offline
                          paul53P Offline
                          paul53
                          wrote on last edited by
                          #18

                          @kuessel25 sagte: Ursprung:system.adapter.javascript.0

                          Log-Ausgaben bitte in Code tags posten. Erweitere mal den oberen Debug.

                          Bild_2021-01-25_114036.png

                          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                          K 1 Reply Last reply
                          0
                          • paul53P paul53

                            @kuessel25 sagte: Ursprung:system.adapter.javascript.0

                            Log-Ausgaben bitte in Code tags posten. Erweitere mal den oberen Debug.

                            Bild_2021-01-25_114036.png

                            K Offline
                            K Offline
                            kuessel25
                            wrote on last edited by
                            #19

                            @paul53

                            
                            25.1.2021, 11:42:04.088	[info ]: javascript.0 (3715) Stop script script.js.verbrauchsmessung+kosten.licht_tür_test
                            25.1.2021, 11:42:04.097	[info ]: javascript.0 (3715) Start javascript script.js.verbrauchsmessung+kosten.licht_tür_test
                            25.1.2021, 11:42:04.108	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: registered 3 subscriptions and 0 schedules
                            25.1.2021, 11:42:12.247	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:trueManuell:
                            25.1.2021, 11:42:12.252	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Licht:trueUrsprung:system.adapter.javascript.0
                            25.1.2021, 11:42:20.792	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:falseManuell:true
                            
                            paul53P 1 Reply Last reply
                            0
                            • K kuessel25

                              @paul53

                              
                              25.1.2021, 11:42:04.088	[info ]: javascript.0 (3715) Stop script script.js.verbrauchsmessung+kosten.licht_tür_test
                              25.1.2021, 11:42:04.097	[info ]: javascript.0 (3715) Start javascript script.js.verbrauchsmessung+kosten.licht_tür_test
                              25.1.2021, 11:42:04.108	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: registered 3 subscriptions and 0 schedules
                              25.1.2021, 11:42:12.247	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:trueManuell:
                              25.1.2021, 11:42:12.252	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Licht:trueUrsprung:system.adapter.javascript.0
                              25.1.2021, 11:42:20.792	[info ]: javascript.0 (3715) script.js.verbrauchsmessung+kosten.licht_tür_test: Tür:falseManuell:true
                              
                              paul53P Offline
                              paul53P Offline
                              paul53
                              wrote on last edited by paul53
                              #20

                              @kuessel25: Tür:falseManuell:true

                              manuell_ein geht auf true, was nicht sein dürfte. Poste bitte den von Blockly erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

                              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                              K 1 Reply Last reply
                              0
                              • paul53P paul53

                                @kuessel25: Tür:falseManuell:true

                                manuell_ein geht auf true, was nicht sein dürfte. Poste bitte den von Blockly erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

                                K Offline
                                K Offline
                                kuessel25
                                wrote on last edited by kuessel25
                                #21

                                @paul53 sagte in Türenabfrage Hilfe:

                                Blockly erzeugten Javascript-Code

                                ich weiß jetzt nicht ob ich das richtig verstanden habe,

                                
                                var manuell_ein, urspung;
                                
                                
                                on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join('')));
                                  if (!manuell_ein) {
                                    setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : ""));
                                  }
                                });
                                // licht
                                on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join('')));
                                  manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0';
                                });
                                
                                on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
                                });
                                
                                paul53P 1 Reply Last reply
                                0
                                • K kuessel25

                                  @paul53 sagte in Türenabfrage Hilfe:

                                  Blockly erzeugten Javascript-Code

                                  ich weiß jetzt nicht ob ich das richtig verstanden habe,

                                  
                                  var manuell_ein, urspung;
                                  
                                  
                                  on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join('')));
                                    if (!manuell_ein) {
                                      setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : ""));
                                    }
                                  });
                                  // licht
                                  on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join('')));
                                    manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0';
                                  });
                                  
                                  on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
                                  });
                                  
                                  paul53P Offline
                                  paul53P Offline
                                  paul53
                                  wrote on last edited by paul53
                                  #22

                                  @kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';

                                  So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

                                  Bild_2021-01-25_115912.png

                                  Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                  Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                  K 1 Reply Last reply
                                  1
                                  • paul53P paul53

                                    @kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';

                                    So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

                                    Bild_2021-01-25_115912.png

                                    K Offline
                                    K Offline
                                    kuessel25
                                    wrote on last edited by
                                    #23

                                    @paul53
                                    Peinlich :cold_sweat:

                                    hatte ich nicht gesehen,danke! jetzt gehts

                                    paul53P 1 Reply Last reply
                                    0
                                    • K kuessel25

                                      @paul53
                                      Peinlich :cold_sweat:

                                      hatte ich nicht gesehen,danke! jetzt gehts

                                      paul53P Offline
                                      paul53P Offline
                                      paul53
                                      wrote on last edited by
                                      #24

                                      @kuessel25 sagte: hatte ich nicht gesehen,danke!

                                      Vor einem Import alles löschen!

                                      @kuessel25 sagte in Türenabfrage Hilfe:

                                      jetzt gehts

                                      Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].

                                      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                      K 1 Reply Last reply
                                      0
                                      • paul53P paul53

                                        @kuessel25 sagte: hatte ich nicht gesehen,danke!

                                        Vor einem Import alles löschen!

                                        @kuessel25 sagte in Türenabfrage Hilfe:

                                        jetzt gehts

                                        Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].

                                        K Offline
                                        K Offline
                                        kuessel25
                                        wrote on last edited by
                                        #25

                                        @paul53
                                        hätte noch ne kleine frage,und zwar wäre es jetzt noch möglich eine verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

                                        paul53P 1 Reply Last reply
                                        0
                                        • K kuessel25

                                          @paul53
                                          hätte noch ne kleine frage,und zwar wäre es jetzt noch möglich eine verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

                                          paul53P Offline
                                          paul53P Offline
                                          paul53
                                          wrote on last edited by
                                          #26

                                          @kuessel25 sagte: verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

                                          Bild_2021-01-25_143736.png

                                          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

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


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          268

                                          Online

                                          32.7k

                                          Users

                                          82.5k

                                          Topics

                                          1.3m

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

                                          • Don't have an account? Register

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