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. Futterautomatik

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.6k

Futterautomatik

Geplant Angeheftet Gesperrt Verschoben Blockly
15 Beiträge 3 Kommentatoren 419 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.
  • AphofisA Offline
    AphofisA Offline
    Aphofis
    schrieb am zuletzt editiert von
    #3

    Ich komme nicht weiter!
    Ich habe jetzt eine weitere Steuerung, die die Pumpe 5 min. vor der Futter dosierung
    stoppen soll und eigentlich nach einem Datenpunkt Zeit 15 min wieder einschalten soll.
    wo man dort aber den Datenpunkt mit den Minuten hinbekommt weiß ich nicht.
    und ob die Steuerung so korekt ist, weiß ich auch nicht.

    02.png

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id=",vrSKF,`8zjR8|?q=ypv">clock</variable>
        <variable id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</variable>
        <variable id="u)9}*R19v/Qs3Rt)$4,W">Dauer</variable>
        <variable type="cron" id="schedule1">schedule1</variable>
        <variable type="timeout" id="intervall">intervall</variable>
      </variables>
      <block type="procedures_callnoreturn" id="3a)9A+{U=BTerQFdk^7e" x="-2937" y="-1287">
        <mutation name="setUhr">
          <arg name="clock"></arg>
        </mutation>
        <value name="ARG0">
          <block type="get_value" id="Rmv(=Tg+:6/}8B(?~nI#">
            <field name="ATTR">val</field>
            <field name="OID">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
          </block>
        </value>
        <next>
          <block type="on_ext" id="X}o|@dWx#6!BiHho8e)o">
            <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="dXPC7;GFYg(#~T78}@mB">
                <field name="oid">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="schedule_clear" id="nt-N]NBg?,fY%.)hYJ4D">
                <field name="NAME">clock</field>
                <next>
                  <block type="procedures_callnoreturn" id="yvhs4uL6uUxnW!c$UF/{">
                    <mutation name="setUhr">
                      <arg name="clock"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="on_source" id="SfI,}teG@`dg#_g%Zp#:">
                        <field name="ATTR">state.val</field>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </next>
      </block>
      <block type="procedures_defnoreturn" id="fK5kmsd)LwZ7|P2xa^9U" x="-2937" y="-1037">
        <mutation>
          <arg name="clock" varid=",vrSKF,`8zjR8|?q=ypv"></arg>
        </mutation>
        <field name="NAME">setUhr</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="variables_set" id="aOx5`vU/=f;#)rmrW[|7">
            <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
            <value name="VALUE">
              <block type="time_calculation" id="z|fju~f8!/H*jUdb=P@O">
                <field name="OPERATION">-</field>
                <field name="UNIT">min</field>
                <value name="DATE_TIME">
                  <shadow type="time_get" id="Iw8E5Q%[d9Ru3tLb$w$w">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                    <field name="OPTION">object</field>
                  </shadow>
                  <block type="lists_split" id="XnqDHu5JM{#WIs8~S,M-">
                    <mutation mode="SPLIT"></mutation>
                    <field name="MODE">SPLIT</field>
                    <value name="INPUT">
                      <block type="variables_get" id="4`T;i0Hg@f?=Gq^,J6.~">
                        <field name="VAR" id=",vrSKF,`8zjR8|?q=ypv">clock</field>
                      </block>
                    </value>
                    <value name="DELIM">
                      <shadow type="text" id="]v!xP8l3r?{D;(m_QyNL">
                        <field name="TEXT">:</field>
                      </shadow>
                    </value>
                  </block>
                </value>
                <value name="VALUE">
                  <shadow type="math_number" id="ZKVA~fs3mR8IPdRXKAIP">
                    <field name="NUM">5</field>
                  </shadow>
                </value>
              </block>
            </value>
            <next>
              <block type="schedule_create" id="6x%+6G+PaD[w*{FuFm=K">
                <field name="NAME">schedule1</field>
                <value name="SCHEDULE">
                  <shadow type="field_cron" id="m4F75|F$}NA}2;e/avWa">
                    <field name="CRON">* * * * *</field>
                  </shadow>
                  <block type="cron_builder" id="q6(U2T{7uu}mYF)9QMKr">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                    <field name="LINE">FALSE</field>
                    <field name="WITH_SECONDS">FALSE</field>
                    <value name="DOW">
                      <shadow type="text" id=")8oVcqHY5re?jv#0QsO8">
                        <field name="TEXT">*</field>
                      </shadow>
                    </value>
                    <value name="MONTHS">
                      <shadow type="text" id="GfQ!DoE|TZTliq*)8,@j">
                        <field name="TEXT">*</field>
                      </shadow>
                    </value>
                    <value name="DAYS">
                      <shadow type="text" id="S6hVuxIjcYJMlS^~:zE5">
                        <field name="TEXT">*</field>
                      </shadow>
                    </value>
                    <value name="HOURS">
                      <shadow type="text" id="NP{*G*@dWEP9M9mNlZFF">
                        <field name="TEXT">*</field>
                      </shadow>
                      <block type="lists_getIndex" id="-0gZ}|H=8/}~St}d%rl;">
                        <mutation statement="false" at="true"></mutation>
                        <field name="MODE">GET</field>
                        <field name="WHERE">FROM_START</field>
                        <value name="VALUE">
                          <block type="variables_get" id="8U#M]$`MHq(~A]~(v{2R">
                            <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                          </block>
                        </value>
                        <value name="AT">
                          <block type="math_number" id=")zFTxG~Gpp`eZw8r2,8w">
                            <field name="NUM">1</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="MINUTES">
                      <shadow type="text" id="I(LCmtz/NJ%:Tvp,*;JL">
                        <field name="TEXT">*</field>
                      </shadow>
                      <block type="lists_getIndex" id="0([.HRKLsVPA.X:jwVI@">
                        <mutation statement="false" at="true"></mutation>
                        <field name="MODE">GET</field>
                        <field name="WHERE">FROM_START</field>
                        <value name="VALUE">
                          <block type="variables_get" id="8#E0pY-UET(BcZH]~qB:">
                            <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                          </block>
                        </value>
                        <value name="AT">
                          <block type="math_number" id=";UF-jK:^cV#hui?GDL/V">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="STATEMENT">
                  <block type="procedures_callnoreturn" id="/6qq{?/)+*vm:UnA$x,0">
                    <mutation name="Pumpe"></mutation>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="procedures_defnoreturn" id="jE$gVVpa7!Xtx{X@H^Fd" x="-2162" y="-937">
        <field name="NAME">Pumpe</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="variables_set" id="9kptcK|P^2:}bKZXyZ8f">
            <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
            <value name="VALUE">
              <block type="convert_tonumber" id="Tj/%:}sl8v})GfkG,zO:">
                <value name="VALUE">
                  <block type="get_value" id=".,XzJi)h(f$9$~(`H$I!">
                    <field name="ATTR">val</field>
                    <field name="OID">0_userdata.0.Futterautomatik.Futter_Pumpen_Pause</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="control" id="%}iPzHc5tUi.(P1_MvRo">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                <field name="OID">sonoff.0.Aqua_Control.POWER8</field>
                <field name="WITH_DELAY">FALSE</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="SM.e~4#O=p?c/SXA|JX%">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
                <next>
                  <block type="debug" id="y_Y]xT#qZqZCX#n?iIsk">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="Od}|Jw/NX=B9~P;c8:5b">
                        <field name="TEXT">Pumpe wurde ausgeschaltet</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="comment" id="KV;?nPX*TAluqR-qF9f+">
                        <field name="COMMENT">Pumpen Intervall</field>
                        <next>
                          <block type="math_change" id="!*zN$DgW0K=76_[.1*]X">
                            <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                            <value name="DELTA">
                              <shadow type="math_number" id="e_D7=bSd65:`]Q{qWSZD">
                                <field name="NUM">-1</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="timeouts_settimeout" id="4LCzvgm.VajEnFPBRu$n">
                                <field name="NAME">intervall</field>
                                <field name="DELAY">15</field>
                                <field name="UNIT">min</field>
                                <statement name="STATEMENT">
                                  <block type="controls_if" id="=/[;A-M~WF?KXEx~W0z?">
                                    <value name="IF0">
                                      <block type="logic_compare" id=";qY,PC)CB~{1#4iVHaj,">
                                        <field name="OP">LTE</field>
                                        <value name="A">
                                          <block type="variables_get" id="2k;4KgTu$A3wF)@V`ulP">
                                            <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="math_number" id="?bnhw6qVm`$}~NCKlw2P">
                                            <field name="NUM">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="timeouts_clearinterval" id=";dz/hf`o4]4(2pDSH)I3">
                                        <field name="NAME"></field>
                                        <next>
                                          <block type="control" id="SeaFI}%xNdyzRbLV,6HN">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.Aqua_Control.POWER5</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="1_[)-;0}n;LMH}tCmhi:">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </xml>
    
    paul53P 1 Antwort Letzte Antwort
    0
    • AphofisA Aphofis

      Ich komme nicht weiter!
      Ich habe jetzt eine weitere Steuerung, die die Pumpe 5 min. vor der Futter dosierung
      stoppen soll und eigentlich nach einem Datenpunkt Zeit 15 min wieder einschalten soll.
      wo man dort aber den Datenpunkt mit den Minuten hinbekommt weiß ich nicht.
      und ob die Steuerung so korekt ist, weiß ich auch nicht.

      02.png

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id=",vrSKF,`8zjR8|?q=ypv">clock</variable>
          <variable id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</variable>
          <variable id="u)9}*R19v/Qs3Rt)$4,W">Dauer</variable>
          <variable type="cron" id="schedule1">schedule1</variable>
          <variable type="timeout" id="intervall">intervall</variable>
        </variables>
        <block type="procedures_callnoreturn" id="3a)9A+{U=BTerQFdk^7e" x="-2937" y="-1287">
          <mutation name="setUhr">
            <arg name="clock"></arg>
          </mutation>
          <value name="ARG0">
            <block type="get_value" id="Rmv(=Tg+:6/}8B(?~nI#">
              <field name="ATTR">val</field>
              <field name="OID">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
            </block>
          </value>
          <next>
            <block type="on_ext" id="X}o|@dWx#6!BiHho8e)o">
              <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="dXPC7;GFYg(#~T78}@mB">
                  <field name="oid">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="schedule_clear" id="nt-N]NBg?,fY%.)hYJ4D">
                  <field name="NAME">clock</field>
                  <next>
                    <block type="procedures_callnoreturn" id="yvhs4uL6uUxnW!c$UF/{">
                      <mutation name="setUhr">
                        <arg name="clock"></arg>
                      </mutation>
                      <value name="ARG0">
                        <block type="on_source" id="SfI,}teG@`dg#_g%Zp#:">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </next>
        </block>
        <block type="procedures_defnoreturn" id="fK5kmsd)LwZ7|P2xa^9U" x="-2937" y="-1037">
          <mutation>
            <arg name="clock" varid=",vrSKF,`8zjR8|?q=ypv"></arg>
          </mutation>
          <field name="NAME">setUhr</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="variables_set" id="aOx5`vU/=f;#)rmrW[|7">
              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
              <value name="VALUE">
                <block type="time_calculation" id="z|fju~f8!/H*jUdb=P@O">
                  <field name="OPERATION">-</field>
                  <field name="UNIT">min</field>
                  <value name="DATE_TIME">
                    <shadow type="time_get" id="Iw8E5Q%[d9Ru3tLb$w$w">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                      <field name="OPTION">object</field>
                    </shadow>
                    <block type="lists_split" id="XnqDHu5JM{#WIs8~S,M-">
                      <mutation mode="SPLIT"></mutation>
                      <field name="MODE">SPLIT</field>
                      <value name="INPUT">
                        <block type="variables_get" id="4`T;i0Hg@f?=Gq^,J6.~">
                          <field name="VAR" id=",vrSKF,`8zjR8|?q=ypv">clock</field>
                        </block>
                      </value>
                      <value name="DELIM">
                        <shadow type="text" id="]v!xP8l3r?{D;(m_QyNL">
                          <field name="TEXT">:</field>
                        </shadow>
                      </value>
                    </block>
                  </value>
                  <value name="VALUE">
                    <shadow type="math_number" id="ZKVA~fs3mR8IPdRXKAIP">
                      <field name="NUM">5</field>
                    </shadow>
                  </value>
                </block>
              </value>
              <next>
                <block type="schedule_create" id="6x%+6G+PaD[w*{FuFm=K">
                  <field name="NAME">schedule1</field>
                  <value name="SCHEDULE">
                    <shadow type="field_cron" id="m4F75|F$}NA}2;e/avWa">
                      <field name="CRON">* * * * *</field>
                    </shadow>
                    <block type="cron_builder" id="q6(U2T{7uu}mYF)9QMKr">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                      <field name="LINE">FALSE</field>
                      <field name="WITH_SECONDS">FALSE</field>
                      <value name="DOW">
                        <shadow type="text" id=")8oVcqHY5re?jv#0QsO8">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="MONTHS">
                        <shadow type="text" id="GfQ!DoE|TZTliq*)8,@j">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="DAYS">
                        <shadow type="text" id="S6hVuxIjcYJMlS^~:zE5">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="HOURS">
                        <shadow type="text" id="NP{*G*@dWEP9M9mNlZFF">
                          <field name="TEXT">*</field>
                        </shadow>
                        <block type="lists_getIndex" id="-0gZ}|H=8/}~St}d%rl;">
                          <mutation statement="false" at="true"></mutation>
                          <field name="MODE">GET</field>
                          <field name="WHERE">FROM_START</field>
                          <value name="VALUE">
                            <block type="variables_get" id="8U#M]$`MHq(~A]~(v{2R">
                              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                            </block>
                          </value>
                          <value name="AT">
                            <block type="math_number" id=")zFTxG~Gpp`eZw8r2,8w">
                              <field name="NUM">1</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="MINUTES">
                        <shadow type="text" id="I(LCmtz/NJ%:Tvp,*;JL">
                          <field name="TEXT">*</field>
                        </shadow>
                        <block type="lists_getIndex" id="0([.HRKLsVPA.X:jwVI@">
                          <mutation statement="false" at="true"></mutation>
                          <field name="MODE">GET</field>
                          <field name="WHERE">FROM_START</field>
                          <value name="VALUE">
                            <block type="variables_get" id="8#E0pY-UET(BcZH]~qB:">
                              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                            </block>
                          </value>
                          <value name="AT">
                            <block type="math_number" id=";UF-jK:^cV#hui?GDL/V">
                              <field name="NUM">2</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="STATEMENT">
                    <block type="procedures_callnoreturn" id="/6qq{?/)+*vm:UnA$x,0">
                      <mutation name="Pumpe"></mutation>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="procedures_defnoreturn" id="jE$gVVpa7!Xtx{X@H^Fd" x="-2162" y="-937">
          <field name="NAME">Pumpe</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="variables_set" id="9kptcK|P^2:}bKZXyZ8f">
              <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
              <value name="VALUE">
                <block type="convert_tonumber" id="Tj/%:}sl8v})GfkG,zO:">
                  <value name="VALUE">
                    <block type="get_value" id=".,XzJi)h(f$9$~(`H$I!">
                      <field name="ATTR">val</field>
                      <field name="OID">0_userdata.0.Futterautomatik.Futter_Pumpen_Pause</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="control" id="%}iPzHc5tUi.(P1_MvRo">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">sonoff.0.Aqua_Control.POWER8</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="SM.e~4#O=p?c/SXA|JX%">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id="y_Y]xT#qZqZCX#n?iIsk">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="Od}|Jw/NX=B9~P;c8:5b">
                          <field name="TEXT">Pumpe wurde ausgeschaltet</field>
                        </shadow>
                      </value>
                      <next>
                        <block type="comment" id="KV;?nPX*TAluqR-qF9f+">
                          <field name="COMMENT">Pumpen Intervall</field>
                          <next>
                            <block type="math_change" id="!*zN$DgW0K=76_[.1*]X">
                              <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                              <value name="DELTA">
                                <shadow type="math_number" id="e_D7=bSd65:`]Q{qWSZD">
                                  <field name="NUM">-1</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="timeouts_settimeout" id="4LCzvgm.VajEnFPBRu$n">
                                  <field name="NAME">intervall</field>
                                  <field name="DELAY">15</field>
                                  <field name="UNIT">min</field>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id="=/[;A-M~WF?KXEx~W0z?">
                                      <value name="IF0">
                                        <block type="logic_compare" id=";qY,PC)CB~{1#4iVHaj,">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="variables_get" id="2k;4KgTu$A3wF)@V`ulP">
                                              <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="?bnhw6qVm`$}~NCKlw2P">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_clearinterval" id=";dz/hf`o4]4(2pDSH)I3">
                                          <field name="NAME"></field>
                                          <next>
                                            <block type="control" id="SeaFI}%xNdyzRbLV,6HN">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">sonoff.0.Aqua_Control.POWER5</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="1_[)-;0}n;LMH}tCmhi:">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      
      paul53P Offline
      paul53P Offline
      paul53
      schrieb am zuletzt editiert von paul53
      #4

      @aphofis sagte: ob die Steuerung so korekt ist

      So funktioniert es nicht. "Futter Pumpen Pause" enthält die Minuten der Pause?
      Versuche es mal so:

      Blockly_temp.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="-rJfc0$)%|5~2[%Tv0x]">clock</variable>
          <variable id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</variable>
          <variable id="u)9}*R19v/Qs3Rt)$4,W">Dauer</variable>
          <variable type="cron" id="schedule1">schedule1</variable>
          <variable type="interval" id="Intervall">Intervall</variable>
        </variables>
        <block type="procedures_callnoreturn" id="3a)9A+{U=BTerQFdk^7e" x="-2937" y="-1287">
          <mutation name="setUhr">
            <arg name="clock"></arg>
          </mutation>
          <value name="ARG0">
            <block type="get_value" id="Rmv(=Tg+:6/}8B(?~nI#">
              <field name="ATTR">val</field>
              <field name="OID">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
            </block>
          </value>
          <next>
            <block type="on_ext" id="X}o|@dWx#6!BiHho8e)o">
              <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="dXPC7;GFYg(#~T78}@mB">
                  <field name="oid">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="schedule_clear" id="nt-N]NBg?,fY%.)hYJ4D">
                  <field name="NAME">schedule1</field>
                  <next>
                    <block type="procedures_callnoreturn" id="yvhs4uL6uUxnW!c$UF/{">
                      <mutation name="setUhr">
                        <arg name="clock"></arg>
                      </mutation>
                      <value name="ARG0">
                        <block type="on_source" id="SfI,}teG@`dg#_g%Zp#:">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </next>
        </block>
        <block type="procedures_defnoreturn" id="fK5kmsd)LwZ7|P2xa^9U" x="-2937" y="-1037">
          <mutation>
            <arg name="clock" varid="-rJfc0$)%|5~2[%Tv0x]"></arg>
          </mutation>
          <field name="NAME">setUhr</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="variables_set" id="aOx5`vU/=f;#)rmrW[|7">
              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
              <value name="VALUE">
                <block type="time_calculation" id="z|fju~f8!/H*jUdb=P@O">
                  <field name="OPERATION">-</field>
                  <field name="UNIT">min</field>
                  <value name="DATE_TIME">
                    <shadow type="time_get" id="Iw8E5Q%[d9Ru3tLb$w$w">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                      <field name="OPTION">object</field>
                    </shadow>
                    <block type="convert_from_date" id="D@Luc}]DE^0K5x%TjDGx">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                      <field name="OPTION">object</field>
                      <value name="VALUE">
                        <block type="variables_get" id="MW;d_-~On=rg3DwueID^">
                          <field name="VAR" id="-rJfc0$)%|5~2[%Tv0x]">clock</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="VALUE">
                    <shadow type="math_number" id="ZKVA~fs3mR8IPdRXKAIP">
                      <field name="NUM">5</field>
                    </shadow>
                  </value>
                </block>
              </value>
              <next>
                <block type="schedule_create" id="6x%+6G+PaD[w*{FuFm=K">
                  <field name="NAME">schedule1</field>
                  <value name="SCHEDULE">
                    <shadow type="field_cron" id="m4F75|F$}NA}2;e/avWa">
                      <field name="CRON">* * * * *</field>
                    </shadow>
                    <block type="cron_builder" id="q6(U2T{7uu}mYF)9QMKr">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                      <field name="LINE">FALSE</field>
                      <field name="WITH_SECONDS">FALSE</field>
                      <value name="DOW">
                        <shadow type="text" id=")8oVcqHY5re?jv#0QsO8">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="MONTHS">
                        <shadow type="text" id="GfQ!DoE|TZTliq*)8,@j">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="DAYS">
                        <shadow type="text" id="S6hVuxIjcYJMlS^~:zE5">
                          <field name="TEXT">*</field>
                        </shadow>
                      </value>
                      <value name="HOURS">
                        <shadow type="text" id="NP{*G*@dWEP9M9mNlZFF">
                          <field name="TEXT">*</field>
                        </shadow>
                        <block type="convert_from_date" id="@,PtojVn?d$syb`uI9ij">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                          <field name="OPTION">h</field>
                          <value name="VALUE">
                            <block type="variables_get" id="DjFQr]GZNcpA[xAQ86vh">
                              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="MINUTES">
                        <shadow type="text" id="I(LCmtz/NJ%:Tvp,*;JL">
                          <field name="TEXT">*</field>
                        </shadow>
                        <block type="convert_from_date" id="_Y,`7y,{trk`G]:S42jP">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                          <field name="OPTION">m</field>
                          <value name="VALUE">
                            <block type="variables_get" id="u,bL$P^w2.fKVy`D-k9R">
                              <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="STATEMENT">
                    <block type="procedures_callnoreturn" id="/6qq{?/)+*vm:UnA$x,0">
                      <mutation name="Pumpe"></mutation>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="procedures_defnoreturn" id="jE$gVVpa7!Xtx{X@H^Fd" x="-2262" y="-938">
          <field name="NAME">Pumpe</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="variables_set" id="9kptcK|P^2:}bKZXyZ8f">
              <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
              <value name="VALUE">
                <block type="convert_tonumber" id="Tj/%:}sl8v})GfkG,zO:">
                  <value name="VALUE">
                    <block type="get_value" id=".,XzJi)h(f$9$~(`H$I!">
                      <field name="ATTR">val</field>
                      <field name="OID">0_userdata.0.Futterautomatik.Futter_Pumpen_Pause</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="control" id="%}iPzHc5tUi.(P1_MvRo">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">sonoff.0.Aqua_Control.POWER8</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="SM.e~4#O=p?c/SXA|JX%">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id="y_Y]xT#qZqZCX#n?iIsk">
                      <field name="Severity">info</field>
                      <value name="TEXT">
                        <shadow type="text" id="Od}|Jw/NX=B9~P;c8:5b">
                          <field name="TEXT">Pumpe wurde ausgeschaltet</field>
                        </shadow>
                      </value>
                      <next>
                        <block type="comment" id="KV;?nPX*TAluqR-qF9f+">
                          <field name="COMMENT">Minuten Intervall</field>
                          <next>
                            <block type="timeouts_setinterval" id=".SB*4vi`az$^Xh}aD$XD">
                              <field name="NAME">Intervall</field>
                              <field name="INTERVAL">1</field>
                              <field name="UNIT">min</field>
                              <statement name="STATEMENT">
                                <block type="math_change" id="!*zN$DgW0K=76_[.1*]X">
                                  <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                  <value name="DELTA">
                                    <shadow type="math_number" id="e_D7=bSd65:`]Q{qWSZD">
                                      <field name="NUM">-1</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="controls_if" id="=/[;A-M~WF?KXEx~W0z?">
                                      <value name="IF0">
                                        <block type="logic_compare" id=";qY,PC)CB~{1#4iVHaj,">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="variables_get" id="2k;4KgTu$A3wF)@V`ulP">
                                              <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="?bnhw6qVm`$}~NCKlw2P">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_clearinterval" id="{9.vJ@]#bASx1v{CUm7E">
                                          <field name="NAME">Intervall</field>
                                          <next>
                                            <block type="control" id="OB1{)Gdz{TTQkN{C.j{S">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">sonoff.0.Aqua_Control.POWER8</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="?gR?u,JI@th[n?@_q!=i">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      

      Anmerkung: "POWER5" ist sicherlich falsch?

      Blockly_temp.JPG

      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
      0
      • AphofisA Aphofis

        Ist es möglich, meine bestehenden Futterautomatik Steuerungen so zu erweitern,
        das eine Filterpumpe 5 min. vor jeder dosierung abgeschaltet wird per Datenpunkt und dann nach einer eingestellten zeit z.B. 10 min. aus einem Datenpunkt wird dann die Filterpumpe wieder eingeschaltet !? @paul53
        Screenshot 2024-05-19 221512.png

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id=".S1.A,IoO_~]*nXiz`S*">clock</variable>
            <variable id="u)9}*R19v/Qs3Rt)$4,W">Dauer</variable>
            <variable id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</variable>
            <variable type="cron" id="schedule1">schedule1</variable>
            <variable type="interval" id="Intervall">Intervall</variable>
          </variables>
          <block type="procedures_defnoreturn" id="jE$gVVpa7!Xtx{X@H^Fd" x="-2212" y="-1362">
            <field name="NAME">Futter</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="variables_set" id="9kptcK|P^2:}bKZXyZ8f">
                <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                <value name="VALUE">
                  <block type="convert_tonumber" id="Tj/%:}sl8v})GfkG,zO:">
                    <value name="VALUE">
                      <block type="get_value" id=".,XzJi)h(f$9$~(`H$I!">
                        <field name="ATTR">val</field>
                        <field name="OID">0_userdata.0.Futterautomatik.Futterautomatik_Faktor_1</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="control" id="%}iPzHc5tUi.(P1_MvRo">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">sonoff.0.Aqua_Control.POWER5</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="SM.e~4#O=p?c/SXA|JX%">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="debug" id="y_Y]xT#qZqZCX#n?iIsk">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="Od}|Jw/NX=B9~P;c8:5b">
                            <field name="TEXT">Futter wurde dosiert</field>
                          </shadow>
                        </value>
                        <next>
                          <block type="comment" id="KV;?nPX*TAluqR-qF9f+">
                            <field name="COMMENT">Intervalldauer = Faktor</field>
                            <next>
                              <block type="timeouts_setinterval" id="1+dIQ5^rJM?nkaI[6WN}">
                                <field name="NAME">Intervall</field>
                                <field name="INTERVAL">500</field>
                                <field name="UNIT">ms</field>
                                <statement name="STATEMENT">
                                  <block type="math_change" id="!*zN$DgW0K=76_[.1*]X">
                                    <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                    <value name="DELTA">
                                      <shadow type="math_number" id="e_D7=bSd65:`]Q{qWSZD">
                                        <field name="NUM">-1</field>
                                      </shadow>
                                    </value>
                                    <next>
                                      <block type="controls_if" id="=/[;A-M~WF?KXEx~W0z?">
                                        <value name="IF0">
                                          <block type="logic_compare" id=";qY,PC)CB~{1#4iVHaj,">
                                            <field name="OP">LTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="2k;4KgTu$A3wF)@V`ulP">
                                                <field name="VAR" id="u)9}*R19v/Qs3Rt)$4,W">Dauer</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="math_number" id="?bnhw6qVm`$}~NCKlw2P">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="timeouts_clearinterval" id=";dz/hf`o4]4(2pDSH)I3">
                                            <field name="NAME">Intervall</field>
                                            <next>
                                              <block type="control" id="SeaFI}%xNdyzRbLV,6HN">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">sonoff.0.Aqua_Control.POWER5</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="1_[)-;0}n;LMH}tCmhi:">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
          <block type="procedures_callnoreturn" id="3a)9A+{U=BTerQFdk^7e" x="-2937" y="-1287">
            <mutation name="setUhr">
              <arg name="clock"></arg>
            </mutation>
            <value name="ARG0">
              <block type="get_value" id="Rmv(=Tg+:6/}8B(?~nI#">
                <field name="ATTR">val</field>
                <field name="OID">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
              </block>
            </value>
            <next>
              <block type="on_ext" id="X}o|@dWx#6!BiHho8e)o">
                <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="dXPC7;GFYg(#~T78}@mB">
                    <field name="oid">0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="schedule_clear" id="nt-N]NBg?,fY%.)hYJ4D">
                    <field name="NAME">clock</field>
                    <next>
                      <block type="procedures_callnoreturn" id="yvhs4uL6uUxnW!c$UF/{">
                        <mutation name="setUhr">
                          <arg name="clock"></arg>
                        </mutation>
                        <value name="ARG0">
                          <block type="on_source" id="SfI,}teG@`dg#_g%Zp#:">
                            <field name="ATTR">state.val</field>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
          <block type="procedures_defnoreturn" id="fK5kmsd)LwZ7|P2xa^9U" x="-2937" y="-1037">
            <mutation>
              <arg name="clock" varid=".S1.A,IoO_~]*nXiz`S*"></arg>
            </mutation>
            <field name="NAME">setUhr</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="variables_set" id="aOx5`vU/=f;#)rmrW[|7">
                <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                <value name="VALUE">
                  <block type="lists_split" id="XnqDHu5JM{#WIs8~S,M-">
                    <mutation mode="SPLIT"></mutation>
                    <field name="MODE">SPLIT</field>
                    <value name="INPUT">
                      <block type="variables_get" id="4`T;i0Hg@f?=Gq^,J6.~">
                        <field name="VAR" id=".S1.A,IoO_~]*nXiz`S*">clock</field>
                      </block>
                    </value>
                    <value name="DELIM">
                      <shadow type="text" id="]v!xP8l3r?{D;(m_QyNL">
                        <field name="TEXT">:</field>
                      </shadow>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="schedule_create" id="6x%+6G+PaD[w*{FuFm=K">
                    <field name="NAME">schedule1</field>
                    <value name="SCHEDULE">
                      <shadow type="field_cron" id="m4F75|F$}NA}2;e/avWa">
                        <field name="CRON">* * * * *</field>
                      </shadow>
                      <block type="cron_builder" id="q6(U2T{7uu}mYF)9QMKr">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                        <field name="LINE">FALSE</field>
                        <field name="WITH_SECONDS">FALSE</field>
                        <value name="DOW">
                          <shadow type="text" id=")8oVcqHY5re?jv#0QsO8">
                            <field name="TEXT">*</field>
                          </shadow>
                        </value>
                        <value name="MONTHS">
                          <shadow type="text" id="GfQ!DoE|TZTliq*)8,@j">
                            <field name="TEXT">*</field>
                          </shadow>
                        </value>
                        <value name="DAYS">
                          <shadow type="text" id="S6hVuxIjcYJMlS^~:zE5">
                            <field name="TEXT">*</field>
                          </shadow>
                        </value>
                        <value name="HOURS">
                          <shadow type="text" id="NP{*G*@dWEP9M9mNlZFF">
                            <field name="TEXT">*</field>
                          </shadow>
                          <block type="lists_getIndex" id="-0gZ}|H=8/}~St}d%rl;">
                            <mutation statement="false" at="true"></mutation>
                            <field name="MODE">GET</field>
                            <field name="WHERE">FROM_START</field>
                            <value name="VALUE">
                              <block type="variables_get" id="8U#M]$`MHq(~A]~(v{2R">
                                <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                              </block>
                            </value>
                            <value name="AT">
                              <block type="math_number" id=")zFTxG~Gpp`eZw8r2,8w">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="MINUTES">
                          <shadow type="text" id="I(LCmtz/NJ%:Tvp,*;JL">
                            <field name="TEXT">*</field>
                          </shadow>
                          <block type="lists_getIndex" id="0([.HRKLsVPA.X:jwVI@">
                            <mutation statement="false" at="true"></mutation>
                            <field name="MODE">GET</field>
                            <field name="WHERE">FROM_START</field>
                            <value name="VALUE">
                              <block type="variables_get" id="8#E0pY-UET(BcZH]~qB:">
                                <field name="VAR" id="Q7*Gw)fesXb}OUBj1{`;">Uhrzeit</field>
                              </block>
                            </value>
                            <value name="AT">
                              <block type="math_number" id=";UF-jK:^cV#hui?GDL/V">
                                <field name="NUM">2</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="STATEMENT">
                      <block type="procedures_callnoreturn" id="/6qq{?/)+*vm:UnA$x,0">
                        <mutation name="Futter"></mutation>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </xml>
        
        var clock, Dauer, Uhrzeit, schedule1, Intervall;
        
        // Beschreibe diese Funktion …
        async function Futter() {
          Dauer = parseFloat(getState('0_userdata.0.Futterautomatik.Futterautomatik_Faktor_1').val);
          setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, true);
          console.log('Futter wurde dosiert');
          // Intervalldauer = Faktor
          Intervall = setInterval(async () => {
            Dauer = (typeof Dauer === 'number' ? Dauer : 0) + -1;
            if (Dauer <= 0) {
              (() => { if (Intervall) { clearInterval(Intervall); Intervall = null; }})();
              setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, false);
            }
          }, 500);
        }
        
        // Beschreibe diese Funktion …
        async function setUhr(clock) {
          Uhrzeit = clock.split(':');
          schedule1 = schedule((Uhrzeit[1]).toString().trim() + ' ' + (Uhrzeit[0]).toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim(), async () => {
            await Futter();
          });
        }
        
        
        await setUhr(getState('0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1').val);
        on({ id: [].concat(['0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1']), change: 'ne' }, async (obj) => {
          let value = obj.state.val;
          let oldValue = obj.oldState.val;
          (() => { if (clock) { clearSchedule(clock); clock = null; }})();
          await setUhr((obj.state ? obj.state.val : ''));
        });
        
        paul53P Offline
        paul53P Offline
        paul53
        schrieb am zuletzt editiert von
        #5

        @aphofis
        Im ersten Post ist ein Fehler: Es muss schedule1 gestoppt werden.

        Blockly_temp.JPG

        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
        0
        • AphofisA Offline
          AphofisA Offline
          Aphofis
          schrieb am zuletzt editiert von Aphofis
          #6

          @paul53
          Ja hab ich probiert und Ja Power5 war falsch
          hab alles mal im minuten bereich getestet. es läuft.
          Hab es aber etwas anders aufgebaut.
          Also hatte die Vorlage deiner Steuerung genommen und den Faktor raus genommen für die pumpen steuerung
          dann halt Pumpe zur uhrzeit gestoppt und die Steuerung auch von dir für die Fütterung einfach den timeout auf dann 5 min gestellt und pumpe auf 20 min timeout.
          Die pumpe wird dann zB. 9:00 Uhr ausgeschaltet und nach Datenpunkt wird dann 5 min später Futter nach Faktor zu 500ms dosiert. die Pumpe springt dann 20 min nach 9 wieder an und hatte somit eine Pause von 15 min. also perfekt.
          Ob es so einwandfrei ist, weiss ich nicht zumindest gibt niemand einen Fehler aus und die Steuerung macht was sie soll.

          Pumpen Steuerung 1

          var clock, Uhrzeit, schedule1, timeout;
          
          // Beschreibe diese Funktion …
          async function Pumpe() {
            setState('sonoff.0.Aqua_Control.POWER8' /* Aqua_Control POWER8 */, false);
            console.log('Pumpe wurde ausgeschaltet');
            sendTo("telegram.0", "send", {
                text: 'Pumpe wurde ausgeschaltet'
            });
            (() => { if (timeout) { clearTimeout(timeout); timeout = null; }})();
            timeout = setTimeout(async () => {
              timeout = null;
              setState('sonoff.0.Aqua_Control.POWER8' /* Aqua_Control POWER8 */, true);
              console.log('Pumpe wurde eingeschaltet');
              sendTo("telegram.0", "send", {
                  text: 'Pumpe wurde eingeschaltet'
              });
            }, 1200000);
          }
          
          // Beschreibe diese Funktion …
          async function setUhr(clock) {
            Uhrzeit = clock.split(':');
            schedule1 = schedule((Uhrzeit[1]).toString().trim() + ' ' + (Uhrzeit[0]).toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim(), async () => {
              await Pumpe();
            });
          }
          
          
          await setUhr(getState('0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1').val);
          on({ id: [].concat(['0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            (() => { if (clock) { clearSchedule(clock); clock = null; }})();
            await setUhr((obj.state ? obj.state.val : ''));
          });
          

          Futter Steuerung 1

          var clock, timeout, Uhrzeit, Dauer, schedule1, Intervall;
          
          // Beschreibe diese Funktion …
          async function Futter() {
            timeout = setTimeout(async () => {
              timeout = null;
              Dauer = parseFloat(getState('0_userdata.0.Futterautomatik.Futterautomatik_Faktor_1').val);
              setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, true);
              console.log('Futter wurde dosiert');
              sendTo("telegram.0", "send", {
                  text: (['Futter wurde dosiert','Futterautomat ist ',getState('sonoff.0.Aqua_Control.POWER5').val].join(''))
              });
              // Intervalldauer = Faktor
              Intervall = setInterval(async () => {
                Dauer = (typeof Dauer === 'number' ? Dauer : 0) + -1;
                if (Dauer <= 0) {
                  (() => { if (Intervall) { clearInterval(Intervall); Intervall = null; }})();
                  setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, false);
                }
                (() => { if (timeout) { clearTimeout(timeout); timeout = null; }})();
              }, 500);
            }, 300000);
          }
          
          // Beschreibe diese Funktion …
          async function setUhr(clock) {
            Uhrzeit = clock.split(':');
            schedule1 = schedule((Uhrzeit[1]).toString().trim() + ' ' + (Uhrzeit[0]).toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim(), async () => {
              await Futter();
            });
          }
          
          
          await setUhr(getState('0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1').val);
          on({ id: [].concat(['0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            (() => { if (clock) { clearSchedule(clock); clock = null; }})();
            await setUhr((obj.state ? obj.state.val : ''));
          });
          
          paul53P 1 Antwort Letzte Antwort
          0
          • AphofisA Aphofis

            @paul53
            Ja hab ich probiert und Ja Power5 war falsch
            hab alles mal im minuten bereich getestet. es läuft.
            Hab es aber etwas anders aufgebaut.
            Also hatte die Vorlage deiner Steuerung genommen und den Faktor raus genommen für die pumpen steuerung
            dann halt Pumpe zur uhrzeit gestoppt und die Steuerung auch von dir für die Fütterung einfach den timeout auf dann 5 min gestellt und pumpe auf 20 min timeout.
            Die pumpe wird dann zB. 9:00 Uhr ausgeschaltet und nach Datenpunkt wird dann 5 min später Futter nach Faktor zu 500ms dosiert. die Pumpe springt dann 20 min nach 9 wieder an und hatte somit eine Pause von 15 min. also perfekt.
            Ob es so einwandfrei ist, weiss ich nicht zumindest gibt niemand einen Fehler aus und die Steuerung macht was sie soll.

            Pumpen Steuerung 1

            var clock, Uhrzeit, schedule1, timeout;
            
            // Beschreibe diese Funktion …
            async function Pumpe() {
              setState('sonoff.0.Aqua_Control.POWER8' /* Aqua_Control POWER8 */, false);
              console.log('Pumpe wurde ausgeschaltet');
              sendTo("telegram.0", "send", {
                  text: 'Pumpe wurde ausgeschaltet'
              });
              (() => { if (timeout) { clearTimeout(timeout); timeout = null; }})();
              timeout = setTimeout(async () => {
                timeout = null;
                setState('sonoff.0.Aqua_Control.POWER8' /* Aqua_Control POWER8 */, true);
                console.log('Pumpe wurde eingeschaltet');
                sendTo("telegram.0", "send", {
                    text: 'Pumpe wurde eingeschaltet'
                });
              }, 1200000);
            }
            
            // Beschreibe diese Funktion …
            async function setUhr(clock) {
              Uhrzeit = clock.split(':');
              schedule1 = schedule((Uhrzeit[1]).toString().trim() + ' ' + (Uhrzeit[0]).toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim(), async () => {
                await Pumpe();
              });
            }
            
            
            await setUhr(getState('0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1').val);
            on({ id: [].concat(['0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1']), change: 'ne' }, async (obj) => {
              let value = obj.state.val;
              let oldValue = obj.oldState.val;
              (() => { if (clock) { clearSchedule(clock); clock = null; }})();
              await setUhr((obj.state ? obj.state.val : ''));
            });
            

            Futter Steuerung 1

            var clock, timeout, Uhrzeit, Dauer, schedule1, Intervall;
            
            // Beschreibe diese Funktion …
            async function Futter() {
              timeout = setTimeout(async () => {
                timeout = null;
                Dauer = parseFloat(getState('0_userdata.0.Futterautomatik.Futterautomatik_Faktor_1').val);
                setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, true);
                console.log('Futter wurde dosiert');
                sendTo("telegram.0", "send", {
                    text: (['Futter wurde dosiert','Futterautomat ist ',getState('sonoff.0.Aqua_Control.POWER5').val].join(''))
                });
                // Intervalldauer = Faktor
                Intervall = setInterval(async () => {
                  Dauer = (typeof Dauer === 'number' ? Dauer : 0) + -1;
                  if (Dauer <= 0) {
                    (() => { if (Intervall) { clearInterval(Intervall); Intervall = null; }})();
                    setState('sonoff.0.Aqua_Control.POWER5' /* Aqua_Control POWER5 */, false);
                  }
                  (() => { if (timeout) { clearTimeout(timeout); timeout = null; }})();
                }, 500);
              }, 300000);
            }
            
            // Beschreibe diese Funktion …
            async function setUhr(clock) {
              Uhrzeit = clock.split(':');
              schedule1 = schedule((Uhrzeit[1]).toString().trim() + ' ' + (Uhrzeit[0]).toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim() + ' ' + '*'.toString().trim(), async () => {
                await Futter();
              });
            }
            
            
            await setUhr(getState('0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1').val);
            on({ id: [].concat(['0_userdata.0.Futterautomatik.Futterautomatik_Uhrzeit_1']), change: 'ne' }, async (obj) => {
              let value = obj.state.val;
              let oldValue = obj.oldState.val;
              (() => { if (clock) { clearSchedule(clock); clock = null; }})();
              await setUhr((obj.state ? obj.state.val : ''));
            });
            
            paul53P Offline
            paul53P Offline
            paul53
            schrieb am zuletzt editiert von
            #7

            @aphofis sagte:

              (() => { if (clock) { clearSchedule(clock); clock = null; }})();
            

            In beiden Steuerungen wird die falsche Variable gestoppt! Nicht clock, sondern schedule1 muss gestoppt werden.

            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

            AphofisA 1 Antwort Letzte Antwort
            1
            • paul53P paul53

              @aphofis sagte:

                (() => { if (clock) { clearSchedule(clock); clock = null; }})();
              

              In beiden Steuerungen wird die falsche Variable gestoppt! Nicht clock, sondern schedule1 muss gestoppt werden.

              AphofisA Offline
              AphofisA Offline
              Aphofis
              schrieb am zuletzt editiert von
              #8

              @paul53 sagte in Futterautomatik:

              @aphofis sagte:

                (() => { if (clock) { clearSchedule(clock); clock = null; }})();
              

              In beiden Steuerungen wird die falsche Variable gestoppt! Nicht clock, sondern schedule1 muss gestoppt werden.

              also so !?

               (() => { if (schedule1) { clearSchedule(schedule1); schedule1 = null; }})();
              
              paul53P 1 Antwort Letzte Antwort
              0
              • AphofisA Aphofis

                @paul53 sagte in Futterautomatik:

                @aphofis sagte:

                  (() => { if (clock) { clearSchedule(clock); clock = null; }})();
                

                In beiden Steuerungen wird die falsche Variable gestoppt! Nicht clock, sondern schedule1 muss gestoppt werden.

                also so !?

                 (() => { if (schedule1) { clearSchedule(schedule1); schedule1 = null; }})();
                
                paul53P Offline
                paul53P Offline
                paul53
                schrieb am zuletzt editiert von
                #9

                @aphofis sagte: also so !?

                Ja.

                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

                AphofisA 1 Antwort Letzte Antwort
                1
                • paul53P paul53

                  @aphofis sagte: also so !?

                  Ja.

                  AphofisA Offline
                  AphofisA Offline
                  Aphofis
                  schrieb am zuletzt editiert von
                  #10

                  @paul53 sagte in Futterautomatik:

                  @aphofis sagte: also so !?

                  Ja.

                  Prima besten Dank !!!

                  AphofisA 1 Antwort Letzte Antwort
                  0
                  • AphofisA Aphofis

                    @paul53 sagte in Futterautomatik:

                    @aphofis sagte: also so !?

                    Ja.

                    Prima besten Dank !!!

                    AphofisA Offline
                    AphofisA Offline
                    Aphofis
                    schrieb am zuletzt editiert von Aphofis
                    #11

                    Leider gab es ein weiteres Problem.
                    Der ESP8266 ist beim dosieren Offline gegangen und der Futterautomat stand auf true
                    bis das Futter fröhlich dosiert wurde. Hatte zum Glück zum testen nur eine geringe Menge in den Automaten gepackt.
                    kann man das irgendwie begrenzen, das maximal pro vorgang wirklich nur zB 300 ms der Futterautomat auf true steht oder gibt es vielleicht eine andere Idee °!°
                    alive auf false bringt ja nichts. Aber vielleicht kann man das begrenzen.

                    paul53P 1 Antwort Letzte Antwort
                    0
                    • AphofisA Aphofis

                      Leider gab es ein weiteres Problem.
                      Der ESP8266 ist beim dosieren Offline gegangen und der Futterautomat stand auf true
                      bis das Futter fröhlich dosiert wurde. Hatte zum Glück zum testen nur eine geringe Menge in den Automaten gepackt.
                      kann man das irgendwie begrenzen, das maximal pro vorgang wirklich nur zB 300 ms der Futterautomat auf true steht oder gibt es vielleicht eine andere Idee °!°
                      alive auf false bringt ja nichts. Aber vielleicht kann man das begrenzen.

                      paul53P Offline
                      paul53P Offline
                      paul53
                      schrieb am zuletzt editiert von
                      #12

                      @aphofis sagte: Der ESP8266 ist beim dosieren Offline gegangen

                      Dann kann man mit ioBroker nicht mehr eingreifen. Schutzfunktionen müssten also direkt auf dem ESP implementiert werden. Davon habe ich aber keine Ahnung.

                      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

                      AphofisA 2 Antworten Letzte Antwort
                      0
                      • paul53P paul53

                        @aphofis sagte: Der ESP8266 ist beim dosieren Offline gegangen

                        Dann kann man mit ioBroker nicht mehr eingreifen. Schutzfunktionen müssten also direkt auf dem ESP implementiert werden. Davon habe ich aber keine Ahnung.

                        AphofisA Offline
                        AphofisA Offline
                        Aphofis
                        schrieb am zuletzt editiert von
                        #13

                        @paul53
                        OK!
                        Ich habe Tasmota drauf. ich gucke mal ob es Konsolen befehle gibt um zB das Relais dauerhaft auf max true xxx ms setzen kann. wenn der ESP wieder online geht kann man aber das doch prüfen mit Blockly wenn das Gerät bei start also wenn eine IP ausgegeben wird dann MUSS das Relais auf false gesetzt werden außer es ist dosier Zeit.

                        AphofisA 1 Antwort Letzte Antwort
                        0
                        • AphofisA Aphofis

                          @paul53
                          OK!
                          Ich habe Tasmota drauf. ich gucke mal ob es Konsolen befehle gibt um zB das Relais dauerhaft auf max true xxx ms setzen kann. wenn der ESP wieder online geht kann man aber das doch prüfen mit Blockly wenn das Gerät bei start also wenn eine IP ausgegeben wird dann MUSS das Relais auf false gesetzt werden außer es ist dosier Zeit.

                          AphofisA Offline
                          AphofisA Offline
                          Aphofis
                          schrieb am zuletzt editiert von Aphofis
                          #14

                          @paul53
                          jetzt sind die Geräte wieder Online nur die ip adressen werden nicht mehr angezeigt
                          es bleibt bei 0.0.0.0
                          also läuft doch nicht ganz.

                          1 Antwort Letzte Antwort
                          0
                          • paul53P paul53

                            @aphofis sagte: Der ESP8266 ist beim dosieren Offline gegangen

                            Dann kann man mit ioBroker nicht mehr eingreifen. Schutzfunktionen müssten also direkt auf dem ESP implementiert werden. Davon habe ich aber keine Ahnung.

                            AphofisA Offline
                            AphofisA Offline
                            Aphofis
                            schrieb am zuletzt editiert von
                            #15

                            @paul53 sagte in Futterautomatik:

                            @aphofis sagte: Der ESP8266 ist beim dosieren Offline gegangen

                            Dann kann man mit ioBroker nicht mehr eingreifen. Schutzfunktionen müssten also direkt auf dem ESP implementiert werden. Davon habe ich aber keine Ahnung.

                            Habe es jetzt mit einem Befehl geschafft. Direkt im Tasmota kann man so zu sagen eine Max ein Zeit einstellen diese habe ich jetzt für das Relais 5 auf 300 ms gesetzt. Damit pro true schaltung nicht mehr als 300ms dosiert wird. PulseTime5 3 ist alles und das funktioniert auch nach mehreren Neustarts des ESP8266

                            1 Antwort Letzte Antwort
                            0
                            Antworten
                            • In einem neuen Thema antworten
                            Anmelden zum Antworten
                            • Älteste zuerst
                            • Neuste zuerst
                            • Meiste Stimmen


                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            496

                            Online

                            32.7k

                            Benutzer

                            82.4k

                            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