Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

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

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    10
    1
    200

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.5k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.4k

[gelöst]Türenabfrage Hilfe

Geplant Angeheftet Gesperrt Verschoben Blockly
26 Beiträge 2 Kommentatoren 1.8k Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • 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
    schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
    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
      schrieb am zuletzt editiert von
      #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 Antworten Letzte Antwort
      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
        schrieb am zuletzt editiert von
        #12

        @paul53 said in Türenabfrage Hilfe:

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

        leider keine änderung:cry:

        1 Antwort Letzte Antwort
        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
          schrieb am zuletzt editiert von
          #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 Antwort Letzte Antwort
          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
            schrieb am zuletzt editiert von
            #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 Antwort Letzte Antwort
            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
              schrieb am zuletzt editiert von
              #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 Antwort Letzte Antwort
              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
                schrieb am zuletzt editiert von
                #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 Antwort Letzte Antwort
                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
                  schrieb am zuletzt editiert von
                  #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 Antwort Letzte Antwort
                  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
                    schrieb am zuletzt editiert von
                    #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 Antwort Letzte Antwort
                    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
                      schrieb am zuletzt editiert von
                      #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 Antwort Letzte Antwort
                      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
                        schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                        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
                          schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                          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
                            schrieb am zuletzt editiert von 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 Antwort Letzte Antwort
                            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
                              schrieb am zuletzt editiert von
                              #23

                              @paul53
                              Peinlich :cold_sweat:

                              hatte ich nicht gesehen,danke! jetzt gehts

                              paul53P 1 Antwort Letzte Antwort
                              0
                              • K kuessel25

                                @paul53
                                Peinlich :cold_sweat:

                                hatte ich nicht gesehen,danke! jetzt gehts

                                paul53P Offline
                                paul53P Offline
                                paul53
                                schrieb am zuletzt editiert von
                                #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 Antwort Letzte Antwort
                                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
                                  schrieb am zuletzt editiert von
                                  #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 Antwort Letzte Antwort
                                  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
                                    schrieb am zuletzt editiert von
                                    #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 Antwort Letzte Antwort
                                    1
                                    Antworten
                                    • In einem neuen Thema antworten
                                    Anmelden zum Antworten
                                    • Älteste zuerst
                                    • Neuste zuerst
                                    • Meiste Stimmen


                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    784

                                    Online

                                    32.5k

                                    Benutzer

                                    81.7k

                                    Themen

                                    1.3m

                                    Beiträge
                                    Community
                                    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                    ioBroker Community 2014-2025
                                    logo
                                    • Anmelden

                                    • Du hast noch kein Konto? Registrieren

                                    • Anmelden oder registrieren, um zu suchen
                                    • Erster Beitrag
                                      Letzter Beitrag
                                    0
                                    • Home
                                    • Aktuell
                                    • Tags
                                    • Ungelesen 0
                                    • Kategorien
                                    • Unreplied
                                    • Beliebt
                                    • GitHub
                                    • Docu
                                    • Hilfe