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. Impulse zählen bei Leistungsanstieg

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    762

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

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

Impulse zählen bei Leistungsanstieg

Scheduled Pinned Locked Moved Blockly
3 Posts 2 Posters 382 Views 1 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.
  • A Offline
    A Offline
    Aiouh
    wrote on last edited by Aiouh
    #1

    Hallo,
    ich möchte über den Leistungsanstieg meiner Wasserpumpe zählwn wie oft sie einschaltet.
    Zur Umsetzung dachte ich, einfach messen wenn 25 Watt überschritten werden, dann den Zähler um 1 hochzählen.
    Um sicher zu sein dass er nur einmal zählt dachte ich, einfach 1 Minute warten und dann erst ausführen. (Die Pumpe läuft nur 30Sekunden dann ist der Sammelschacht leer.)
    Das passt aber nicht :) Der Zähler zählt nach 1 Minute zuerst um Eins hoch, dann kurz darauf nochmal um Eins.
    3b83a352-2294-4629-97f4-b70df418bc64-image.png
    Wo liegt mein Denkfehler? DANKE !

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable type="timeout" id="timeout">timeout</variable>
        <variable id="3okqS59VMsK+XDFh+0SE">impulse_alt</variable>
        <variable id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</variable>
      </variables>
      <block type="on_ext" id="^O]{#X4cLVr,dxA8J+oZ" x="-713" y="-613">
        <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="?QVRfK`Km3@@7fspSI:1">
            <field name="oid">hm-rpc.0.REQ0777466.2.POWER</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="eKBgg_cLdvp!h%Wc06}0">
            <value name="IF0">
              <block type="logic_compare" id="*qAWBZj1_x(%/dw$7Eg=">
                <field name="OP">GTE</field>
                <value name="A">
                  <block type="get_value" id="MhP%.qzHXx/4b3,jg:8m">
                    <field name="ATTR">val</field>
                    <field name="OID">hm-rpc.0.REQ0777466.2.POWER</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="5#c}BclPeXD9xA?*d*u_">
                    <field name="NUM">25</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="comment" id="E6c,Dz{-d+No68M=DC)H">
                <field name="COMMENT">1min warten um die Leistungsspitze nur einmal zu zählen</field>
                <next>
                  <block type="timeouts_settimeout" id="4Qg?p*Z]DCF/!{)cK{Fx">
                    <field name="NAME">timeout</field>
                    <field name="DELAY">1</field>
                    <field name="UNIT">min</field>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="t;/Zh{uMf(o],~-+OntM">
                        <field name="VAR" id="3okqS59VMsK+XDFh+0SE">impulse_alt</field>
                        <value name="VALUE">
                          <block type="get_value" id="?wTnwt0?K_8E%Tnk6.eq">
                            <field name="ATTR">val</field>
                            <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id=":-/Kcx*z%P%epeF0:V$o">
                            <field name="VAR" id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</field>
                            <value name="VALUE">
                              <block type="math_arithmetic" id="LJD1uV9)Doq@HNDZtfa5">
                                <field name="OP">ADD</field>
                                <value name="A">
                                  <shadow type="math_number" id="V[M.Om=|S,oi.((D{R!@">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="variables_get" id="[G?ZEF:EN$JXinyHX$~b">
                                    <field name="VAR" id="3okqS59VMsK+XDFh+0SE">impulse_alt</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="e-?sbeL0_BQAkq]M_~Br">
                                    <field name="NUM">1</field>
                                  </shadow>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="update" id="SZ?cd/H@X{ZP^]M7vBgL">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="variables_get" id="P!GBoAUR~j;[3B}t2|so">
                                    <field name="VAR" id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </statement>
      </block>
    </xml>
    
    paul53P 1 Reply Last reply
    0
    • A Aiouh

      Hallo,
      ich möchte über den Leistungsanstieg meiner Wasserpumpe zählwn wie oft sie einschaltet.
      Zur Umsetzung dachte ich, einfach messen wenn 25 Watt überschritten werden, dann den Zähler um 1 hochzählen.
      Um sicher zu sein dass er nur einmal zählt dachte ich, einfach 1 Minute warten und dann erst ausführen. (Die Pumpe läuft nur 30Sekunden dann ist der Sammelschacht leer.)
      Das passt aber nicht :) Der Zähler zählt nach 1 Minute zuerst um Eins hoch, dann kurz darauf nochmal um Eins.
      3b83a352-2294-4629-97f4-b70df418bc64-image.png
      Wo liegt mein Denkfehler? DANKE !

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout">timeout</variable>
          <variable id="3okqS59VMsK+XDFh+0SE">impulse_alt</variable>
          <variable id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</variable>
        </variables>
        <block type="on_ext" id="^O]{#X4cLVr,dxA8J+oZ" x="-713" y="-613">
          <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="?QVRfK`Km3@@7fspSI:1">
              <field name="oid">hm-rpc.0.REQ0777466.2.POWER</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="eKBgg_cLdvp!h%Wc06}0">
              <value name="IF0">
                <block type="logic_compare" id="*qAWBZj1_x(%/dw$7Eg=">
                  <field name="OP">GTE</field>
                  <value name="A">
                    <block type="get_value" id="MhP%.qzHXx/4b3,jg:8m">
                      <field name="ATTR">val</field>
                      <field name="OID">hm-rpc.0.REQ0777466.2.POWER</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="5#c}BclPeXD9xA?*d*u_">
                      <field name="NUM">25</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="comment" id="E6c,Dz{-d+No68M=DC)H">
                  <field name="COMMENT">1min warten um die Leistungsspitze nur einmal zu zählen</field>
                  <next>
                    <block type="timeouts_settimeout" id="4Qg?p*Z]DCF/!{)cK{Fx">
                      <field name="NAME">timeout</field>
                      <field name="DELAY">1</field>
                      <field name="UNIT">min</field>
                      <statement name="STATEMENT">
                        <block type="variables_set" id="t;/Zh{uMf(o],~-+OntM">
                          <field name="VAR" id="3okqS59VMsK+XDFh+0SE">impulse_alt</field>
                          <value name="VALUE">
                            <block type="get_value" id="?wTnwt0?K_8E%Tnk6.eq">
                              <field name="ATTR">val</field>
                              <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                            </block>
                          </value>
                          <next>
                            <block type="variables_set" id=":-/Kcx*z%P%epeF0:V$o">
                              <field name="VAR" id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</field>
                              <value name="VALUE">
                                <block type="math_arithmetic" id="LJD1uV9)Doq@HNDZtfa5">
                                  <field name="OP">ADD</field>
                                  <value name="A">
                                    <shadow type="math_number" id="V[M.Om=|S,oi.((D{R!@">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="variables_get" id="[G?ZEF:EN$JXinyHX$~b">
                                      <field name="VAR" id="3okqS59VMsK+XDFh+0SE">impulse_alt</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="e-?sbeL0_BQAkq]M_~Br">
                                      <field name="NUM">1</field>
                                    </shadow>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="update" id="SZ?cd/H@X{ZP^]M7vBgL">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="variables_get" id="P!GBoAUR~j;[3B}t2|so">
                                      <field name="VAR" id="RZI_u}?y}!ozy(dUH5QW">impulse_neu</field>
                                    </block>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      paul53P Offline
      paul53P Offline
      paul53
      wrote on last edited by paul53
      #2

      @aiouh sagte: Wo liegt mein Denkfehler?

      Die Leistung ist im Ein-Zustand nicht konstant, so dass der Timer mehrfach gestartet wird. Versuche es mal so:

      Bild_2021-06-19_163726.png

      Wert und vorheriger Wert findet man unter "Trigger".

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="*VAptc2Qdiz%tU,=oA?e">impulse</variable>
       </variables>
       <block type="variables_set" id="t;/Zh{uMf(o],~-+OntM" x="-712" y="-638">
         <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
         <value name="VALUE">
           <block type="get_value" id="?wTnwt0?K_8E%Tnk6.eq">
             <field name="ATTR">val</field>
             <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
           </block>
         </value>
         <next>
           <block type="on_ext" id="^O]{#X4cLVr,dxA8J+oZ">
             <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="?QVRfK`Km3@@7fspSI:1">
                 <field name="oid">hm-rpc.0.REQ0777466.2.POWER</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="eKBgg_cLdvp!h%Wc06}0">
                 <value name="IF0">
                   <block type="logic_operation" id="+Ul+({MdXOiWPd3.nM=|">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_compare" id="*qAWBZj1_x(%/dw$7Eg=">
                         <field name="OP">GTE</field>
                         <value name="A">
                           <block type="on_source" id="ND%-}tl:nFpkZ05^ly:~">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="5#c}BclPeXD9xA?*d*u_">
                             <field name="NUM">25</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_compare" id="Mt~$I$/p(#%f?RW[lz{p">
                         <field name="OP">LT</field>
                         <value name="A">
                           <block type="on_source" id="=!R6/R)gMzA9Dp-ORse_">
                             <field name="ATTR">oldState.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="s$p~vmX^c#!|*o+(Q[a[">
                             <field name="NUM">25</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="math_change" id="AvV~2{]|#r{r3:@Ga4#l">
                     <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
                     <value name="DELTA">
                       <shadow type="math_number" id="q3I#}JI?zj8W#WAmf{0;">
                         <field name="NUM">1</field>
                       </shadow>
                     </value>
                     <next>
                       <block type="update" id="SZ?cd/H@X{ZP^]M7vBgL">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="variables_get" id="P!GBoAUR~j;[3B}t2|so">
                             <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </statement>
           </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

      A 1 Reply Last reply
      1
      • paul53P paul53

        @aiouh sagte: Wo liegt mein Denkfehler?

        Die Leistung ist im Ein-Zustand nicht konstant, so dass der Timer mehrfach gestartet wird. Versuche es mal so:

        Bild_2021-06-19_163726.png

        Wert und vorheriger Wert findet man unter "Trigger".

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable id="*VAptc2Qdiz%tU,=oA?e">impulse</variable>
         </variables>
         <block type="variables_set" id="t;/Zh{uMf(o],~-+OntM" x="-712" y="-638">
           <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
           <value name="VALUE">
             <block type="get_value" id="?wTnwt0?K_8E%Tnk6.eq">
               <field name="ATTR">val</field>
               <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
             </block>
           </value>
           <next>
             <block type="on_ext" id="^O]{#X4cLVr,dxA8J+oZ">
               <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="?QVRfK`Km3@@7fspSI:1">
                   <field name="oid">hm-rpc.0.REQ0777466.2.POWER</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="eKBgg_cLdvp!h%Wc06}0">
                   <value name="IF0">
                     <block type="logic_operation" id="+Ul+({MdXOiWPd3.nM=|">
                       <field name="OP">AND</field>
                       <value name="A">
                         <block type="logic_compare" id="*qAWBZj1_x(%/dw$7Eg=">
                           <field name="OP">GTE</field>
                           <value name="A">
                             <block type="on_source" id="ND%-}tl:nFpkZ05^ly:~">
                               <field name="ATTR">state.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="5#c}BclPeXD9xA?*d*u_">
                               <field name="NUM">25</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_compare" id="Mt~$I$/p(#%f?RW[lz{p">
                           <field name="OP">LT</field>
                           <value name="A">
                             <block type="on_source" id="=!R6/R)gMzA9Dp-ORse_">
                               <field name="ATTR">oldState.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="s$p~vmX^c#!|*o+(Q[a[">
                               <field name="NUM">25</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="math_change" id="AvV~2{]|#r{r3:@Ga4#l">
                       <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
                       <value name="DELTA">
                         <shadow type="math_number" id="q3I#}JI?zj8W#WAmf{0;">
                           <field name="NUM">1</field>
                         </shadow>
                       </value>
                       <next>
                         <block type="update" id="SZ?cd/H@X{ZP^]M7vBgL">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">javascript.0.Eigene_Datenpunkte.Garten.grundwasser_impulse_keller</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="variables_get" id="P!GBoAUR~j;[3B}t2|so">
                               <field name="VAR" id="*VAptc2Qdiz%tU,=oA?e">impulse</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
           </next>
         </block>
        </xml>
        

        A Offline
        A Offline
        Aiouh
        wrote on last edited by
        #3

        @paul53 Wieder was gelernt, klappt perfekt. Danke !

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Support us

        ioBroker
        Community Adapters
        Donate

        372

        Online

        32.8k

        Users

        82.7k

        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