Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Osmose Wasser Aktuell & Max Verbrauch

    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

    [gelöst] Osmose Wasser Aktuell & Max Verbrauch

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

      Was soll ich sagen es läuft!!!
      Der Hammer das ist es Mega spitze
      9C1A47BE-2891-4BA2-A475-2385611274C3.jpeg

      Ich danke dir vielmals.
      Jetzt muss ich mich dran machen die Werte in eine Datenbank zu bekommen damit ich Diagramme per vis darstellen kann.
      Maria DB ist schon auf meinem NAS installiert!
      Nur wie am besten mit ioBroker verknüpfen und wie ich per Blockly die Daten da rein bekomme muss ich mich erstmal schlau machen.
      Man lernt ja nie aus.
      Nur verstehe ich es noch nicht wie der Zusammenhang ist
      Wert; letzteÄnderung ; vorherigeLetzteÄnderung
      Warum nicht Wert ist mir noch nicht verständlich.
      Ich gucke mir heute Abend mal an was ich falsch gemacht habe.
      Vielen Dank

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

        @Aphofis sagte:

        Warum nicht Wert ist mir noch nicht verständlich.

        nicht Wert : Wert == falsch : Ventil schließt

        @Aphofis sagte in Osmose Wasser Aktuell & Max Verbrauch Hilfe!!!:

        Wert; letzteÄnderung ; vorherigeLetzteÄnderung

        letzte Änderung: Zeitpunkt vom Schließen des Ventils (in ms seit 1.1.1970)
        vorherige letzte Änderung: Zeitpunkt vom Öffnen des Ventils

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

          @paul53
          Ok verstanden!
          Vielen dank
          So langsam steige ich hinter die Logik von Blockly

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

            @Aphofis sagte:

            So langsam steige ich hinter die Logik von Blockly

            Wert; letzteÄnderung ; vorherigeLetzteÄnderung

            sind ioBroker-spezifisch.

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

              @paul53
              Die Liste ist gut! Dann kann ich mir eine Menge ableiten.
              Habe jetzt auf deinen Rat einen neuen Datenpunkt im root erstellt und alle Unter Datenpunkte darin neu erstellt.
              Aus dem Admin ist der Haupt Datenpunkt jetzt raus! und alle Steuerungen umgestellt auf die neuen Datenpunkte.
              Ich denke Datenbank wird auch eine härtere Nuß für mich.
              MariaDB ist schon per sql Adapter verknüpft aber um da was einzutragen muss ich mich erstmal ein wenig einlesen.
              Schon mal toll solche Menschen wie dich hier zu haben, die einem so enorm weiter helfen.
              Danke noch mal

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

                Wen es interessiert, und @paul53
                ich hoffe ich habe das so richtig übersetzt.
                Das ist eine Steuerung die meinen Vlies Verbrauch anzeigt und ermittelt.
                Durch stoppen der Zeit für 10 cm habe ich den multiplikator ermittelt.

                Die erstellten Datenpunkte zu dieser Steuerung
                Bildschirmfoto 2019-07-30 um 17.05.56.png
                Mit cm pro Tag count habe ich noch was anderes vor aber ist erstmal außen vor und der Max Wert und cm pro Tag Werte stimmen natürlich nicht da ich zum testen den Vlies Motor mehrmals laufen lassen musste.
                Der Tagesverbrauch liegt bei mir ca bei 30-40 cm. Den ich jetzt sehr genau ausgegeben bekomme.
                Bildschirmfoto 2019-07-30 um 17.29.57.png

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

                  Der Code dazu Teil 1

                  <xml xmlns="http://www.w3.org/1999/xhtml">
                    <variables>
                      <variable type="" id="V]/%u4JGSoxh-Al{eT.g">cm_pro_Tag</variable>
                      <variable type="" id="ihvas_{d.kg4gRlA_SmF">cm_komulativ</variable>
                      <variable type="" id="n:v;eT@?L%cbL{M}xt_E">Differenz</variable>
                      <variable type="" id="ckVaiUkVWNw*nrHYt1ho">cm_Aktuell</variable>
                    </variables>
                    <block type="variables_set" id="J.74*3iWof~,6Kx}~#T," x="-487" y="-87">
                      <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                      <value name="VALUE">
                        <block type="get_value" id="!`-7w4Ob%M?7ztU!UD!8">
                          <field name="ATTR">val</field>
                          <field name="OID">Aqua_Control.0.cm_pro_Tag</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="r9eO:=nj*R8[_VP#N.B#">
                          <field name="VAR" id="ihvas_{d.kg4gRlA_SmF" variabletype="">cm_komulativ</field>
                          <value name="VALUE">
                            <block type="get_value" id="o`iB.H?7RH[)vaB~x33:">
                              <field name="ATTR">val</field>
                              <field name="OID">Aqua_Control.0.cm_Max</field>
                            </block>
                          </value>
                          <next>
                            <block type="comment" id="5_dAu$u@jE|TAgl|;,XY">
                              <field name="COMMENT">Magnetventil</field>
                              <next>
                                <block type="on_ext" id=":Nr`7Jva*j~6F*k.h/^F">
                                  <mutation items="1"></mutation>
                                  <field name="CONDITION">ne</field>
                                  <field name="ACK_CONDITION"></field>
                                  <value name="OID0">
                                    <shadow type="field_oid" id="eXd?Hfx6K/{9#D2So~zg">
                                      <field name="oid">rpi2.0.gpio.13.state</field>
                                    </shadow>
                                  </value>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id=",3lQx[D^fe0|wZv07i:F">
                                      <value name="IF0">
                                        <block type="logic_negate" id="5YH|]f]Y8q~OZzn6dp~c">
                                          <value name="BOOL">
                                            <block type="on_source" id="7V.$(3ehpmvx4I8d18aw">
                                              <field name="ATTR">state.val</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="comment" id="0_SP-:jo/~zs;Y(enH9B">
                                          <field name="COMMENT">1.1.1970 bis wert aktiv minus aktuelle zeit</field>
                                          <next>
                                            <block type="variables_set" id="72%z_H5G5)(I?g,6w}y4">
                                              <field name="VAR" id="n:v;eT@?L%cbL{M}xt_E" variabletype="">Differenz</field>
                                              <value name="VALUE">
                                                <block type="math_arithmetic" id="hbDOS/*?OV7f*;K%5]/B">
                                                  <field name="OP">MINUS</field>
                                                  <value name="A">
                                                    <shadow type="math_number" id="1qz=5}09VW70aU;#1XFo">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                    <block type="on_source" id="vRHoi8S{X(;fi6|?CNdR">
                                                      <field name="ATTR">state.lc</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <shadow type="math_number" id="igjc3(uZ:S);a(CB+~6G">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                    <block type="on_source" id="4o,`J,IU$mwUfG~ldTcS">
                                                      <field name="ATTR">oldState.lc</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="comment" id="biINHf0{3Ed{bF)P{V].">
                                                  <field name="COMMENT">gemessene Zeit mal multiplikator um cm zu erlangen</field>
                                                  <next>
                                                    <block type="variables_set" id="m=_{N_=!`*U)%~+=6k)M">
                                                      <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                      <value name="VALUE">
                                                        <block type="math_arithmetic" id="4kRl.?`8|Mh3F%NpuU)o">
                                                          <field name="OP">MULTIPLY</field>
                                                          <value name="A">
                                                            <shadow type="math_number" id="1qz=5}09VW70aU;#1XFo">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id="Mhz6a_f|)g9t_NoX-J4o">
                                                              <field name="VAR" id="n:v;eT@?L%cbL{M}xt_E" variabletype="">Differenz</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow type="math_number" id="igjc3(uZ:S);a(CB+~6G">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="get_value" id="JvRB[I?w$,K)uyI4f^bs">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">Aqua_Control.0.cm_multiplikator</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="comment" id="-qlvZlbKsCcmbXA9[|dQ">
                                                          <field name="COMMENT">Datenpunkt cm Aktuell wird mit intern </field>
                                                          <next>
                                                            <block type="comment" id="=TI;v|K0P/XkMYJe@(7t">
                                                              <field name="COMMENT">cm Aktuell aktualisiert</field>
                                                              <next>
                                                                <block type="update" id="$L)rekVx6$I,%e;4apgW">
                                                                  <mutation delay_input="false"></mutation>
                                                                  <field name="OID">Aqua_Control.0.cm_Aktuell</field>
                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                  <value name="VALUE">
                                                                    <block type="math_rndfixed" id="`T$g_{-$PLe-SSBp~eRc">
                                                                      <field name="n">2</field>
                                                                      <value name="x">
                                                                        <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                          <field name="NUM">3.1234</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="f0]0D7lYkKvj8_p~z.%d">
                                                                          <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="comment" id="8a~s%M,NvYZjsSVhP.Ud">
                                                                      <field name="COMMENT">Gesamtverbrauch intern wird derm aktuell </field>
                                                                      <next>
                                                                        <block type="comment" id="vk3Hj5QI)t6bELlMM-PT">
                                                                          <field name="COMMENT">gemessenem internen Wert dazu addiert</field>
                                                                          <next>
                                                                            <block type="math_change" id="i##pC}m@FZYhZ+UJ#P?b">
                                                                              <field name="VAR" id="ihvas_{d.kg4gRlA_SmF" variabletype="">cm_komulativ</field>
                                                                              <value name="DELTA">
                                                                                <shadow type="math_number" id="rjS|:BdoUJX*N=n`Ji[]">
                                                                                  <field name="NUM">1</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="CpXbPP;H9nIQMrU;Uq)1">
                                                                                  <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="comment" id="w6gH[QW1DueK!oW_i)jC">
                                                                                  <field name="COMMENT">aktueller interner Wert wird zum Tagesverbrauch</field>
                                                                                  <next>
                                                                                    <block type="comment" id="U(z%AO%43jU$y9N,z+58">
                                                                                      <field name="COMMENT">intern dazu addiert</field>
                                                                                      <next>
                                                                                        <block type="math_change" id="{qy46Yh1+,z@=wazF=Sa">
                                                                                          <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                                                                                          <value name="DELTA">
                                                                                            <shadow type="math_number" id=":iELaSM8MUE{v_j{wKtM">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="variables_get" id="Uln@f]L*.73;Q))();nx">
                                                                                              <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                                                            </block>
                                                                                          </value>
                                                                                          <next>
                                                                                            <block type="comment" id="dlfZO9!sy]A{G$K%3LgU">
                                                                                              <field name="COMMENT">Datenpunkt Max Verbrauch wird um </field>
                                                                                              <next>
                                                                                                <block type="comment" id="G7JT#a`YFY$^Z8D@[(aj">
                                                                                                  <field name="COMMENT">den wert cm komulativ erweitert</field>
                                                                                                  <next>
                                                                                                    <block type="update" id="Aoq8WBDY@Hokp`)m4/4X">
                                                                                                      <mutation delay_input="false"></mutation>
                                                                                                      <field name="OID">Aqua_Control.0.cm_Max</field>
                                                                                                      <field name="WITH_DELAY">FALSE</field>
                                                                                                      <value name="VALUE">
                                                                                                        <block type="math_rndfixed" id="OzOc$JV79+l5~%[*Ls3q">
                                                                                                          <field name="n">2</field>
                                                                                                          <value name="x">
                                                                                                            <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                              <field name="NUM">3.1234</field>
                                                                                                            </shadow>
                                                                                                            <block type="variables_get" id="BspaT@-^5ZEI+SkZI[Mk">
                                                                                                              <field name="VAR" id="ihvas_{d.kg4gRlA_SmF" variabletype="">cm_komulativ</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                      <next>
                                                                                                        <block type="comment" id="IpzJrPC/%Z]h.1cC%Rb%">
                                                                                                          <field name="COMMENT">Datenpunkt cm pro Tag wird um </field>
                                                                                                          <next>
                                                                                                            <block type="comment" id="mfr{3K9P[Z)cl(lf$fdO">
                                                                                                              <field name="COMMENT">den internen wert cm pro Tag erweitert</field>
                                                                                                              <next>
                                                                                                                <block type="update" id="@DXH()Q[2XD)B|wzZ3,1">
                                                                                                                  <mutation delay_input="false"></mutation>
                                                                                                                  <field name="OID">Aqua_Control.0.cm_pro_Tag</field>
                                                                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                                                                  <value name="VALUE">
                                                                                                                    <block type="math_round" id="0:*{$@p/*@-:+y#dr$zh">
                                                                                                                      <field name="OP">ROUND</field>
                                                                                                                      <value name="NUM">
                                                                                                                        <shadow type="math_number" id="@}^3%9A.jmf{F%7.Li8b">
                                                                                                                          <field name="NUM">3.1</field>
                                                                                                                        </shadow>
                                                                                                                        <block type="variables_get" id="QCo;X6-+|)pOF#Zl*cIe">
                                                                                                                          <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                                                                                                                        </block>
                                                                                                                      </value>
                                                                                                                    </block>
                                                                                                                  </value>
                                                                                                                  <next>
                                                                                                                    <block type="update" id="W(KDa:5=i!wuWK%}[)9v">
                                                                                                                      <mutation delay_input="false"></mutation>
                                                                                                                      <field name="OID">Aqua_Control.0.cm_pro_Tag_count</field>
                                                                                                                      <field name="WITH_DELAY">FALSE</field>
                                                                                                                      <value name="VALUE">
                                                                                                                        <block type="math_round" id="UDqHQ8(*Q:mP3pndH_=`">
                                                                                                                          <field name="OP">ROUND</field>
                                                                                                                          <value name="NUM">
                                                                                                                            <shadow type="math_number" id="@}^3%9A.jmf{F%7.Li8b">
                                                                                                                              <field name="NUM">3.1</field>
                                                                                                                            </shadow>
                                                                                                                            <block type="variables_get" id="g_^nhz*Y6k=+pA2.2;U:">
                                                                                                                              <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                                                                                                                            </block>
                                                                                                                          </value>
                                                                                                                        </block>
                                                                                                                      </value>
                                                                                                                      <next>
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • Aphofis
                    Aphofis last edited by

                    Code Teil 2:

                                                                                                                          <block type="comment" id="YBYn$);:m{JKll-eoAq*">
                                                                                                                            <field name="COMMENT">debug Information cm Aktuell wird geschrieben</field>
                                                                                                                            <next>
                                                                                                                              <block type="debug" id=";-vf26IOUB^od6zf#o6s">
                                                                                                                                <field name="Severity">log</field>
                                                                                                                                <value name="TEXT">
                                                                                                                                  <shadow type="text" id=".;Y[}a(8N_h0U)l?C.9:">
                                                                                                                                    <field name="TEXT">test</field>
                                                                                                                                  </shadow>
                                                                                                                                  <block type="text_join" id="8!r$|^=,t[#JNZLQx94j">
                                                                                                                                    <mutation items="3"></mutation>
                                                                                                                                    <value name="ADD0">
                                                                                                                                      <block type="text" id="r;GezYi}HE=H%]vDDLw4">
                                                                                                                                        <field name="TEXT">Vliesverbrauch Aktuell </field>
                                                                                                                                      </block>
                                                                                                                                    </value>
                                                                                                                                    <value name="ADD1">
                                                                                                                                      <block type="math_rndfixed" id="61m!Va3FI+*)OeaUc!J]">
                                                                                                                                        <field name="n">2</field>
                                                                                                                                        <value name="x">
                                                                                                                                          <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                                                            <field name="NUM">3.1234</field>
                                                                                                                                          </shadow>
                                                                                                                                          <block type="variables_get" id="jlT*`^NkkJGXF1HToYGY">
                                                                                                                                            <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                                                                                                          </block>
                                                                                                                                        </value>
                                                                                                                                      </block>
                                                                                                                                    </value>
                                                                                                                                    <value name="ADD2">
                                                                                                                                      <block type="text" id="GJgiit^A/ocxR|R1|=Ec">
                                                                                                                                        <field name="TEXT"> cm</field>
                                                                                                                                      </block>
                                                                                                                                    </value>
                                                                                                                                  </block>
                                                                                                                                </value>
                                                                                                                                <next>
                                                                                                                                  <block type="comment" id="ycRu-bUF@.zKp{0$T(.x">
                                                                                                                                    <field name="COMMENT">debug Information Max Verbrauch wird geschrieben</field>
                                                                                                                                    <next>
                                                                                                                                      <block type="debug" id="HTt5R[I*-hwd.gKyl0{{">
                                                                                                                                        <field name="Severity">log</field>
                                                                                                                                        <value name="TEXT">
                                                                                                                                          <shadow type="text" id=".;Y[}a(8N_h0U)l?C.9:">
                                                                                                                                            <field name="TEXT">test</field>
                                                                                                                                          </shadow>
                                                                                                                                          <block type="text_join" id="FErg(6m]tZt5$=?8Ut5^">
                                                                                                                                            <mutation items="3"></mutation>
                                                                                                                                            <value name="ADD0">
                                                                                                                                              <block type="text" id="h|=sT+)M-v/mq%hrnL5a">
                                                                                                                                                <field name="TEXT">Vliesverbrauch Gesamt </field>
                                                                                                                                              </block>
                                                                                                                                            </value>
                                                                                                                                            <value name="ADD1">
                                                                                                                                              <block type="math_rndfixed" id="8J1lCb1g%$wdUkP,-#l|">
                                                                                                                                                <field name="n">2</field>
                                                                                                                                                <value name="x">
                                                                                                                                                  <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                                                                    <field name="NUM">3.1234</field>
                                                                                                                                                  </shadow>
                                                                                                                                                  <block type="variables_get" id="hm55C@pg}Ti[rjK+,]k|">
                                                                                                                                                    <field name="VAR" id="ihvas_{d.kg4gRlA_SmF" variabletype="">cm_komulativ</field>
                                                                                                                                                  </block>
                                                                                                                                                </value>
                                                                                                                                              </block>
                                                                                                                                            </value>
                                                                                                                                            <value name="ADD2">
                                                                                                                                              <block type="text" id="`?Q85d+`MK=Y/5c,(Pp#">
                                                                                                                                                <field name="TEXT"> cm</field>
                                                                                                                                              </block>
                                                                                                                                            </value>
                                                                                                                                          </block>
                                                                                                                                        </value>
                                                                                                                                        <next>
                                                                                                                                          <block type="comment" id="cD*27_Y2tdw_GIyTU:Nv">
                                                                                                                                            <field name="COMMENT">Telegram Nachricht mit allen drei internen Werten</field>
                                                                                                                                            <next>
                                                                                                                                              <block type="comment" id="-L^:9Vmxh6uV*(W2t7uk">
                                                                                                                                                <field name="COMMENT">Telegram Nachricht mit allen drei internen Werten</field>
                                                                                                                                                <next>
                                                                                                                                                  <block type="telegram" id=",@Yhs5!tBj$jfQkF(0D{">
                                                                                                                                                    <field name="INSTANCE">.0</field>
                                                                                                                                                    <field name="LOG"></field>
                                                                                                                                                    <field name="SILENT">FALSE</field>
                                                                                                                                                    <field name="PARSEMODE">default</field>
                                                                                                                                                    <value name="MESSAGE">
                                                                                                                                                      <shadow type="text" id="$7Ei82pQ9.H~Qau_xGtl">
                                                                                                                                                        <field name="TEXT">text</field>
                                                                                                                                                      </shadow>
                                                                                                                                                      <block type="text_join" id="ZF0d^xTq54,5[,cG_O~^">
                                                                                                                                                        <mutation items="11"></mutation>
                                                                                                                                                        <value name="ADD0">
                                                                                                                                                          <block type="text" id="~fGE@/olLb6IARVi5rQ0">
                                                                                                                                                            <field name="TEXT">Vliesverbrauch Aktuell </field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD1">
                                                                                                                                                          <block type="math_rndfixed" id="BX|mK)HM[k!~]pXVFWH)">
                                                                                                                                                            <field name="n">2</field>
                                                                                                                                                            <value name="x">
                                                                                                                                                              <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                                                                                <field name="NUM">3.1234</field>
                                                                                                                                                              </shadow>
                                                                                                                                                              <block type="variables_get" id="-C`@AJ-i!d6s{8M}#msA">
                                                                                                                                                                <field name="VAR" id="ckVaiUkVWNw*nrHYt1ho" variabletype="">cm_Aktuell</field>
                                                                                                                                                              </block>
                                                                                                                                                            </value>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD2">
                                                                                                                                                          <block type="text" id="Z]N}.Z]:$!G4#Opbd;A6">
                                                                                                                                                            <field name="TEXT"> cm</field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD3">
                                                                                                                                                          <block type="text_newline" id="ml(ZU9/TVRa?B*_=V3yu">
                                                                                                                                                            <field name="Type">\n</field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD4">
                                                                                                                                                          <block type="text" id="=uXX~-{YU!^Hg7j(4g^2">
                                                                                                                                                            <field name="TEXT">Vlies Tagesverbrauch </field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD5">
                                                                                                                                                          <block type="math_rndfixed" id="8OofUBN*wRP)VlI#cP(z">
                                                                                                                                                            <field name="n">2</field>
                                                                                                                                                            <value name="x">
                                                                                                                                                              <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                                                                                <field name="NUM">3.1234</field>
                                                                                                                                                              </shadow>
                                                                                                                                                              <block type="variables_get" id="2hm2SmFaEsAB5U0=G+f?">
                                                                                                                                                                <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                                                                                                                                                              </block>
                                                                                                                                                            </value>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD6">
                                                                                                                                                          <block type="text" id="c~Ze|7F~$iC]x[VTs=T3">
                                                                                                                                                            <field name="TEXT"> cm</field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD7">
                                                                                                                                                          <block type="text_newline" id=")HorE+M1}k1cG#P4Nn_+">
                                                                                                                                                            <field name="Type">\n</field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD8">
                                                                                                                                                          <block type="text" id="I/X9x)QtAlGRgQI^qzLq">
                                                                                                                                                            <field name="TEXT">Vliesverbrauch gesamt </field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD9">
                                                                                                                                                          <block type="math_rndfixed" id="P;:cCx/oPZM-1^LquZ/p">
                                                                                                                                                            <field name="n">2</field>
                                                                                                                                                            <value name="x">
                                                                                                                                                              <shadow type="math_number" id="+-xoJC%#+sANg_OJ={H8">
                                                                                                                                                                <field name="NUM">3.1234</field>
                                                                                                                                                              </shadow>
                                                                                                                                                              <block type="variables_get" id="yifK::$6eUEi^oGk_(q[">
                                                                                                                                                                <field name="VAR" id="ihvas_{d.kg4gRlA_SmF" variabletype="">cm_komulativ</field>
                                                                                                                                                              </block>
                                                                                                                                                            </value>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                        <value name="ADD10">
                                                                                                                                                          <block type="text" id="!IRV9q+z,[`0#l]#ea]!">
                                                                                                                                                            <field name="TEXT"> cm</field>
                                                                                                                                                          </block>
                                                                                                                                                        </value>
                                                                                                                                                      </block>
                                                                                                                                                    </value>
                                                                                                                                                  </block>
                                                                                                                                                </next>
                                                                                                                                              </block>
                                                                                                                                            </next>
                                                                                                                                          </block>
                                                                                                                                        </next>
                                                                                                                                      </block>
                                                                                                                                    </next>
                                                                                                                                  </block>
                                                                                                                                </next>
                                                                                                                              </block>
                                                                                                                            </next>
                                                                                                                          </block>
                                                                                                                        </next>
                                                                                                                      </block>
                                                                                                                    </next>
                                                                                                                  </block>
                                                                                                                </next>
                                                                                                              </block>
                                                                                                            </next>
                                                                                                          </block>
                                                                                                        </next>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="comment" id="[*LdX;p+0u?!x)JR`Tuu">
                                        <field name="COMMENT">Datenpunkt wie interner Wert vom Tagesverbrauch</field>
                                        <next>
                                          <block type="comment" id="rgm3:XiS;abWA[JD$V![">
                                            <field name="COMMENT">werden alle 24 Std. zurückgesetzt</field>
                                            <next>
                                              <block type="schedule" id="@{?t*Kbp)#F%kZ.QV7-P">
                                                <field name="SCHEDULE">0 0 * * *</field>
                                                <statement name="STATEMENT">
                                                  <block type="comment" id="RYsm.L_lmjBfK5|Rw]Vl">
                                                    <field name="COMMENT">cm pro Tag intern wird auf null gesetzt</field>
                                                    <next>
                                                      <block type="variables_set" id="]hBT|HYa,^+;/_URpFpc">
                                                        <field name="VAR" id="V]/%u4JGSoxh-Al{eT.g" variabletype="">cm_pro_Tag</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="/3j~a_2+DU]a%4W0RpQ(">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="comment" id="oj#8:ul0P~=_t/o$:i57">
                                                            <field name="COMMENT">Datenpunkt cm pro Tag wird auf null gesetzt</field>
                                                            <next>
                                                              <block type="update" id=",5mG65Imrygz=PxUUDZ:">
                                                                <mutation delay_input="false"></mutation>
                                                                <field name="OID">Aqua_Control.0.ml_pro_Tag</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_number" id="IEw|b8lc[)=9`zq5COIW">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </xml>
                    
                    1 Reply Last reply Reply Quote 0
                    • Aphofis
                      Aphofis last edited by Aphofis

                      @paul53
                      ist es möglich Osmose_Max den Wert manuell intern zu setzen?
                      Da ich mist gebaut habe und der zähler wieder von vorne anfängt !?
                      Weil wenn ich den Wert im Datenpunkt korrigiere wird er beim nachsten Pumpen wieder zurück auf Anfang gesetzt.
                      woher bekommt ml_komulativ den Wert wenn nicht aus dem Datenpunkt!?

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

                        @Aphofis sagte:

                        wenn ich den Wert im Datenpunkt korrigiere wird er beim nachsten Pumpen wieder zurück auf Anfang gesetzt.

                        Du kannst den Wert manuell korrigieren und anschließend das Skript neu starten, damit der Wert in die Variable übernommen wird.

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

                          @paul53
                          ok i will try

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

                            @paul53
                            Du bist ne Wucht !!! Auch wenns einfach ist, muss man sowas erstmal wissen.
                            Es hat geklappt, beim Vlies und beim Osmose Verbrauch. Danke
                            Daten werden auch alle fleißig in der Datenbank geloggt.
                            Nur werden auch werte mit Wert - null - geloggt, das natürlich nicht so schön und dazu kommt noch das mein Flot Adapter nicht funktioniert. Hab schon Flot deinstalliert ob über iobroker und über ssh und auch über beide Wege neu installiert! keine Chance.
                            Wenn ich Flot aufrufen will, kommt eine Fehler Meldung auf dem neuen Tab:
                            File edit.html not found: permissionError
                            Wenn ich mir die Charts angucken will in einem Datenpunkt von dem sql Adapter kommt keine Grafik.
                            Hab schon überall im Netz nach dem Fehler gesucht, doch leider kein Erfolg.

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

                              @Aphofis sagte:

                              Wenn ich Flot aufrufen will, kommt eine Fehler Meldung auf dem neuen Tab: File edit.html not found: permissionError

                              Mache dazu besser ein neues Thema auf, denn es geht in diesem Thema hier unter.
                              Bitte noch die Überschrift um [gelöst] ergänzen.

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

                                Na klar mach ich das ! Wollte dir nur den Stand der Dinge mitteilen.

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

                                  @paul53
                                  Kannst du mir einen Riesen gefallen tun und mal drüber gucken
                                  Beide Steuerungen für Vlies Verbrauch in cm und osmose Verbrauch in ml spinnen.
                                  Ich habe neue datenpunkte angelegt in datenpunkt Ordnern und in den Steuerungen alles sauber neu verknüpft.
                                  Doch nach dem ich beide Steuerungen eingeschaltet hatte, und Osmose oder Vlies läuft
                                  Wird cm_Max auf den Wert von cm_Aktuell gestellt und cm_pro_Tag cm_pro_Tag_count werden aufgerundet auf den cm_Aktuell wert.
                                  Da stimmt was nicht und ich verstehe es nicht.
                                  Hab schon beide Steuerungen mehrfach kontrolliert und deaktiviert, werte manuell geändert Scripte gestartet und immer wieder werden die Werte nicht ergänzt sondern mit dem falschen Wert aktualisiert.
                                  Das wäre sehr nett wenn du mir helfen könntest.

                                  var cm_pro_Tag, cm_komulativ, Differenz, cm_Aktuell;
                                  
                                  
                                  cm_pro_Tag = getState("Aqua_Control.0.Vliesfilter.cm_pro_Tag").val;
                                  cm_komulativ = getState("Aqua_Control.0.Vliesfilter.cm_Max").val;
                                  on({id: 'rpi2.0.gpio.20.state', change: "ne"}, function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (!(obj.state ? obj.state.val : "")) {
                                      Differenz = (obj.state ? obj.state.lc : "") - (obj.oldState ? obj.oldState.lc : "");
                                      cm_Aktuell = Differenz * getState("Aqua_Control.0.Vliesfilter.cm_multiplikator").val;
                                      setState("Aqua_Control.0.Vliesfilter.cm_Aktuell"/*cm_Aktuell*/, Math.round(cm_Aktuell*100)/100, true);
                                      cm_komulativ = (typeof cm_komulativ == 'number' ? cm_komulativ : 0) + cm_Aktuell;
                                      cm_pro_Tag = (typeof cm_pro_Tag == 'number' ? cm_pro_Tag : 0) + cm_Aktuell;
                                      setState("Aqua_Control.0.Vliesfilter.cm_Max"/*cm_Max*/, Math.round(cm_komulativ*100)/100, true);
                                      setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag"/*cm_pro_Tag*/, (Math.round(cm_pro_Tag)), true);
                                      setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag_count"/*cm_pro_Tag_count*/, (Math.round(cm_pro_Tag)), true);
                                      sendTo("telegram.0", "send", {
                                          text: (['Vliesverbrauch Aktuell ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_Aktuell").val*100)/100,' cm','\n','Vlies Tagesverbrauch ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_pro_Tag").val*100)/100,' cm','\n','Vliesverbrauch gesamt ',Math.round((getState("Aqua_Control.0.Vliesfilter.cm_Max").val / 100)*100)/100,' Meter'].join(''))
                                      });
                                      console.log((['Vliesverbrauch Aktuell ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_Aktuell").val*100)/100,' cm'].join('')));
                                      console.log((['Vliesverbrauch Gesamt ',Math.round((getState("Aqua_Control.0.Vliesfilter.cm_Max").val / 100)*100)/100,'  cm'].join('')));
                                    }
                                  });
                                  schedule("0 0 * * *", function () {
                                    cm_pro_Tag = 0;
                                    setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag"/*cm_pro_Tag*/, 0, true);
                                    setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag_count"/*cm_pro_Tag_count*/, 0, true);
                                  });
                                  
                                  

                                  Und noch komischer ist, in telegram werden die richtigen Werte angezeigt. Hatte auch mal unter Objekte den Experten Modus eingeschaltet nicht das die alten datenpunkte noch da sind aber sind sie nicht das da irgendwas durcheinander gekommen ist.

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

                                    @Aphofis
                                    Was ist der Unterschied zwischen "cm_pro_Tag" und "cm_pro_Tag_count" ? Ich kann keinen Unterschied erkennen.
                                    Für Telegram und Log verwende die Variablen cm_Aktuell, cm_komulativ und cm_pro_Tag, denn das Einlesen der Datenpunkte liefert einen veralteten Wert vom vorherigen Trigger.

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

                                      @paul53
                                      count war eigntl gedacht um zu zählen wie oft bzw wie lange osmose oder der vlies filter am tag läuft also wie lange auf true stand und wie oft true an war.
                                      dH. ich muss count raus nehmen !?
                                      Die werte kommen doch aus den Datenpunkten doch wenn ich die beiden scripte stoppe dann die Daten in den Datenpunkten so einstelle wie es gehört und die Scripte wieder starte schmeissen beide die Daten raus bei max und bei tages verbrauch.

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

                                        Vliesverbrauch sieht dann so aus:

                                        var cm_pro_Tag, cm_komulativ, Differenz, cm_Aktuell;
                                        
                                        
                                        cm_pro_Tag = getState("Aqua_Control.0.Vliesfilter.cm_pro_Tag").val;
                                        cm_komulativ = getState("Aqua_Control.0.Vliesfilter.cm_Max").val;
                                        on({id: 'rpi2.0.gpio.20.state', change: "ne"}, function (obj) {
                                          var value = obj.state.val;
                                          var oldValue = obj.oldState.val;
                                          if (!(obj.state ? obj.state.val : "")) {
                                            Differenz = (obj.state ? obj.state.lc : "") - (obj.oldState ? obj.oldState.lc : "");
                                            cm_Aktuell = Differenz * getState("Aqua_Control.0.Vliesfilter.cm_multiplikator").val;
                                            setState("Aqua_Control.0.Vliesfilter.cm_Aktuell"/*cm_Aktuell*/, Math.round(cm_Aktuell*100)/100, true);
                                            cm_komulativ = (typeof cm_komulativ == 'number' ? cm_komulativ : 0) + cm_Aktuell;
                                            cm_pro_Tag = (typeof cm_pro_Tag == 'number' ? cm_pro_Tag : 0) + cm_Aktuell;
                                            setState("Aqua_Control.0.Vliesfilter.cm_Max"/*cm_Max*/, Math.round(cm_komulativ*100)/100, true);
                                            setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag"/*cm_pro_Tag*/, (Math.round(cm_pro_Tag)), true);
                                            sendTo("telegram.0", "send", {
                                                text: (['Vliesverbrauch Aktuell ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_Aktuell").val*100)/100,' cm','\n','Vlies Tagesverbrauch ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_pro_Tag").val*100)/100,' cm','\n','Vliesverbrauch gesamt ',Math.round((getState("Aqua_Control.0.Vliesfilter.cm_Max").val / 100)*100)/100,' Meter'].join(''))
                                            });
                                            console.log((['Vliesverbrauch Aktuell ',Math.round(getState("Aqua_Control.0.Vliesfilter.cm_Aktuell").val*100)/100,' cm'].join('')));
                                            console.log((['Vliesverbrauch Gesamt ',Math.round((getState("Aqua_Control.0.Vliesfilter.cm_Max").val / 100)*100)/100,'  cm'].join('')));
                                          }
                                        });
                                        schedule("0 0 * * *", function () {
                                          cm_pro_Tag = 0;
                                          setState("Aqua_Control.0.Vliesfilter.cm_pro_Tag"/*cm_pro_Tag*/, 0, true);
                                        });
                                        

                                        Osmose Verbrauch:

                                        var ml_pro_Tag, ml_Kumulativ, Differenz, ml_Aktuell;
                                        
                                        
                                        ml_pro_Tag = getState("Aqua_Control.0.Osmose_System.ml_pro_Tag").val;
                                        ml_Kumulativ = getState("Aqua_Control.0.Osmose_System.Osmose_Max").val;
                                        // Magnetventil
                                        on({id: 'rpi2.0.gpio.21.state', change: "ne"}, function (obj) {
                                          var value = obj.state.val;
                                          var oldValue = obj.oldState.val;
                                          if (!(obj.state ? obj.state.val : "")) {
                                            Differenz = (obj.state ? obj.state.lc : "") - (obj.oldState ? obj.oldState.lc : "");
                                            ml_Aktuell = Differenz * getState("Aqua_Control.0.Osmose_System.ml_multiplikator").val;
                                            setState("Aqua_Control.0.Osmose_System.Osmose_Aktuell"/*Osmose_Aktuell*/, Math.round(ml_Aktuell*100)/100, true);
                                            ml_Kumulativ = (typeof ml_Kumulativ == 'number' ? ml_Kumulativ : 0) + ml_Aktuell;
                                            ml_pro_Tag = (typeof ml_pro_Tag == 'number' ? ml_pro_Tag : 0) + ml_Aktuell;
                                            setState("Aqua_Control.0.Osmose_System.Osmose_Max"/*Osmose_Max*/, Math.round(ml_Kumulativ*100)/100, true);
                                            setState("Aqua_Control.0.Osmose_System.Osmose_Gesamtverbrauch"/*Osmose_Gesamtverbrauch*/, Math.round((ml_Kumulativ / 1000)*1000)/1000, true);
                                            setState("Aqua_Control.0.Osmose_System.ml_pro_Tag"/*ml_pro_Tag*/, (Math.round(ml_pro_Tag)), true);
                                            console.log((['Dosierung aktuell ',Math.round(ml_Aktuell),' ml'].join('')));
                                            console.log((['Dosierung Gesamt ',Math.round((ml_Kumulativ / parseFloat(1000))*1000)/1000,' Liter'].join('')));
                                            sendTo("telegram.0", "send", {
                                                text: (['Osmose Dosierung aktuell ',Math.round(getState("Aqua_Control.0.Osmose_System.Osmose_Aktuell").val),' ml','\n','Osmose Tages Dosierung ',Math.round((getState("Aqua_Control.0.Osmose_System.ml_pro_Tag").val / 1000)*100)/100,' Liter','\n','Osmose Gesamtverbrauch ',Math.round(getState("Aqua_Control.0.Osmose_System.Osmose_Gesamtverbrauch").val),' Liter'].join(''))
                                            });
                                          }
                                        });
                                        schedule("0 0 * * *", function () {
                                          ml_pro_Tag = 0;
                                          setState("Aqua_Control.0.Osmose_System.ml_pro_Tag"/*ml_pro_Tag*/, 0, true);
                                        });
                                        

                                        wäre es dann so korrekt und die steuerungen nehmen beim starten die werte aus den datenpunkten ?

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

                                          Ich habe jetzt ml_pr_Tag_count und cm_pro_Tag_count raus geschmissen aus den steuerungen und zum testen nicht das magnet ventil oder den vlies motor manuell betätigt sondern die beiden schwimmer und siehe da, es funktioniert wieder.
                                          Was ich nur nicht verstehe wieso ging es die ganze Zeit und jetzt nicht mehr.
                                          Kann es mit den neu angelegten und neu verknüpften Datenpunkten zu tun haben !?
                                          Hatte ja vorher alle scripte gestoppt und dann die datenpunkt änderungen vorgenommen.
                                          Da ja noch reichlich Steuerungen dazu kommen musste ich aufräumen.
                                          Sonst wird es nachher ein unübersichtlicher Haufen Datenpunkte.
                                          Dazu kommen noch zwei TDS ppm Meter dann eine Leitwert Sonde, eine PH Sonde und wenns klappt die Steuerung Zeitgesteuert zu dem Tunze Controller senden.

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

                                            @Aphofis

                                            Wandle am Besten den Wert vom Multiplikator nach Zahl, weil auch ein String in den Datenpunkt gelangen kann. Also:

                                            setze Aktuell auf Differenz * nach Zahl Wert vom Multiplikator

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            566
                                            Online

                                            31.9k
                                            Users

                                            80.3k
                                            Topics

                                            1.3m
                                            Posts

                                            2
                                            79
                                            2925
                                            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