Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Steckdosen Steuerung in Abhängigkeit der Leistung

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Steckdosen Steuerung in Abhängigkeit der Leistung

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

      Hallo,
      ich versuche eine kleine Steckdosensteuerung zu bauen und scheitere leider an diesem, wie ich dachte, einfachem Thema.

      In dem Skript überwache ich Steckdose 1. Wenn diese den Wert >=20 Watt hat (Chlorinator und Wärempumpe), soll die Pumpe die an Steckdose 2 hängt geschaltet werden. Sinkt der Wert wieder unter 20 Watt, soll mit 3 Minuten Verzögerung die Steckdose (Pumpe) wieder abgeschaltet werden.

      Das Einschalten bei meiner Lösung funktioniert, dass Abschalten findet jedoch zu früh statt. (maximal eine Minute). Ich vermute, das es ein Abschaltbefehl ist, der durch eine Leistungsschwankung des Standby ausgeführt wurde.
      Wie kann ich den abfangen?

      Screenshot:
      Im Anhang.Bildschirmfoto zu 2020-05-22 17-12-08.png

      Export meines Skriptes:

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="undefined" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id=":lLUc)zVc/7wF`[Rge^V" x="12" y="37">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="Q2oijC-Ul~.sNAx3v7SD">
              <field name="oid">shelly.0.SHSW-25#686F69#1.Relay0.Power</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="4bmQ8^wgWdYh%e-^a}mB">
              <mutation else="1"></mutation>
              <value name="IF0">
                <block type="logic_compare" id="be*hd*Ha|(^e+`T)Uk!6">
                  <field name="OP">GTE</field>
                  <value name="A">
                    <block type="get_value" id="l-,Ed(Jvn`G3@;]YO=e5">
                      <field name="ATTR">val</field>
                      <field name="OID">shelly.0.SHSW-25#686F69#1.Relay0.Power</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="-Qw`wC?A-*T@LRgujiS@">
                      <field name="NUM">20</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="timeouts_cleartimeout" id="u6v0Csjx,67X!x[evFc+">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="control" id="6-Qxk.g47{COfe)vpERf">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-25#686F69#1.Relay1.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="QR@R;F$GlP(rqz2^A_)5">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
              <statement name="ELSE">
                <block type="timeouts_settimeout" id="|6.(iE3j_A=S#Iu2LLzl">
                  <field name="NAME">timeout</field>
                  <field name="DELAY">3</field>
                  <field name="UNIT">min</field>
                  <statement name="STATEMENT">
                    <block type="control" id="oY#}nx[J*2OsXL*56*cu">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-25#686F69#1.Relay1.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="Wtq%0S:d.Pc~{G4A|z^l">
                          <field name="BOOL">FALSE</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      
      Homer.J. 1 Reply Last reply Reply Quote 0
      • Homer.J.
        Homer.J. @BigChris last edited by Homer.J.

        @BigChris mach mal sonst wenn wert kleiner 20 dann timeout 3 min

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable type="timeout" id="timeout">timeout</variable>
          </variables>
          <block type="on_ext" id=":lLUc)zVc/7wF`[Rge^V" x="12" y="37">
            <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="Q2oijC-Ul~.sNAx3v7SD">
                <field name="oid">shelly.0.SHSW-25#686F69#1.Relay0.Power</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="4bmQ8^wgWdYh%e-^a}mB">
                <mutation elseif="1"></mutation>
                <value name="IF0">
                  <block type="logic_compare" id="be*hd*Ha|(^e+`T)Uk!6">
                    <field name="OP">GTE</field>
                    <value name="A">
                      <block type="get_value" id="l-,Ed(Jvn`G3@;]YO=e5">
                        <field name="ATTR">val</field>
                        <field name="OID">shelly.0.SHSW-25#686F69#1.Relay0.Power</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="-Qw`wC?A-*T@LRgujiS@">
                        <field name="NUM">20</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="timeouts_cleartimeout" id="u6v0Csjx,67X!x[evFc+">
                    <field name="NAME">timeout</field>
                    <next>
                      <block type="control" id="6-Qxk.g47{COfe)vpERf">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">shelly.0.SHSW-25#686F69#1.Relay1.Switch</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="QR@R;F$GlP(rqz2^A_)5">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF1">
                  <block type="logic_compare" id="F`RTIU^3MSW=hl*:i0K?">
                    <field name="OP">LTE</field>
                    <value name="A">
                      <block type="get_value" id="X_zsDa|pLeNxovr(=axD">
                        <field name="ATTR">val</field>
                        <field name="OID">shelly.0.SHSW-25#686F69#1.Relay0.Power</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="9[@eZn+m|GRObLS;%kT;">
                        <field name="NUM">20</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO1">
                  <block type="timeouts_settimeout" id="|6.(iE3j_A=S#Iu2LLzl">
                    <field name="NAME">timeout</field>
                    <field name="DELAY">3</field>
                    <field name="UNIT">min</field>
                    <statement name="STATEMENT">
                      <block type="control" id="oY#}nx[J*2OsXL*56*cu">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">shelly.0.SHSW-25#686F69#1.Relay1.Switch</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="Wtq%0S:d.Pc~{G4A|z^l">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        
        1 Reply Last reply Reply Quote 0
        • B
          BigChris last edited by

          Das habe ich versucht.
          Bildschirmfoto zu 2020-05-22 17-45-21.png

          Leider so wie vorher auch. Die drei Minuten werden nicht eingehalten.

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

            @BigChris sagte:

            Leider so wie vorher auch

            Wenn der Wert im Bereich < 20 schwankt, werden mehrere Timer gestartet. Versuche es mal so:

            Blockly_temp.JPG

            oder so:

            Blockly_temp.JPG

            Wert und vorheriger Wert findet man unter "Trigger".

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable type="timeout" id="timeout">timeout</variable>
             </variables>
             <block type="on_ext" id="5LajLtl-mN;OlP4X+$$," x="62" y="-13">
               <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=")4LQw1Q8yug%q-tUfjc1">
                   <field name="oid">default</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="3XOKh:x1cPC_am_:WXLX">
                   <mutation elseif="1"></mutation>
                   <value name="IF0">
                     <block type="logic_compare" id="ZCm5k%WsUXNM#.`ulwg%">
                       <field name="OP">GTE</field>
                       <value name="A">
                         <block type="on_source" id="}~i|LTw$#_#.%Z(*.+;J">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="math_number" id="brRKGr(0?T]e-7gH#dyM">
                           <field name="NUM">20</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="timeouts_cleartimeout" id="gsL^@UX@Rb0U%cUiTp!P">
                       <field name="NAME">timeout</field>
                       <next>
                         <block type="control" id="AW{j@OtQrs?W.U2Op*fW">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">Object ID</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id=".djn+26}U77_m1$QSu8t">
                               <field name="BOOL">TRUE</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <value name="IF1">
                     <block type="logic_negate" id="gcsbyA2E5}`!{Ewyyn:^">
                       <value name="BOOL">
                         <block type="variables_get" id="ey8Cnhw4a55!BRwb#pvj">
                           <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO1">
                     <block type="timeouts_settimeout" id="j9;]T38F964i!{G/[#NO">
                       <field name="NAME">timeout</field>
                       <field name="DELAY">3</field>
                       <field name="UNIT">min</field>
                       <statement name="STATEMENT">
                         <block type="control" id="`[w:Fbx2RaLGo#+t[52~">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">Object ID</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="X3t?stNi}?-O7Ym#:kpI">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
             <block type="control" id=";LYYC.^%y[CuSP)30Y{V" x="88" y="463">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
               <field name="OID">Object ID</field>
               <field name="WITH_DELAY">TRUE</field>
               <field name="DELAY_MS">1000</field>
               <field name="UNIT">ms</field>
               <field name="CLEAR_RUNNING">FALSE</field>
               <next>
                 <block type="control" id="62ztSMDEawET6MhjyBm7">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                   <field name="OID">Object ID</field>
                   <field name="WITH_DELAY">TRUE</field>
                   <field name="DELAY_MS">1000</field>
                   <field name="UNIT">ms</field>
                   <field name="CLEAR_RUNNING">TRUE</field>
                 </block>
               </next>
             </block>
            </xml>
            

            1 Reply Last reply Reply Quote 0
            • B
              BigChris last edited by

              @paul53

              Variante 1 hat direkt funktioniert.
              Ich glaube ich habe noch viel zu lernen...

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

              Support us

              ioBroker
              Community Adapters
              Donate

              528
              Online

              32.0k
              Users

              80.4k
              Topics

              1.3m
              Posts

              3
              5
              263
              Loading More Posts
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes
              Reply
              • Reply as topic
              Log in to reply
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
              The ioBroker Community 2014-2023
              logo