Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Aquarium Wasserstand (Wasser Niveau Regulierung)

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Aquarium Wasserstand (Wasser Niveau Regulierung)

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

      Ich hatte jetzt die Wassersteuerung für mein Aquarium so zusammengebaut.
      Kann man das so machen !? @paul53 und wie fügt man nun eine und bedingung hinzu.
      das wenn wasserstand mehr als -0,8 cm hat und Datenpunkt

      sonoff.0.Aqua_Float.POWER
      

      true ist dann soll

      sonoff.0.Aqua_Control.POWER1
      

      eingeschaltet werden und wenn wasserstand 0 ist und schwimmer

      sonoff.0.Aqua_Float.POWER
      

      false ist wieder abgeschaltet werden.

      var Wasserstand_ist, Wasserstand_kalibriert;
      
      
      Wasserstand_ist = parseFloat(getState('sonoff.0.Aqua_Float.SENSOR.SR04.Distance').val);
      console.info((['Wasserstand ist ',getState('0_userdata.0.Aqua_Float.Wasserstand_ist').val,' cm'].join('')));
      Wasserstand_kalibriert = getState('sonoff.0.Aqua_Float.SENSOR.SR04.Distance').val - 21.5;
      console.info((['Wasserstand kalibriert ',Math.round(getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val * 10) / 10,' cm'].join('')));
      schedule("*/5 * * * * *", async () => {
        setState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert' /* Wasserstand_kallibriert */, Wasserstand_kalibriert, true);
        setState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert' /* Wasserstand_kallibriert */, getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val, true);
        setState('0_userdata.0.Aqua_Float.Wasserstand_ist' /* Wasserstand_ist */, getState('sonoff.0.Aqua_Float.SENSOR.SR04.Distance').val, true);
        setState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert' /* Wasserstand_kallibriert */, Math.round(Wasserstand_kalibriert * 10) / 10, true);
      });
      on({ id: [].concat(['0_userdata.0.Aqua_Float.Wasserstand_kallibriert']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val <= parseFloat((-0.8))) {
          setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, true);
        } else if (getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val >= parseFloat(0)) {
          setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, false);
        }
      });
      

      Screenshot 2024-05-31 210101.png

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="Cyol{5:X7}HdPh4;T{?3">Wasserstand_ist</variable>
          <variable id="SUBAE.)jx_q/WpOLe[w-">Wasserstand kalibriert</variable>
        </variables>
        <block type="variables_set" id="D=pcC3YW!%2@aa8-@uz^" x="-2287" y="-2062">
          <field name="VAR" id="Cyol{5:X7}HdPh4;T{?3">Wasserstand_ist</field>
          <value name="VALUE">
            <block type="convert_tonumber" id="8TgRf/;4}0COa:0JVzU1">
              <value name="VALUE">
                <block type="get_value" id="(M3pR,W[q8@mLZK}N2Zw">
                  <field name="ATTR">val</field>
                  <field name="OID">sonoff.0.Aqua_Float.SENSOR.SR04.Distance</field>
                </block>
              </value>
            </block>
          </value>
          <next>
            <block type="debug" id="!iZ}H~;tYo)lKMO@P0:v">
              <field name="Severity">info</field>
              <value name="TEXT">
                <shadow type="text" id="bfD6#6F5~@THlk)6hv2t">
                  <field name="TEXT">test</field>
                </shadow>
                <block type="text_join" id="x]OysvfoiuAq07,c%Q3}">
                  <mutation items="3"></mutation>
                  <value name="ADD0">
                    <block type="text" id="oDo}h[!,Vb^zNhdLda{J">
                      <field name="TEXT">Wasserstand ist </field>
                    </block>
                  </value>
                  <value name="ADD1">
                    <block type="get_value" id="@V!bf#Xz_jT|+3(~lw1^">
                      <field name="ATTR">val</field>
                      <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_ist</field>
                    </block>
                  </value>
                  <value name="ADD2">
                    <block type="text" id="3aX/AQ(^.A!NK{.E[x|m">
                      <field name="TEXT"> cm</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="variables_set" id="}@R?uwDvCiGGS=zhWZa4">
                  <field name="VAR" id="SUBAE.)jx_q/WpOLe[w-">Wasserstand kalibriert</field>
                  <value name="VALUE">
                    <block type="math_arithmetic" id="VzZ$fGB$ImObsK2]tg5-">
                      <field name="OP">MINUS</field>
                      <value name="A">
                        <shadow type="math_number" id="{uLHjU`0,#rX*t8}%Dc.">
                          <field name="NUM">1</field>
                        </shadow>
                        <block type="get_value" id="-f@}Yjexve;t}WGh]hz2">
                          <field name="ATTR">val</field>
                          <field name="OID">sonoff.0.Aqua_Float.SENSOR.SR04.Distance</field>
                        </block>
                      </value>
                      <value name="B">
                        <shadow type="math_number" id="hFYFYQUobi^W4HHQ0UbW">
                          <field name="NUM">21.5</field>
                        </shadow>
                      </value>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id="H1xc=5@ZxC]LOpG7@S3,">
                      <field name="Severity">info</field>
                      <value name="TEXT">
                        <shadow type="text" id="bfD6#6F5~@THlk)6hv2t">
                          <field name="TEXT">test</field>
                        </shadow>
                        <block type="text_join" id="O%Dm:S]F$*,Ktj(/YVTu">
                          <mutation items="3"></mutation>
                          <value name="ADD0">
                            <block type="text" id="KDsV2[a7^X!n9mY5r49s">
                              <field name="TEXT">Wasserstand kalibriert </field>
                            </block>
                          </value>
                          <value name="ADD1">
                            <block type="math_rndfixed" id="U4p}k*89jdweAMC#y?({">
                              <field name="n">1</field>
                              <value name="x">
                                <shadow type="math_number" id="P[rbJ4?cEn6t}0f/b/V;">
                                  <field name="NUM">3.1234</field>
                                </shadow>
                                <block type="get_value" id="4J9%t*Uj.-$RaG`+cv*Q">
                                  <field name="ATTR">val</field>
                                  <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="ADD2">
                            <block type="text" id="j.@Q.L1+[}Co*4i,_%#A">
                              <field name="TEXT"> cm</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <next>
                        <block type="schedule" id="#Chaxh~z^rRQZ3L|/,L[">
                          <field name="SCHEDULE">*/5 * * * * *</field>
                          <statement name="STATEMENT">
                            <block type="update" id="pdgFl43(9GQnO.AW*Mwr">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="variables_get" id="?.:3!S([ue8jN^#^Jqh|">
                                  <field name="VAR" id="SUBAE.)jx_q/WpOLe[w-">Wasserstand kalibriert</field>
                                </block>
                              </value>
                              <next>
                                <block type="update" id="!z9ez%uto5N}u18LQ-lb">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="get_value" id="!G]txIwQw]^^t^#`0k`)">
                                      <field name="ATTR">val</field>
                                      <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="update" id="c{OxB_5Ij4q]5W}R+^Yo">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_ist</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="get_value" id="DAU)QXF/hB(/(D7mW+X*">
                                          <field name="ATTR">val</field>
                                          <field name="OID">sonoff.0.Aqua_Float.SENSOR.SR04.Distance</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="update" id="^@cqVFtrS!~lc:+@AJ+?">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="math_rndfixed" id="7#jWE?q0V|_vxzQ?.;]q">
                                              <field name="n">1</field>
                                              <value name="x">
                                                <shadow type="math_number" id="N;rmKze=]OquZx^*CQGL">
                                                  <field name="NUM">3.1234</field>
                                                </shadow>
                                                <block type="variables_get" id="Fsb^y+cNo.s=tU4Uwjk;">
                                                  <field name="VAR" id="SUBAE.)jx_q/WpOLe[w-">Wasserstand kalibriert</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <next>
                            <block type="on_ext" id="6;vSpIUPT34FHb|D_U`s">
                              <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="H2SZM/sP%Ft-~)Z5P0[S">
                                  <field name="oid">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="(]A@$b5^OOk0)#N0/6tk">
                                  <mutation elseif="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_compare" id="AH=3cX1iS7S~9:,D!858">
                                      <field name="OP">LTE</field>
                                      <value name="A">
                                        <block type="get_value" id="*s5.h!x=yfhRu,D:3B%l">
                                          <field name="ATTR">val</field>
                                          <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="convert_tonumber" id="N7Thyg4L;O*8N?rDVI`E">
                                          <value name="VALUE">
                                            <block type="math_number" id="AhQT5a}A-]S)ub8)b+N0">
                                              <field name="NUM">-0.8</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id="=,9MfU1^-z7?(VpR?Bwm">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="AOs2d*XWWt)zkj6q02cJ">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_compare" id="[?hcTgw,LpTbh.6OV#(_">
                                      <field name="OP">GTE</field>
                                      <value name="A">
                                        <block type="get_value" id="Yyd%Q)JWAT9(Uyw(D2md">
                                          <field name="ATTR">val</field>
                                          <field name="OID">0_userdata.0.Aqua_Float.Wasserstand_kallibriert</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="convert_tonumber" id="Ay=}D)MW2xL4s#8TP){7">
                                          <value name="VALUE">
                                            <block type="math_number" id="uf?@AM%$J@K5dfJW+oC7">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="control" id="-fYm/~tu$A~7|PPDDaa{">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="KS;1KZM)PED,k8^Wda*U">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </next>
        </block>
      </xml>
      
      Aphofis paul53 2 Replies Last reply Reply Quote 0
      • Aphofis
        Aphofis @Aphofis last edited by Aphofis

        könnte es so eine saubere und Bedingung sein !?
        Screenshot 2024-05-31 211948.png

        });
        on({ id: [].concat(['0_userdata.0.Aqua_Float.Wasserstand_kallibriert']), change: 'ne' }, async (obj) => {
          let value = obj.state.val;
          let oldValue = obj.oldState.val;
          if ((getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val <= parseFloat((-0.1))) && (getState('sonoff.0.Aqua_Float.POWER').val == true)) {
            setState('0_userdata.0.Aqua_Float.Test_Gerät' /* Test Gerät */, true);
          } else if ((getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val <= parseFloat(0)) && (getState('sonoff.0.Aqua_Float.POWER').val == true)) {
            setState('0_userdata.0.Aqua_Float.Test_Gerät' /* Test Gerät */, false);
          }
        });
        
        1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @Aphofis last edited by

          @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

          Kann man das so machen !?

          Nein, so wird der Sensorwert nur bei Skripstart und nicht im laufenden Betrieb erfasst.
          Ändere es mal so:

          Blockly_temp.JPG

          Muss wirklich alle 5 s abgefragt werden oder eignet sich nicht besser der Distanz-Sensor als Trigger?

          @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

          schwimmer

          Ich verstehe nicht, wie sich der Schwimmer "sonoff.0.Aqua_Control.POWER1" zusätzlich auswirken soll? Du schreibst was von true und falls, aber im unteren Blockly wird er nur auf true ausgewertet.

          Aphofis 1 Reply Last reply Reply Quote 1
          • Aphofis
            Aphofis @paul53 last edited by Aphofis

            @paul53
            muss nicht nur wenn Wasserstand_ist 0 cm hat sollte das Magnetventil auch abgeschaltet werden und nicht weiter pumpen.
            Ich meinte das so, das der Strom vom magnetventil über einen Schwimmer ein/aus geschaltet
            wird. Der Schwimmer (Aqua_Float POWER) ist auf Wasserstand 0 eingestellt.
            sonoff.0.Aqua_Control.POWER1 ist das Magnetventil was das Wasser dann per Osmose Schlauch ins Becken pumpt was widerrum mit dem Durchflussmesser gezählt werden soll, doch das ein anderes Thema.
            Eigentlich, kann man das Ganze auch über Aqua_Float POWER vom Sonoff gerät laufen lassen. Der Schwimmer ist zwar auch relativ genau. Nur hatte ich das damals bei dem Meerwasser Becken auch schon das wenn die Schwimmer per Kabel angeschlossen sind und das ESP8266 neustartet
            haben spradisch die Schwimmer einen falschen Start Zustand. Das war schon damals mehrere male fatal und ich durfte über 80-100 Liter Wasser aus dem Wohnzimmer aufsaugen und wegwischen. Der 5 sek Intervall ist nur damit es so schnell und genau wie möglich geht. Deswegen wenn Schwimmer true ist und Distanz sensor mehr als 0,8 cm mehr hat als Wasserstand kalibriert, dann soll das Magnetventil geschaltet werden.
            Woher bekommt denn die Variable Magnetventil ihren Wert !?
            und wie gesagt, du bist der Profi!!! Ich kann nur jeden Tag den Hut davor ziehen.
            und die Krempe ist schon verdammt stark abgenutzt! 😊

            var Wasserstand_ist, magnetventil, Wasserstand_kalibriert;
            
            
            schedule("*/5 * * * * *", async () => {
              Wasserstand_ist = parseFloat(getState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert').val);
              console.info((['Wasserstand ist ',getState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert').val,' cm'].join('')));
              setState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert' /* Wasser_Sensor_kalibriert */, Wasserstand_ist, true);
              Wasserstand_kalibriert = Math.round((Wasserstand_ist - 27.3) * 10) / 10;
              console.info((['Wasserstand kalibriert ',Math.round(getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val * 10) / 10,' cm'].join('')));
              setState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert' /* Wasserstand_kallibriert */, Wasserstand_kalibriert, true);
            });
            
            on({ id: [].concat(['0_userdata.0.Aqua_Float.Wasserstand_kallibriert']), change: 'ne' }, async (obj) => {
              let value = obj.state.val;
              let oldValue = obj.oldState.val;
              if ((obj.state ? obj.state.val : '') <= -0.8) {
                magnetventil = true;
              } else if ((obj.state ? obj.state.val : '') >= 0) {
                magnetventil = false;
              }
              if (magnetventil != getState('sonoff.0.Aqua_Control.POWER1').val) {
                setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, magnetventil);
              }
            });
            

            so ist es besser, der Wasserstand ist jetzt mit einem eigenen Blockly kalibriert, da der Distanz sensor ein paar cm verschluckt. Demnach sind 21,4cm Wasserabstand eigentlich 27,3cm.
            Da es aber in der VIS vom iobroker als 0 cm angezeigt werden soll.

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

              @aphofis sagte: wenn Schwimmer true ist und Distanz sensor mehr als 0,8 cm mehr hat als Wasserstand kalibriert, dann soll das Magnetventil geschaltet werden.

              Habe es um den Schwimmer ergänzt.

              Blockly_temp.JPG

              @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

              Woher bekommt denn die Variable Magnetventil ihren Wert !?

              Setze die Variable auch bei Skriptstart (siehe ganz unten).

              Aphofis 1 Reply Last reply Reply Quote 1
              • Aphofis
                Aphofis @paul53 last edited by Aphofis

                @paul53
                so korrekt !?

                var Wasserstand_ist, magnetventil, Wasserstand_kalibriert;
                
                
                schedule("*/15 * * * * *", async () => {
                  Wasserstand_ist = parseFloat(getState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert').val);
                  console.info((['Wasserstand ist ',getState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert').val,' cm'].join('')));
                  setState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert' /* Wasser_Sensor_kalibriert */, Wasserstand_ist, true);
                  Wasserstand_kalibriert = Math.round((Wasserstand_ist - 27.3) * 10) / 10;
                  console.info((['Wasserstand kalibriert ',Math.round(getState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert').val * 10) / 10,' cm'].join('')));
                  setState('0_userdata.0.Aqua_Float.Wasserstand_kallibriert' /* Wasserstand_kallibriert */, Wasserstand_kalibriert, true);
                });
                on({ id: [].concat(['0_userdata.0.Aqua_Float.Wasserstand_kallibriert']), change: 'ne' }, async (obj) => {
                  let value = obj.state.val;
                  let oldValue = obj.oldState.val;
                  if (getState('sonoff.0.Aqua_Float.POWER').val) {
                    if ((obj.state ? obj.state.val : '') <= -0.8) {
                      magnetventil = true;
                    } else if ((obj.state ? obj.state.val : '') >= 0) {
                      magnetventil = false;
                    }
                  } else {
                    magnetventil = false;
                  }
                  if (magnetventil != getState('sonoff.0.Aqua_Control.POWER1').val) {
                    setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, magnetventil);
                  }
                });
                magnetventil = getState('sonoff.0.Aqua_Control.POWER1').val;
                
                

                und das wäre das Blockly, was den Sensor kalibriert

                var Sensorwert;
                
                
                Sensorwert = Math.round(getState('sonoff.0.Aqua_Float.SENSOR.SR04.Distance').val * 10) / 10;
                schedule("*/5 * * * * *", async () => {
                  setState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert' /* Wasser_Sensor_kalibriert */, (Sensorwert + 6), true);
                  console.info((Sensorwert + 6));
                });
                ist das so ok !?
                
                paul53 2 Replies Last reply Reply Quote 0
                • paul53
                  paul53 @Aphofis last edited by paul53

                  @aphofis sagte: so korrekt !?

                  Ja.

                  @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

                  Blockly, was den Sensor kalibriert

                  Die Abfrage des Sensors muss innerhalb des 5-s-Triggers erfolgen.

                  var Sensorwert;
                   
                   
                  schedule("*/5 * * * * *", async () => {
                    Sensorwert = Math.round(getState('sonoff.0.Aqua_Float.SENSOR.SR04.Distance').val * 10) / 10;
                    setState('0_userdata.0.Aqua_Float.Wasser_Sensor_kalibriert' /* Wasser_Sensor_kalibriert */, (Sensorwert + 6), true);
                    console.info((Sensorwert + 6));
                  });
                  
                  1 Reply Last reply Reply Quote 1
                  • paul53
                    paul53 @Aphofis last edited by paul53

                    @aphofis
                    So reagiert das Magnetventil schneller auf den Schwimmer (falls gewünscht):

                    Blockly_temp.JPG

                    Aphofis 1 Reply Last reply Reply Quote 1
                    • Aphofis
                      Aphofis @paul53 last edited by

                      @paul53
                      Habe ich angepasst. Kann ich leider erst testen wenn der Wasseranschluß Adapter geliefert wurde.

                      Aphofis 1 Reply Last reply Reply Quote 0
                      • Aphofis
                        Aphofis @Aphofis last edited by Aphofis

                        So jetzt habe ich ja einen normalen Schwimmer. Das mir mit dem Distanz Sensor doch zu ungenau.
                        Wäre es so korrekt !? und wie baue ich jetzt die Zähler geschichte Tag und Jahr da mit ein !?

                        var Magnetventil;
                        
                        
                        on({ id: [].concat(['sonoff.0.Aqua_Float.POWER']), change: 'ne' }, async (obj) => {
                          let value = obj.state.val;
                          let oldValue = obj.oldState.val;
                          if (getState('sonoff.0.Aqua_Float.POWER').val) {
                            if ((obj.state ? obj.state.val : '') == true) {
                              Magnetventil = true;
                            } else if ((obj.state ? obj.state.val : '') == false) {
                              Magnetventil = false;
                            }
                          }
                          if (Magnetventil != getState('sonoff.0.Aqua_Control.POWER1').val) {
                            setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, Magnetventil);
                          }
                        });
                        Magnetventil = getState('sonoff.0.Aqua_Control.POWER1').val;
                        on({ id: 'sonoff.0.Aqua_Float.POWER' /* Aqua_Float POWER */, change: 'lt' }, async (obj) => {
                          let value = obj.state.val;
                          let oldValue = obj.oldState.val;
                          Magnetventil = false;
                          setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, false);
                        });
                        

                        Screenshot 2024-07-30 000730.png

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <variables>
                            <variable id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</variable>
                          </variables>
                          <block type="on_ext" id="]ILn#VptWgU|e$2);gyj" x="337" y="-862">
                            <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="2X?.ZS/H@+t:?bM5|[!*">
                                <field name="oid">sonoff.0.Aqua_Float.POWER</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="nj.lEo`%,6?,@TX,lK%d">
                                <value name="IF0">
                                  <block type="get_value" id=",C;zjF!{nJG{H_`E{bXa">
                                    <field name="ATTR">val</field>
                                    <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="controls_if" id="Y^PXGsg?K2SKw@i-etrH">
                                    <mutation elseif="1"></mutation>
                                    <value name="IF0">
                                      <block type="logic_compare" id="oW:sdoX-7/kI9wyMf0{i">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="on_source" id="C=|BD(-QDK,3_J+Cd_ur">
                                            <field name="ATTR">state.val</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="`gIYA*PRo8,[o%`[{SzI">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="variables_set" id="E/HoLt2E:d7J$j=`|#_}">
                                        <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="g)ymwSI1|~s#Am|u9c||">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                    <value name="IF1">
                                      <block type="logic_compare" id="a=mnJ~,.19(Ei8uFJ9#P">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="on_source" id="AeF77Zfu}aVXxN3BsTc$">
                                            <field name="ATTR">state.val</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="{$%Tw)2b*1fJ5pmX5/Xf">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO1">
                                      <block type="variables_set" id="JBjI((D@Q*S]1UQ5__7h">
                                        <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="m#tve$Y7sY=1JlI5=h{p">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <next>
                                  <block type="controls_if" id="k.6G@7S_B0UcS0Zbjgu%">
                                    <value name="IF0">
                                      <block type="logic_compare" id="|}(]ZI3(-SuvL9IkO%~u">
                                        <field name="OP">NEQ</field>
                                        <value name="A">
                                          <block type="variables_get" id="s*oDCP[@wadm`;v0p3Yb">
                                            <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="get_value" id="0BAAUX]W]y4wiy5hzhG4">
                                            <field name="ATTR">val</field>
                                            <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="control" id="k_UC4MwIP$;4QjKSV=!J">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id=":H$2I@(pf/gaCg?!=j9+">
                                            <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="variables_set" id="c9$^t`+{9rY4m{K*e80n">
                                <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                <value name="VALUE">
                                  <block type="get_value" id=";Cg)?-mx{46^fb@vsTFu">
                                    <field name="ATTR">val</field>
                                    <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="on" id=".Kws=H5v3:9sC$2y}XY.">
                                    <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                    <field name="CONDITION">lt</field>
                                    <field name="ACK_CONDITION"></field>
                                    <statement name="STATEMENT">
                                      <block type="variables_set" id="EB)[$hMTk[M)M-TM[QA=">
                                        <field name="VAR" id="]VTTxDR?`e|Cg,*m);t,">Magnetventil</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="@/9n#f}F|OQ3vED4Wg=7">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="`#?D6cI2R48DM4)iEV2)">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id=",3jB^Ds`:?3}P4i)[iK}">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </xml>
                        
                        var Wasser_Jahr, Sensorwert;
                        
                        
                        Wasser_Jahr = (Sensorwert * 5.1) / 1000;
                        Sensorwert = getState('sonoff.0.Aqua_Float.SENSOR.COUNTER.C2').val;
                        on({ id: [].concat(['sonoff.0.Aqua_Float.POWER']), change: 'ne' }, async (obj) => {
                          let value = obj.state.val;
                          let oldValue = obj.oldState.val;
                          if (getState('sonoff.0.Aqua_Float.POWER').val == true) {
                            setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, true);
                            setState('0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter' /* Wasser_Counter */, (Sensorwert * 5.1), true);
                            console.info((String(Sensorwert * 5.1) + ' ml'));
                          }
                          if (getState('sonoff.0.Aqua_Float.POWER').val == false) {
                            setState('sonoff.0.Aqua_Control.POWER1' /* Aqua_Control POWER1 */, false);
                            setState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag' /* Wasserzähler_Tag */, Math.round((getState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag').val + Sensorwert * 5.1) * 10) / 10, true);
                            setState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr' /* Wasserzähler_Jahr */, Math.round((getState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr').val + (Sensorwert * 5.1) / 1000) * 1000) / 1000, true);
                            setState('0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter' /* Wasser_Counter */, 0, true);
                            console.info(Math.round((getState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr').val + (Sensorwert * 5.1) / 1000) * 1000) / 1000);
                            console.info((String(Wasser_Jahr) + ' Liter'));
                            sendTo("telegram.0", "call", {
                                text: ([Sensorwert * 5.1,' ml',' Wasser wurden dosiert'].join('')),
                                user: '',
                                lang: "",
                                repeats: "1"
                            });
                            exec('http://192.168.0.71/cm?cmnd=counter2 0');
                          }
                        });
                        
                        schedule('{"time":{"exactTime":true,"start":"00:00"},"period":{"years":1,"yearDate":1,"yearMonth":1}}', async () => {
                          setState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr' /* Wasserzähler_Jahr */, 0, true);
                        });
                        schedule('{"time":{"exactTime":true,"start":"00:00"},"period":{"days":1},"valid":{"from":"26.07.2024","to":""}}', async () => {
                          setState('0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag' /* Wasserzähler_Tag */, 0, true);
                        });
                        

                        Screenshot 2024-07-30 000822.png

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <variables>
                            <variable id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</variable>
                            <variable id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</variable>
                          </variables>
                          <block type="variables_set" id="Ly[A!2g58K@mKk8m:]|2" x="-1213" y="-812">
                            <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                            <value name="VALUE">
                              <block type="math_arithmetic" id="7Ao_C8uEf6,XAdU8}]}h">
                                <field name="OP">DIVIDE</field>
                                <value name="A">
                                  <shadow type="math_number" id="y@9!m=3w*zq88s!]VKda">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="![Q{cw$rD?us}f2X^C-)">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow type="math_number" id="*jv}6cjSI{#yaUP@MyXk">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="variables_get" id="dfTDJrA0(r!mPzqk_b^O">
                                        <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id=")QfF.2k^PtGI2GW~Xh.E">
                                        <field name="NUM">5.1</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="kd|@cVabO(5=^Emb%3P_">
                                    <field name="NUM">1000</field>
                                  </shadow>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" id="HUSPsI8yrvs1R9buB5UE">
                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                <value name="VALUE">
                                  <block type="get_value" id="|=$q%x;t`MAEW/vG=BLQ">
                                    <field name="ATTR">val</field>
                                    <field name="OID">sonoff.0.Aqua_Float.SENSOR.COUNTER.C2</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="on_ext" id="0:-d[({.Z}?pVdpxL($`">
                                    <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="0W#F=X0/oRtnrPk9h3{x">
                                        <field name="oid">sonoff.0.Aqua_Float.POWER</field>
                                      </shadow>
                                    </value>
                                    <statement name="STATEMENT">
                                      <block type="controls_if" id="-/ZpX8Na)@}o-6|}CSL!">
                                        <value name="IF0">
                                          <block type="logic_compare" id="-e{?t`m]:rD;6A=8$SJn">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id="~.`biXAxtVIX::f,31wZ">
                                                <field name="ATTR">val</field>
                                                <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="?6uuz[3#IE-ikDQ,8S:b">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="control" id="+J6RXi5dE%yH2jh%*6!s">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="gHf%u#Etctvw!kr/.gS=">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="update" id="?h=3;[vg7tLw)/h@7:$A">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_arithmetic" id="e1#%MoOBW(WQNQtz+];;">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id=",s^*MoNszpa:oog%EMAW">
                                                        <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="j[l*MeT/~[+quhxnrS7C">
                                                        <field name="NUM">5.1</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="^-PLnz!%La/%esP+p|q%">
                                                    <field name="Severity">info</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                        <field name="TEXT">test</field>
                                                      </shadow>
                                                      <block type="text_join" id="oliPeI~VRSKRwW7]r|%]">
                                                        <mutation items="2"></mutation>
                                                        <value name="ADD0">
                                                          <block type="math_arithmetic" id="Q,q,)Fqfx8Dcu]de0[XS">
                                                            <field name="OP">MULTIPLY</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="variables_get" id="z/,x;+#E?BVELckv)U}3">
                                                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id=")SsRvEav^gC^x{KjjCyf">
                                                                <field name="NUM">5.1</field>
                                                              </shadow>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="text" id="8Ojo1T/MND*{-XQvij#:">
                                                            <field name="TEXT"> ml</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="controls_if" id=",aY{tNn{Zq6[:-ELj0As">
                                            <value name="IF0">
                                              <block type="logic_compare" id="A1JHG3$7vPc~S.zi3zOA">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="?CKwE$ej^`bqs*$[-]c:">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="Y$!/TyZ,:iO6_8U(xz*o">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="control" id="8Gs!_Fp|Q_FY!2D:b!lM">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="uAeyzfF?Q[,YVnAkN:ev">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="update" id="fwHm}o7U6~1d|Z|{o_na">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_rndfixed" id=";]qdo[hKwhyu5U)H]|AP">
                                                        <field name="n">1</field>
                                                        <value name="x">
                                                          <shadow type="math_number" id="%/fU!@WL!D1NR8vZIXrJ">
                                                            <field name="NUM">3.1234</field>
                                                          </shadow>
                                                          <block type="math_arithmetic" id=";4%D/iw5+jbnB}~cw5^U">
                                                            <field name="OP">ADD</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="get_value" id="M_~UzJP71@mQ8;LaEqA;">
                                                                <field name="ATTR">val</field>
                                                                <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id="W)Ad2(Y4FzH8rN6?DDSG">
                                                                <field name="NUM">5.1</field>
                                                              </shadow>
                                                              <block type="math_arithmetic" id="--Yqm1%UxoJEeNrk!c.P">
                                                                <field name="OP">MULTIPLY</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="su_iSda]mMUcg|Ylu@=o">
                                                                    <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id=")^cYV1_GG2c6MZ]{|#7y">
                                                                    <field name="NUM">5.1</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="update" id="v@JXdPp^SX$e}[;*TN;5">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_rndfixed" id="H]3.WGAtE,UJ;+O:yMqK">
                                                            <field name="n">3</field>
                                                            <value name="x">
                                                              <shadow type="math_number" id="%?~4gjL?h%jK9FuG!MeL">
                                                                <field name="NUM">3.1234</field>
                                                              </shadow>
                                                              <block type="math_arithmetic" id="n+SR|VkO!e$%A-qY%U?~">
                                                                <field name="OP">ADD</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="*jv}6cjSI{#yaUP@MyXk">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="HFTLl.5s}DD!S3VkI2}w">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="f%DO%LG5^1o@Ix{U_@A~">
                                                                    <field name="NUM">5.1</field>
                                                                  </shadow>
                                                                  <block type="math_arithmetic" id="aUjod9%H]Jr`c:7;L`1L">
                                                                    <field name="OP">DIVIDE</field>
                                                                    <value name="A">
                                                                      <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                        <field name="NUM">1</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="kNX*w+DLCh?h;QW6++Z]">
                                                                        <field name="OP">MULTIPLY</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="==0y1MmV=A38?y{8!7Qp">
                                                                            <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="]l8R1tU7Xg/|fi2)D~kS">
                                                                            <field name="NUM">5.1</field>
                                                                          </shadow>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <shadow type="math_number" id="W)Ad2(Y4FzH8rN6?DDSG">
                                                                        <field name="NUM">1000</field>
                                                                      </shadow>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="update" id="`NW9_QcSlKGP;b[9@.QH">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_number" id="|m|G@]xx7.d^nS-E2Q,B">
                                                                <field name="NUM">0</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="debug" id="VbtK/x1iMQ[uIZ]BFI2R">
                                                                <field name="Severity">info</field>
                                                                <value name="TEXT">
                                                                  <shadow type="text" id="eY+;zViF,NH})5!!C8Al">
                                                                    <field name="TEXT">test</field>
                                                                  </shadow>
                                                                  <block type="math_rndfixed" id="1K#w;9hOMMM]85p5dS{^">
                                                                    <field name="n">3</field>
                                                                    <value name="x">
                                                                      <shadow type="math_number" id="%?~4gjL?h%jK9FuG!MeL">
                                                                        <field name="NUM">3.1234</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="orkGrIrLF6pxkL0G.@c7">
                                                                        <field name="OP">ADD</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="*jv}6cjSI{#yaUP@MyXk">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="get_value" id="z^[3xVATuRPkQZy^+9uL">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="f%DO%LG5^1o@Ix{U_@A~">
                                                                            <field name="NUM">5.1</field>
                                                                          </shadow>
                                                                          <block type="math_arithmetic" id="g`5V!ld7Q)L](PfiDQIO">
                                                                            <field name="OP">DIVIDE</field>
                                                                            <value name="A">
                                                                              <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                                <field name="NUM">1</field>
                                                                              </shadow>
                                                                              <block type="math_arithmetic" id="(iIdHa2r1]QW!3;l}VWB">
                                                                                <field name="OP">MULTIPLY</field>
                                                                                <value name="A">
                                                                                  <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="6Y;STQc/8w8(*}?^gP^x">
                                                                                    <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="B">
                                                                                  <shadow type="math_number" id="ZIm/;!1xk;j/Q1T4P(d7">
                                                                                    <field name="NUM">5.1</field>
                                                                                  </shadow>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <shadow type="math_number" id="B|YSSV_~-Z#/)QXaRcbJ">
                                                                                <field name="NUM">1000</field>
                                                                              </shadow>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="debug" id="ESkP;ss;~ZDB;gISHFI]">
                                                                    <field name="Severity">info</field>
                                                                    <value name="TEXT">
                                                                      <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                                        <field name="TEXT">test</field>
                                                                      </shadow>
                                                                      <block type="text_join" id="R[aL32f3![219OSKE$k!">
                                                                        <mutation items="2"></mutation>
                                                                        <value name="ADD0">
                                                                          <block type="variables_get" id="Y%f8;@,D;lNrR?pmQ|(Z">
                                                                            <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="ADD1">
                                                                          <block type="text" id="q=ZJuFoniJND[_z;_j~M">
                                                                            <field name="TEXT"> Liter</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="telegram_call" id="HP%v-*cCsG%`jLmz$NzT">
                                                                        <field name="INSTANCE">.0</field>
                                                                        <field name="LANGUAGE"></field>
                                                                        <field name="REPEATS">1</field>
                                                                        <field name="LOG"></field>
                                                                        <value name="MESSAGE">
                                                                          <shadow type="text" id=":(YMTpY/k)a7+-W7~g|M">
                                                                            <field name="TEXT">text</field>
                                                                          </shadow>
                                                                          <block type="text_join" id=";;6oqX}l/W(ws@3[8iFR">
                                                                            <mutation items="3"></mutation>
                                                                            <value name="ADD0">
                                                                              <block type="math_arithmetic" id="Y37WPVV0`sb~=]u|%^:{">
                                                                                <field name="OP">MULTIPLY</field>
                                                                                <value name="A">
                                                                                  <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="wimbm((,ufreXmGowP_b">
                                                                                    <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Sensorwert</field>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="B">
                                                                                  <shadow type="math_number" id="UH4]vU,[X+aWc.0|JEhM">
                                                                                    <field name="NUM">5.1</field>
                                                                                  </shadow>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD1">
                                                                              <block type="text" id="e)3mz5qz)A1i;o:E{!47">
                                                                                <field name="TEXT"> ml</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD2">
                                                                              <block type="text" id="We*0)kla7,,mg^N5.sPb">
                                                                                <field name="TEXT"> Wasser wurden dosiert</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <value name="USERNAME">
                                                                          <shadow type="text" id="X{lxgUXzI0kZ[MSI2uZV">
                                                                            <field name="TEXT"></field>
                                                                          </shadow>
                                                                        </value>
                                                                        <next>
                                                                          <block type="exec" id="M$[Xr*Msg!BILkU,.}1P">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                                            <field name="WITH_STATEMENT">FALSE</field>
                                                                            <field name="LOG"></field>
                                                                            <value name="COMMAND">
                                                                              <shadow type="text" id="h}Wf^Jm-chI/p|/BP4RP">
                                                                                <field name="TEXT">http://192.168.0.71/cm?cmnd=counter2 0</field>
                                                                              </shadow>
                                                                            </value>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                          <block type="schedule" id="eY2k):|9:7y;jFJ|-e{." x="-338" y="-813">
                            <field name="SCHEDULE">{"time":{"exactTime":true,"start":"00:00"},"period":{"years":1,"yearDate":1,"yearMonth":1}}</field>
                            <statement name="STATEMENT">
                              <block type="update" id="|*@i5i^pfX8@UCo}nN4j">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="math_number" id="27z6jlXz=#}B7;,?{V7M">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                              </block>
                            </statement>
                            <next>
                              <block type="schedule" id="!0s4!(IKf352-$Cjs+=H">
                                <field name="SCHEDULE">{"time":{"exactTime":true,"start":"00:00"},"period":{"days":1},"valid":{"from":"26.07.2024","to":""}}</field>
                                <statement name="STATEMENT">
                                  <block type="update" id=",B.vece!}v4W4j`J0O1r">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="(P{ST5UTzs=*|2/~;Z+d">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </xml>
                        
                        paul53 1 Reply Last reply Reply Quote 0
                        • paul53
                          paul53 @Aphofis last edited by paul53

                          @aphofis
                          Mit dem Javascript-Code kann ich nichts anfangen, außer du möchtest künftig in Javascript weiter programmieren.
                          Ich benötige den XML-Export von Blockly.

                          @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

                          Wäre es so korrekt !?

                          Nein.
                          Wozu 3 Trigger auf den gleichen Datenpunkt "sonoff.0.Aqua_Float.POWER"? Man verwendet pro Datenpunkt nur einen Trigger. Was ist "sonoff.0.Aqua_Float.POWER"?
                          Welche Funktion hat der exec-Block unten? Für eine URL wäre wohl der httpGet-Block eher geeignet.

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

                            @paul53 Hab denXMl Export angehängt.
                            "sonoff.0.Aqua_Float.POWER" ist der Schwimmer
                            "sonoff.0.Aqua_Control.POWER1" ist das Magnetventil
                            "sonoff.0.Aqua_Float.SENSOR.COUNTER.C2" ist der Wasser Durchfluß Messer
                            Der exec Block soll nach dem Wasser dosiert wurde im Tasmota Gerät den Counter vom Wasser Durchfluß Sensor auf null stellen Damit beim nächsten pumpen der Wert 0 hat.

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

                              @aphofis sagte: Hab denXMl Export angehängt.

                              Habe beide Skripte in ein Skript zusammengeführt und angepasst.

                              Blockly_temp.JPG

                              <xml xmlns="https://developers.google.com/blockly/xml">
                               <variables>
                                 <variable id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</variable>
                                 <variable id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</variable>
                                 <variable id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</variable>
                                 <variable type="timeout" id="timeout">timeout</variable>
                               </variables>
                               <block type="variables_set" id="HUSPsI8yrvs1R9buB5UE" x="-1212" y="-763">
                                 <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                 <value name="VALUE">
                                   <block type="math_arithmetic" id="e1#%MoOBW(WQNQtz+];;">
                                     <field name="OP">MULTIPLY</field>
                                     <value name="A">
                                       <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                         <field name="NUM">1</field>
                                       </shadow>
                                       <block type="get_value" id="|=$q%x;t`MAEW/vG=BLQ">
                                         <field name="ATTR">val</field>
                                         <field name="OID">sonoff.0.Aqua_Float.SENSOR.COUNTER.C2</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <shadow type="math_number" id="j[l*MeT/~[+quhxnrS7C">
                                         <field name="NUM">5.1</field>
                                       </shadow>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="HchfBD.f$i=}z$B3%%ro">
                                     <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                     <value name="VALUE">
                                       <block type="get_value" id="M_~UzJP71@mQ8;LaEqA;">
                                         <field name="ATTR">val</field>
                                         <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="eg3d1X/Cm`7YA1`r@6/5">
                                         <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                         <value name="VALUE">
                                           <block type="get_value" id="HFTLl.5s}DD!S3VkI2}w">
                                             <field name="ATTR">val</field>
                                             <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="on_ext" id="0:-d[({.Z}?pVdpxL($`">
                                             <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="0W#F=X0/oRtnrPk9h3{x">
                                                 <field name="oid">sonoff.0.Aqua_Float.POWER</field>
                                               </shadow>
                                               <block type="text" id="*P`{6.y$Qz:6)XRyP/e.">
                                                 <field name="TEXT">sonoff.0.Aqua_Float.SENSOR.COUNTER.C2</field>
                                               </block>
                                             </value>
                                             <statement name="STATEMENT">
                                               <block type="variables_set" id=".o$v5mYbaxJ%Dy^rAJ~@">
                                                 <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                 <value name="VALUE">
                                                   <block type="math_arithmetic" id="Q,q,)Fqfx8Dcu]de0[XS">
                                                     <field name="OP">MULTIPLY</field>
                                                     <value name="A">
                                                       <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="on_source" id="3{.pWaaavxoM|Ix^BlA}">
                                                         <field name="ATTR">state.val</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <shadow type="math_number" id=")SsRvEav^gC^x{KjjCyf">
                                                         <field name="NUM">5.1</field>
                                                       </shadow>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="update" id="?h=3;[vg7tLw)/h@7:$A">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                     <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                     <field name="WITH_DELAY">FALSE</field>
                                                     <value name="VALUE">
                                                       <block type="variables_get" id=",s^*MoNszpa:oog%EMAW">
                                                         <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="debug" id="^-PLnz!%La/%esP+p|q%">
                                                         <field name="Severity">info</field>
                                                         <value name="TEXT">
                                                           <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                             <field name="TEXT">test</field>
                                                           </shadow>
                                                           <block type="text_join" id="oliPeI~VRSKRwW7]r|%]" inline="true">
                                                             <mutation items="2"></mutation>
                                                             <value name="ADD0">
                                                               <block type="variables_get" id="-A9r0_TWSe~DfBweAXDt">
                                                                 <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                               </block>
                                                             </value>
                                                             <value name="ADD1">
                                                               <block type="text" id="8Ojo1T/MND*{-XQvij#:">
                                                                 <field name="TEXT"> ml</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </statement>
                                             <next>
                                               <block type="on" id=".Kws=H5v3:9sC$2y}XY.">
                                                 <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                                 <field name="CONDITION">ne</field>
                                                 <field name="ACK_CONDITION"></field>
                                                 <statement name="STATEMENT">
                                                   <block type="control" id="`#?D6cI2R48DM4)iEV2)">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                     <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                                     <field name="WITH_DELAY">FALSE</field>
                                                     <value name="VALUE">
                                                       <block type="on_source" id="Z:Ey]JGh2[+Z2p6CktfV">
                                                         <field name="ATTR">state.val</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="controls_if" id="fwTIogd8xTfe{#gzL9Cn">
                                                         <value name="IF0">
                                                           <block type="logic_negate" id="U/Ou4#ODbm6%waUiXwK3">
                                                             <value name="BOOL">
                                                               <block type="on_source" id="LKR8T,H^%|Gh2gr{;F,#">
                                                                 <field name="ATTR">state.val</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="timeouts_settimeout" id="RtR6.MNo`wh`ud[PbJ]:">
                                                             <field name="NAME">timeout</field>
                                                             <field name="DELAY">500</field>
                                                             <field name="UNIT">ms</field>
                                                             <statement name="STATEMENT">
                                                               <block type="math_change" id="IX/.|6z/Aro1]dY5SAYb">
                                                                 <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                                 <value name="DELTA">
                                                                   <shadow type="math_number" id="=M*S)jZ,M4p(dx.CTNCh">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="su_iSda]mMUcg|Ylu@=o">
                                                                     <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                   </block>
                                                                 </value>
                                                                 <next>
                                                                   <block type="update" id="fwHm}o7U6~1d|Z|{o_na">
                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                     <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                                     <field name="WITH_DELAY">FALSE</field>
                                                                     <value name="VALUE">
                                                                       <block type="math_rndfixed" id=";]qdo[hKwhyu5U)H]|AP">
                                                                         <field name="n">1</field>
                                                                         <value name="x">
                                                                           <shadow type="math_number" id="%/fU!@WL!D1NR8vZIXrJ">
                                                                             <field name="NUM">3.1234</field>
                                                                           </shadow>
                                                                           <block type="variables_get" id=".$Y/`yQi2Ep48g$zUH!(">
                                                                             <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <next>
                                                                       <block type="math_change" id="|lE6{O$UQZ68v5$V-mhf">
                                                                         <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                         <value name="DELTA">
                                                                           <shadow type="math_number" id="r(O489L+4qKOus0|bJZ]">
                                                                             <field name="NUM">1</field>
                                                                           </shadow>
                                                                           <block type="math_arithmetic" id="aUjod9%H]Jr`c:7;L`1L">
                                                                             <field name="OP">DIVIDE</field>
                                                                             <value name="A">
                                                                               <shadow type="math_number" id="G]!BBiks_53Irs;)eRZ/">
                                                                                 <field name="NUM">1</field>
                                                                               </shadow>
                                                                               <block type="variables_get" id="==0y1MmV=A38?y{8!7Qp">
                                                                                 <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                               </block>
                                                                             </value>
                                                                             <value name="B">
                                                                               <shadow type="math_number" id="W)Ad2(Y4FzH8rN6?DDSG">
                                                                                 <field name="NUM">1000</field>
                                                                               </shadow>
                                                                             </value>
                                                                           </block>
                                                                         </value>
                                                                         <next>
                                                                           <block type="update" id="v@JXdPp^SX$e}[;*TN;5">
                                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                             <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                                             <field name="WITH_DELAY">FALSE</field>
                                                                             <value name="VALUE">
                                                                               <block type="math_rndfixed" id="H]3.WGAtE,UJ;+O:yMqK">
                                                                                 <field name="n">3</field>
                                                                                 <value name="x">
                                                                                   <shadow type="math_number" id="%?~4gjL?h%jK9FuG!MeL">
                                                                                     <field name="NUM">3.1234</field>
                                                                                   </shadow>
                                                                                   <block type="variables_get" id="/n6Y=9C~2W@KV$RXN-DW">
                                                                                     <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                   </block>
                                                                                 </value>
                                                                               </block>
                                                                             </value>
                                                                             <next>
                                                                               <block type="update" id="`NW9_QcSlKGP;b[9@.QH">
                                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                 <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                                 <value name="VALUE">
                                                                                   <block type="math_number" id="|m|G@]xx7.d^nS-E2Q,B">
                                                                                     <field name="NUM">0</field>
                                                                                   </block>
                                                                                 </value>
                                                                                 <next>
                                                                                   <block type="debug" id="ESkP;ss;~ZDB;gISHFI]">
                                                                                     <field name="Severity">info</field>
                                                                                     <value name="TEXT">
                                                                                       <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                                                         <field name="TEXT">test</field>
                                                                                       </shadow>
                                                                                       <block type="text_join" id="R[aL32f3![219OSKE$k!" inline="true">
                                                                                         <mutation items="2"></mutation>
                                                                                         <value name="ADD0">
                                                                                           <block type="variables_get" id="Y%f8;@,D;lNrR?pmQ|(Z">
                                                                                             <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                           </block>
                                                                                         </value>
                                                                                         <value name="ADD1">
                                                                                           <block type="text" id="q=ZJuFoniJND[_z;_j~M">
                                                                                             <field name="TEXT"> Liter</field>
                                                                                           </block>
                                                                                         </value>
                                                                                       </block>
                                                                                     </value>
                                                                                     <next>
                                                                                       <block type="telegram_call" id="HP%v-*cCsG%`jLmz$NzT" inline="true">
                                                                                         <field name="INSTANCE">.0</field>
                                                                                         <field name="LANGUAGE"></field>
                                                                                         <field name="REPEATS">1</field>
                                                                                         <field name="LOG"></field>
                                                                                         <value name="MESSAGE">
                                                                                           <shadow type="text" id=":(YMTpY/k)a7+-W7~g|M">
                                                                                             <field name="TEXT">text</field>
                                                                                           </shadow>
                                                                                           <block type="text_join" id=";;6oqX}l/W(ws@3[8iFR" inline="true">
                                                                                             <mutation items="3"></mutation>
                                                                                             <value name="ADD0">
                                                                                               <block type="variables_get" id="wimbm((,ufreXmGowP_b">
                                                                                                 <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                                               </block>
                                                                                             </value>
                                                                                             <value name="ADD1">
                                                                                               <block type="text" id="e)3mz5qz)A1i;o:E{!47">
                                                                                                 <field name="TEXT"> ml</field>
                                                                                               </block>
                                                                                             </value>
                                                                                             <value name="ADD2">
                                                                                               <block type="text" id="We*0)kla7,,mg^N5.sPb">
                                                                                                 <field name="TEXT"> Wasser wurden dosiert</field>
                                                                                               </block>
                                                                                             </value>
                                                                                           </block>
                                                                                         </value>
                                                                                         <value name="USERNAME">
                                                                                           <shadow type="text" id="X{lxgUXzI0kZ[MSI2uZV">
                                                                                             <field name="TEXT"></field>
                                                                                           </shadow>
                                                                                         </value>
                                                                                         <next>
                                                                                           <block type="http_get" id="e9^C0,Xruq+R^Q=|k3dc">
                                                                                             <field name="TIMEOUT">2000</field>
                                                                                             <field name="UNIT">ms</field>
                                                                                             <field name="TYPE">text</field>
                                                                                             <value name="URL">
                                                                                               <shadow type="text" id=",_J4F8mdkf!o;QG{KC2z">
                                                                                                 <field name="TEXT">http://192.168.0.71/cm?cmnd=counter2 0</field>
                                                                                               </shadow>
                                                                                             </value>
                                                                                           </block>
                                                                                         </next>
                                                                                       </block>
                                                                                     </next>
                                                                                   </block>
                                                                                 </next>
                                                                               </block>
                                                                             </next>
                                                                           </block>
                                                                         </next>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </statement>
                                                           </block>
                                                         </statement>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                               <block type="schedule" id="eY2k):|9:7y;jFJ|-e{." x="-637" y="-488">
                                 <field name="SCHEDULE">0 0 1 1 *</field>
                                 <statement name="STATEMENT">
                                   <block type="variables_set" id="cEkH53kNZuyOARmP+Q|,">
                                     <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="9;ptE-Ve[-8t]`aa|Tgl">
                                         <field name="NUM">0</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="update" id="|*@i5i^pfX8@UCo}nN4j">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                         <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="27z6jlXz=#}B7;,?{V7M">
                                             <field name="NUM">0</field>
                                           </block>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <next>
                                   <block type="schedule" id="!0s4!(IKf352-$Cjs+=H">
                                     <field name="SCHEDULE">0 0 * * *</field>
                                     <statement name="STATEMENT">
                                       <block type="variables_set" id="u2/ozk5F`Si~3`_cLs4`">
                                         <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="kQwxXS=Yw7,Q5s]YKP}*">
                                             <field name="NUM">0</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="update" id=",B.vece!}v4W4j`J0O1r">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="(P{ST5UTzs=*|2/~;Z+d">
                                                 <field name="NUM">0</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                              </xml>
                              

                              EDIT: Habe noch eine Verzögerung eingebaut, damit das Magnetventil geschlossen ist, wenn die Wassermenge ausgewertet wird.

                              Aphofis 1 Reply Last reply Reply Quote 1
                              • Aphofis
                                Aphofis @paul53 last edited by Aphofis

                                @paul53
                                Das ja bombastisch!!!
                                Ich frage mich bei jeder Steuerung wie man sowas kann.
                                Ich hatte die bestehenden Werte aus den Datenpunkten gelöscht und dann das neue Blockly gestartet. Es wird zwar gezählt aber es steht nur in Wasser Jahr der alte Wert.
                                Der war 7,004 Liter den hatte ich auch auf Null gesetzt. Doch nach dem Wasser dosiert wurde steht Wasser Tag auf "0" und Wasser Jahr wurde der alte wert 7,004 angenommen. Woher kommt das !? Ach ja und im Telegram Bot kommt nix an.
                                Eingetragenen Bot Token hab ich kontrolliert der stimmt. Die Aquarium Steuerung, meldet per Telegram auch wenn Futter dosiert wird und Pumpe ein und ausgeschaltet wird also verbindung zu Telegram ist vorhanden.

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

                                  @aphofis sagte: Der war 7,004 Liter den hatte ich auch auf Null gesetzt.

                                  Vor dem Skriptstart?

                                  @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

                                  im Telegram Bot kommt nix an.

                                  Kam die Logausgabe "7.004 Liter"?
                                  Mit Telegram kenne ich mich nicht aus.

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

                                    @paul53
                                    Ja Logausgabe kam mit 7,004 Liter aber woher hat die Steuerung den Wert. Hatte den ja vor Script Start gelöscht.
                                    Ich Pumpe mal etwas Wasser aus dem Becken ab. Mal sehen vielleicht geht es ja wenn das von selsbt auslöst und nicht wenn ich den Schwimmer von hand betätige.

                                    Aphofis 1 Reply Last reply Reply Quote 0
                                    • Aphofis
                                      Aphofis @Aphofis last edited by Aphofis

                                      @aphofis sagte in Aquarium Wasserstand (Wasser Niveau Regulierung):

                                      @paul53
                                      Ja Logausgabe kam mit 7,004 Liter aber woher hat die Steuerung den Wert. Hatte den ja vor Script Start gelöscht.
                                      Ich Pumpe mal etwas Wasser aus dem Becken ab. Mal sehen vielleicht geht es ja wenn das von selsbt auslöst und nicht wenn ich den Schwimmer von hand betätige.

                                      Also Wasser Tag & Wasser Jahr bleibt auf null.
                                      Log Ausgabe sagt 0 liter sprich nur Jahr macht eine Ausgabe die tages angabe in ml fehlt.
                                      Telegram sagt auch nichts
                                      Counter wird sauber auf 0" gesetzt

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

                                        @aphofis sagte: Counter wird sauber auf 0" gesetzt

                                        Bevor er auf 0 gesetzt wird: Zeigt er die dosierte Wassermenge an?
                                        Er sollte nicht per Skript auf 0 gesetzt werden, denn das muss auch passieren, wenn der Sensorwert auf 0 gesetzt wird (httpGet).

                                        Der Sensorwert ändert sich und das Log mit Wassermenge in ml kommt?

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

                                          @paul53
                                          Hatte mal den javascript adapter neu gestartet nun werden ml Tag und Liter Jahr angezeigt und Telegram bekomme ich schon hin

                                          Aphofis 1 Reply Last reply Reply Quote 0
                                          • Aphofis
                                            Aphofis @Aphofis last edited by

                                            @paul53

                                            Hab ja die Steuerung jetzt schon ein paar Tage am laufen. Irgenwie reagiert die Steuerung nicht darauf wenn der Schwimmer true ist. wenn ich den Schwimmer von Hand einmal hoch ziehe also false setze und dann auf true los lasse dann erst reagiert die Steuerung.
                                            Ist da irgendwas falsch !?
                                            Momentan sieht es so aus.
                                            Screenshot 2024-08-13 054533.png

                                            <xml xmlns="https://developers.google.com/blockly/xml">
                                              <variables>
                                                <variable id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</variable>
                                                <variable id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</variable>
                                                <variable id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</variable>
                                                <variable type="timeout" id="timeout">timeout</variable>
                                              </variables>
                                              <block type="variables_set" id="HUSPsI8yrvs1R9buB5UE" x="-1212" y="-763">
                                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                <value name="VALUE">
                                                  <block type="math_arithmetic" id="e1#%MoOBW(WQNQtz+];;">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="get_value" id="|=$q%x;t`MAEW/vG=BLQ">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">sonoff.0.Aqua_Float.SENSOR.COUNTER.C2</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="j[l*MeT/~[+quhxnrS7C">
                                                        <field name="NUM">5.1</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="HchfBD.f$i=}z$B3%%ro">
                                                    <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                    <value name="VALUE">
                                                      <block type="get_value" id="M_~UzJP71@mQ8;LaEqA;">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="variables_set" id="eg3d1X/Cm`7YA1`r@6/5">
                                                        <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                        <value name="VALUE">
                                                          <block type="get_value" id="HFTLl.5s}DD!S3VkI2}w">
                                                            <field name="ATTR">val</field>
                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="on_ext" id="0:-d[({.Z}?pVdpxL($`">
                                                            <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="0W#F=X0/oRtnrPk9h3{x">
                                                                <field name="oid">sonoff.0.Aqua_Float.POWER</field>
                                                              </shadow>
                                                              <block type="text" id="*P`{6.y$Qz:6)XRyP/e.">
                                                                <field name="TEXT">sonoff.0.Aqua_Float.SENSOR.COUNTER.C2</field>
                                                              </block>
                                                            </value>
                                                            <statement name="STATEMENT">
                                                              <block type="variables_set" id=".o$v5mYbaxJ%Dy^rAJ~@">
                                                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                <value name="VALUE">
                                                                  <block type="math_rndfixed" id="~C}Q;4pD[j1fqWGOQbxr">
                                                                    <field name="n">2</field>
                                                                    <value name="x">
                                                                      <shadow type="math_number" id="sYM=iIrazCVz3G9{m*Wp">
                                                                        <field name="NUM">3.1234</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="Q,q,)Fqfx8Dcu]de0[XS">
                                                                        <field name="OP">MULTIPLY</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="f)g1|Fqv,`2l-1dYfZ34">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="on_source" id="3{.pWaaavxoM|Ix^BlA}">
                                                                            <field name="ATTR">state.val</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id=")SsRvEav^gC^x{KjjCyf">
                                                                            <field name="NUM">5.1</field>
                                                                          </shadow>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="update" id="?h=3;[vg7tLw)/h@7:$A">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="variables_get" id=",s^*MoNszpa:oog%EMAW">
                                                                        <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="debug" id="^-PLnz!%La/%esP+p|q%">
                                                                        <field name="Severity">info</field>
                                                                        <value name="TEXT">
                                                                          <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                                            <field name="TEXT">test</field>
                                                                          </shadow>
                                                                          <block type="text_join" id="oliPeI~VRSKRwW7]r|%]" inline="true">
                                                                            <mutation items="2"></mutation>
                                                                            <value name="ADD0">
                                                                              <block type="variables_get" id="-A9r0_TWSe~DfBweAXDt">
                                                                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="ADD1">
                                                                              <block type="text" id="8Ojo1T/MND*{-XQvij#:">
                                                                                <field name="TEXT"> ml</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </statement>
                                                            <next>
                                                              <block type="on" id=".Kws=H5v3:9sC$2y}XY.">
                                                                <field name="OID">sonoff.0.Aqua_Float.POWER</field>
                                                                <field name="CONDITION">ne</field>
                                                                <field name="ACK_CONDITION"></field>
                                                                <statement name="STATEMENT">
                                                                  <block type="control" id="`#?D6cI2R48DM4)iEV2)">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">sonoff.0.Aqua_Control.POWER1</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="on_source" id="Z:Ey]JGh2[+Z2p6CktfV">
                                                                        <field name="ATTR">state.val</field>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="controls_if" id="fwTIogd8xTfe{#gzL9Cn">
                                                                        <value name="IF0">
                                                                          <block type="logic_negate" id="U/Ou4#ODbm6%waUiXwK3">
                                                                            <value name="BOOL">
                                                                              <block type="on_source" id="LKR8T,H^%|Gh2gr{;F,#">
                                                                                <field name="ATTR">state.val</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <statement name="DO0">
                                                                          <block type="timeouts_settimeout" id="RtR6.MNo`wh`ud[PbJ]:">
                                                                            <field name="NAME">timeout</field>
                                                                            <field name="DELAY">15</field>
                                                                            <field name="UNIT">sec</field>
                                                                            <statement name="STATEMENT">
                                                                              <block type="math_change" id="IX/.|6z/Aro1]dY5SAYb">
                                                                                <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                                                <value name="DELTA">
                                                                                  <shadow type="math_number" id="=M*S)jZ,M4p(dx.CTNCh">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="su_iSda]mMUcg|Ylu@=o">
                                                                                    <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="update" id="fwHm}o7U6~1d|Z|{o_na">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="math_rndfixed" id=";]qdo[hKwhyu5U)H]|AP">
                                                                                        <field name="n">1</field>
                                                                                        <value name="x">
                                                                                          <shadow type="math_number" id="%/fU!@WL!D1NR8vZIXrJ">
                                                                                            <field name="NUM">3.1234</field>
                                                                                          </shadow>
                                                                                          <block type="variables_get" id=".$Y/`yQi2Ep48g$zUH!(">
                                                                                            <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                    <next>
                                                                                      <block type="math_change" id="|lE6{O$UQZ68v5$V-mhf">
                                                                                        <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                        <value name="DELTA">
                                                                                          <shadow type="math_number" id="r(O489L+4qKOus0|bJZ]">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="math_arithmetic" id="aUjod9%H]Jr`c:7;L`1L">
                                                                                            <field name="OP">DIVIDE</field>
                                                                                            <value name="A">
                                                                                              <shadow type="math_number" id="G]!BBiks_53Irs;)eRZ/">
                                                                                                <field name="NUM">1</field>
                                                                                              </shadow>
                                                                                              <block type="variables_get" id="==0y1MmV=A38?y{8!7Qp">
                                                                                                <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <shadow type="math_number" id="W)Ad2(Y4FzH8rN6?DDSG">
                                                                                                <field name="NUM">1000</field>
                                                                                              </shadow>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                        <next>
                                                                                          <block type="telegram" id="%Ac!=W);Rce9~t/iuvmU" collapsed="true">
                                                                                            <field name="INSTANCE">.0</field>
                                                                                            <field name="LOG"></field>
                                                                                            <field name="SILENT">FALSE</field>
                                                                                            <field name="PARSEMODE">default</field>
                                                                                            <field name="ESCAPING">FALSE</field>
                                                                                            <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                                                            <value name="MESSAGE">
                                                                                              <shadow type="text" id="/qlY{U].1kjbanyv~*S8">
                                                                                                <field name="TEXT">text</field>
                                                                                              </shadow>
                                                                                              <block type="text_join" id=";;6oqX}l/W(ws@3[8iFR" inline="false">
                                                                                                <mutation items="6"></mutation>
                                                                                                <value name="ADD0">
                                                                                                  <block type="math_rndfixed" id="I;(*n|Y1J;sj}Vs~,1w`">
                                                                                                    <field name="n">2</field>
                                                                                                    <value name="x">
                                                                                                      <shadow type="math_number" id="IZ`3Rk8S?(K[:=/b[Fvi">
                                                                                                        <field name="NUM">3.1234</field>
                                                                                                      </shadow>
                                                                                                      <block type="variables_get" id="wimbm((,ufreXmGowP_b">
                                                                                                        <field name="VAR" id="GnuRk+7KsY$0X2R3aUO1">Wassermenge</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="ADD1">
                                                                                                  <block type="text" id="e)3mz5qz)A1i;o:E{!47">
                                                                                                    <field name="TEXT"> ml</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="ADD2">
                                                                                                  <block type="text" id="We*0)kla7,,mg^N5.sPb">
                                                                                                    <field name="TEXT"> Wasser wurden dosiert</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="ADD3">
                                                                                                  <block type="text_newline" id="~nUOik7/[6b_mj-#r6(;">
                                                                                                    <field name="Type">\n</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="ADD4">
                                                                                                  <block type="math_rndfixed" id="4-Nd9(iT2OOMTVJH6gx6">
                                                                                                    <field name="n">1</field>
                                                                                                    <value name="x">
                                                                                                      <shadow type="math_number" id="%/fU!@WL!D1NR8vZIXrJ">
                                                                                                        <field name="NUM">3.1234</field>
                                                                                                      </shadow>
                                                                                                      <block type="variables_get" id="n+Wsz3PbGc-kKOFZzy/6">
                                                                                                        <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="ADD5">
                                                                                                  <block type="text" id="f_S0X,P8Fohvyjt[~}Wt">
                                                                                                    <field name="TEXT"> Liter wurden dieses Jahr dosiert</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                            <next>
                                                                                              <block type="update" id="v@JXdPp^SX$e}[;*TN;5">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="math_rndfixed" id="H]3.WGAtE,UJ;+O:yMqK">
                                                                                                    <field name="n">3</field>
                                                                                                    <value name="x">
                                                                                                      <shadow type="math_number" id="%?~4gjL?h%jK9FuG!MeL">
                                                                                                        <field name="NUM">3.1234</field>
                                                                                                      </shadow>
                                                                                                      <block type="variables_get" id="/n6Y=9C~2W@KV$RXN-DW">
                                                                                                        <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <next>
                                                                                                  <block type="update" id="`NW9_QcSlKGP;b[9@.QH">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="math_number" id="|m|G@]xx7.d^nS-E2Q,B">
                                                                                                        <field name="NUM">0</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <next>
                                                                                                      <block type="debug" id="ESkP;ss;~ZDB;gISHFI]">
                                                                                                        <field name="Severity">info</field>
                                                                                                        <value name="TEXT">
                                                                                                          <shadow type="text" id="W!}jJFO{vTG9fL(st@|Z">
                                                                                                            <field name="TEXT">test</field>
                                                                                                          </shadow>
                                                                                                          <block type="text_join" id="R[aL32f3![219OSKE$k!" inline="true">
                                                                                                            <mutation items="2"></mutation>
                                                                                                            <value name="ADD0">
                                                                                                              <block type="variables_get" id="Y%f8;@,D;lNrR?pmQ|(Z">
                                                                                                                <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                            <value name="ADD1">
                                                                                                              <block type="text" id="q=ZJuFoniJND[_z;_j~M">
                                                                                                                <field name="TEXT"> Liter</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <next>
                                                                                                          <block type="http_get" id="e9^C0,Xruq+R^Q=|k3dc">
                                                                                                            <field name="TIMEOUT">10</field>
                                                                                                            <field name="UNIT">sec</field>
                                                                                                            <field name="TYPE">text</field>
                                                                                                            <value name="URL">
                                                                                                              <shadow type="text" id=",_J4F8mdkf!o;QG{KC2z">
                                                                                                                <field name="TEXT">http://192.168.0.71/cm?cmnd=counter2 0</field>
                                                                                                              </shadow>
                                                                                                            </value>
                                                                                                          </block>
                                                                                                        </next>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </statement>
                                                                          </block>
                                                                        </statement>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </statement>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                              <block type="schedule" id="eY2k):|9:7y;jFJ|-e{." x="-437" y="-687">
                                                <field name="SCHEDULE">0 0 1 1 *</field>
                                                <statement name="STATEMENT">
                                                  <block type="variables_set" id="cEkH53kNZuyOARmP+Q|,">
                                                    <field name="VAR" id="1Q4.:OQ6u!U%3ez6^aej">Wasser_Jahr</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="9;ptE-Ve[-8t]`aa|Tgl">
                                                        <field name="NUM">0</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="update" id="|*@i5i^pfX8@UCo}nN4j">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="27z6jlXz=#}B7;,?{V7M">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="schedule" id="!0s4!(IKf352-$Cjs+=H">
                                                    <field name="SCHEDULE">0 0 * * *</field>
                                                    <statement name="STATEMENT">
                                                      <block type="variables_set" id="u2/ozk5F`Si~3`_cLs4`">
                                                        <field name="VAR" id="8TTn.0gElhjE;FlI3{:~">Wasser_Tag</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="kQwxXS=Yw7,Q5s]YKP}*">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="update" id=",B.vece!}v4W4j`J0O1r">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_number" id="(P{ST5UTzs=*|2/~;Z+d">
                                                                <field name="NUM">0</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </statement>
                                                  </block>
                                                </next>
                                              </block>
                                            </xml>
                                            
                                            paul53 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            731
                                            Online

                                            31.9k
                                            Users

                                            80.3k
                                            Topics

                                            1.3m
                                            Posts

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