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] Gerät kallibrierung

    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] Gerät kallibrierung

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

      @paul53
      Naja die Werte habe ich ja aber einen korrekten Faktor finden ist wohl dabei nicht möglich
      wenn 1,16 volt einen wert von ca 500 ppm hat
      kann per rechnung ja nicht durch einen Faktor dann auf
      über 6000 ppm kommen bei 2,44 Volt
      Ich suche noch mal im Netz wie das zu errechnen ist.

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

        @paul53
        vielleicht magst du mir dabei noch mal helfen.

        :-)
        

        Ich habe die Sensoren jetzt mal über den ADS1115 direkt am Pi4 angeschlossen Adress mit Gnd verbunden. den TDS Meter mit 5 volt versorgt und am Analog 0 am ADS1115 den Analog Sensor per i2c wird nun auch der ADS erkannt und angezeigtund siehe da die werte sind stabil.
        Nur muss ich jetzt die werte umrechnen und da ein wert viele nach komma stellen hat weiß ich nicht genau wie ich das realisieren kann.
        getestet und mit einem TDS Handgerät nachgemessen.
        2,435 Volt aind gegengemessen 5947 ppm
        0,5 volt sind 773 ppm und 0,0019 volt sind 0 ppm nur wie bekomme ich es jetzt hin das bei 0,0019 volt in dem Datenpunkt TDS kalibrierung dann der Wert 0 bei einer Volt Zahl von 0,0019 angezeigt wird da der Wert ja mehrere nachkommastellen hat. genau so wie der wert dann auf 1 sprint bei der jeweils höheren volt zahl.
        dh die Rechnung muss alles was unter 0,002 volt mist als 0 ppm anzeigen und alles was drüber ist muss errechnet werden.

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

          @Aphofis sagte:

          bei 0,0019 volt in dem Datenpunkt TDS kalibrierung dann der Wert 0 bei einer Volt Zahl von 0,0019 angezeigt

          var ppm = Math.round(faktor * (spannung - 0,0019));
          if(ppm < 0) ppm = 0;
          
          Aphofis 1 Reply Last reply Reply Quote 0
          • Aphofis
            Aphofis @paul53 last edited by Aphofis

            @paul53
            Ich habe nun nach langem suchen im Internet herausgefunden das
            0,001 volt sollen 1 ppm sein also alles was unter 0,001 ist, ist dann ein ppm von 0 alles was drüber ist wäre dann zb 0,002 = ein ppm von 2 usw...
            Ist es auch möglich, das in ein Blockly zu verfassen!? ich schnalle es nicht. Ich hab versucht das nach zu bauen als Blockly nur ich scheitere irgendwie imme an diesem Javascript.

            Das ist bis jetzt mein Blockly und es sieht irgendwie unvollständig aus.

            <xml xmlns="http://www.w3.org/1999/xhtml">
              <variables>
                <variable type="" id=":Cq6B{~q8H[(J`mNBYDb">spannung</variable>
                <variable type="" id="np_ESNEK^(|%pWm2/+]g">ppm</variable>
                <variable type="" id="V=8^)5!TN`mJYTZyK?}/">faktor</variable>
              </variables>
              <block type="schedule" id="g0YOJMLZmMB,(4:F3OP;" x="-987" y="-312">
                <field name="SCHEDULE">*/5 * * * * *</field>
                <statement name="STATEMENT">
                  <block type="variables_set" id="OF@^B`**2-LnK%m(Vjyt">
                    <field name="VAR" id=":Cq6B{~q8H[(J`mNBYDb" variabletype="">spannung</field>
                    <value name="VALUE">
                      <block type="get_value" id="#u^x(i~D};)XRQF_W}RN">
                        <field name="ATTR">val</field>
                        <field name="OID">i2c.0.0x48.0</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="gU]EFQoDCq7pZ_gXgsBV">
                        <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                        <value name="VALUE">
                          <block type="math_arithmetic" id="`EtdUInhrJzLU5hYt.ni">
                            <field name="OP">MINUS</field>
                            <value name="A">
                              <shadow type="math_number" id="Sv!4Jvf@;/5af-4#^zd3">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="math_arithmetic" id="z+2C/OkD|}uE3=6MdUCz">
                                <field name="OP">MULTIPLY</field>
                                <value name="A">
                                  <shadow type="math_number" id="hLvmB6l:PJjs[Z^6U6Lk">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_round" id="tfFn8b$DIcK6UgYUQLE!">
                                    <field name="OP">ROUND</field>
                                    <value name="NUM">
                                      <shadow type="math_number" id="1rQ^liVvpA`qyoY-R+U0">
                                        <field name="NUM">3.1</field>
                                      </shadow>
                                      <block type="variables_get" id="ZTxPi1?TDqNx2q)2dc@[">
                                        <field name="VAR" id="V=8^)5!TN`mJYTZyK?}/" variabletype="">faktor</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="DJOGrbHj}ZjVO7X_N$%{">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="variables_get" id="eAUxBI-D_8XA_6ZH7.RZ">
                                    <field name="VAR" id=":Cq6B{~q8H[(J`mNBYDb" variabletype="">spannung</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="ctchP~,SwZ)pZgY[TVQX">
                                <field name="NUM">0.0019</field>
                              </shadow>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="on_ext" id="avox)=chmrxdaDFRG-dy">
                            <mutation items="1"></mutation>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <value name="OID0">
                              <shadow type="field_oid" id=",C$d.ocnGPCx/k`IpXX8">
                                <field name="oid">i2c.0.0x48.0</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="VF:wqhFGoKV@BQ$M#q/$">
                                <value name="IF0">
                                  <block type="on_source" id="bLi3*73^M%Mwj2r{6A,t">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="variables_set" id="Wyc(F6WE.RunEojHKezU">
                                    <field name="VAR" id="V=8^)5!TN`mJYTZyK?}/" variabletype="">faktor</field>
                                    <value name="VALUE">
                                      <block type="variables_get" id="08@R%~?^RV-!rIklWyO-">
                                        <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="update" id="x4.IV.iv.PVA1(!0yqW8">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">Aqua_Control.0.Sensoren.TDS_Meter</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="pzGHpFx[]`e,Vi~G[dgB">
                                            <field name="VAR" id="V=8^)5!TN`mJYTZyK?}/" variabletype="">faktor</field>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </xml>
            

            Bildschirmfoto 2019-12-30 um 02.11.57.png

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

              @Aphofis sagte:

              0,001 volt sollen 1 ppm

              Dann wäre der Faktor 1000.

              Blockly_temp.JPG

              <xml xmlns="http://www.w3.org/1999/xhtml">
               <variables>
                 <variable type="" id="V=8^)5!TN`mJYTZyK?}/">faktor</variable>
                 <variable type="" id="np_ESNEK^(|%pWm2/+]g">ppm</variable>
               </variables>
               <block type="variables_set" id="Wyc(F6WE.RunEojHKezU" x="-913" y="-438">
                 <field name="VAR" id="V=8^)5!TN`mJYTZyK?}/" variabletype="">faktor</field>
                 <value name="VALUE">
                   <block type="math_number" id="0m(OXeOCW9rO-30mkfwz">
                     <field name="NUM">1000</field>
                   </block>
                 </value>
                 <next>
                   <block type="on_ext" id="avox)=chmrxdaDFRG-dy">
                     <mutation items="1"></mutation>
                     <field name="CONDITION">ne</field>
                     <field name="ACK_CONDITION"></field>
                     <value name="OID0">
                       <shadow type="field_oid" id=",C$d.ocnGPCx/k`IpXX8">
                         <field name="oid">i2c.0.0x48.0</field>
                       </shadow>
                     </value>
                     <statement name="STATEMENT">
                       <block type="variables_set" id="gU]EFQoDCq7pZ_gXgsBV">
                         <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                         <value name="VALUE">
                           <block type="math_round" id="tfFn8b$DIcK6UgYUQLE!">
                             <field name="OP">ROUND</field>
                             <value name="NUM">
                               <shadow type="math_number" id="1rQ^liVvpA`qyoY-R+U0">
                                 <field name="NUM">3.1</field>
                               </shadow>
                               <block type="math_arithmetic" id="z+2C/OkD|}uE3=6MdUCz">
                                 <field name="OP">MULTIPLY</field>
                                 <value name="A">
                                   <shadow type="math_number" id="hLvmB6l:PJjs[Z^6U6Lk">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="variables_get" id="ZTxPi1?TDqNx2q)2dc@[">
                                     <field name="VAR" id="V=8^)5!TN`mJYTZyK?}/" variabletype="">faktor</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="DJOGrbHj}ZjVO7X_N$%{">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="math_arithmetic" id="`EtdUInhrJzLU5hYt.ni">
                                     <field name="OP">MINUS</field>
                                     <value name="A">
                                       <shadow type="math_number" id="Sv!4Jvf@;/5af-4#^zd3">
                                         <field name="NUM">1</field>
                                       </shadow>
                                       <block type="on_source" id="bLi3*73^M%Mwj2r{6A,t">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <shadow type="math_number" id="ctchP~,SwZ)pZgY[TVQX">
                                         <field name="NUM">0.0019</field>
                                       </shadow>
                                     </value>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="controls_if" id="VF:wqhFGoKV@BQ$M#q/$">
                             <value name="IF0">
                               <block type="logic_compare" id="}c[xQ`sZe/aF{]@BYlJW">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="variables_get" id="fPA|hiRl}%,`7Em[IH6w">
                                     <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="??b[r*Ec(=X9.6H4ZUr[">
                                     <field name="NUM">0</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="variables_set" id="mBUB~[vPgUW8@?SY3w=~">
                                 <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                                 <value name="VALUE">
                                   <block type="math_number" id="XeuqyxxtJ%,$vqa0xu[F">
                                     <field name="NUM">0</field>
                                   </block>
                                 </value>
                               </block>
                             </statement>
                             <next>
                               <block type="update" id="x4.IV.iv.PVA1(!0yqW8">
                                 <mutation delay_input="false"></mutation>
                                 <field name="OID">Aqua_Control.0.Sensoren.TDS_Meter</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="variables_get" id="08@R%~?^RV-!rIklWyO-">
                                     <field name="VAR" id="np_ESNEK^(|%pWm2/+]g" variabletype="">ppm</field>
                                   </block>
                                 </value>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
              </xml>
              

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

                @paul53

                Es klappt! und funktioniert Super Danke!

                Jetzt ist es so das ich den ppm Wert gerne alle 10 min prüfen möchte.
                Den Aktualisierungsintervall wollte ich auf 60 sek stellen.
                Dh eine Steuerung mist 10 mal den wert und wenn der Wert 10 mal 1 ppm ist dann soll eine meldung ausgegeben werden.

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

                  @Aphofis
                  Verwende einen Zeitplan, der jede Minute triggert:
                  Erhöhe jedesmal eine Zählvariable. Wenn der ppm-Wert > 1 ist, setze die Zählvariable auf 0. Wenn die Zählvariable = 10 ist, sende Meldung.

                  Wenn das im gleichen Skript erfolgt wie oben, kann die Variable ppm verwendet werden und es muss nicht der Datenpunkt eingelesen werden.

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

                    ich habe das jetz so aber ich denke das ist wohl falsch
                    Bildschirmfoto 2019-12-30 um 19.18.48.png

                    <xml xmlns="http://www.w3.org/1999/xhtml">
                      <variables>
                        <variable type="" id="2d2K!}ki!wOyi^mvo-D.">Counter</variable>
                      </variables>
                      <block type="schedule" id="g0YOJMLZmMB,(4:F3OP;" x="-987" y="-312">
                        <field name="SCHEDULE">* * * * *</field>
                        <statement name="STATEMENT">
                          <block type="on" id="=t|AR~F?F.POz.9;n6s?">
                            <field name="OID">Aqua_Control.0.Sensoren.TDS_Meter</field>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="Bts^3NiX*:eNi-l(luks">
                                <value name="IF0">
                                  <block type="on_source" id="rU%vRkoU/c-0FA@qyTT0">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="controls_for" id="ZJKHN9jAeN#8:CYK];RR">
                                    <field name="VAR" id="2d2K!}ki!wOyi^mvo-D." variabletype="">Counter</field>
                                    <value name="FROM">
                                      <shadow type="math_number" id="yOPQFHe.*oQM#h.5cv/L">
                                        <field name="NUM">1</field>
                                      </shadow>
                                    </value>
                                    <value name="TO">
                                      <shadow type="math_number" id=";q4G9f;jzh@IpN#Hw?7d">
                                        <field name="NUM">10</field>
                                      </shadow>
                                    </value>
                                    <value name="BY">
                                      <shadow type="math_number" id="CR6(M*dyJ1(bRaa[PC]l">
                                        <field name="NUM">1</field>
                                      </shadow>
                                    </value>
                                    <statement name="DO">
                                      <block type="controls_if" id="B-?d}*r)V!nKL8nyY]3+">
                                        <value name="IF0">
                                          <block type="logic_compare" id="DRMG/z6M$-J-VFhUi;^/">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id="}|dMpJQSIM(8G]CTB%ZJ">
                                                <field name="ATTR">val</field>
                                                <field name="OID">Aqua_Control.0.Sensoren.TDS_Meter</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="math_number" id="^O^RgW$boq@-63tqK-/+">
                                                <field name="NUM">1</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="schedule" id="^A(_aRQa;vVx1vKY-V-J">
                                            <field name="SCHEDULE">5 18 * * *</field>
                                            <statement name="STATEMENT">
                                              <block type="telegram" id="J,iXl(9m{hxX8B5dzrU0">
                                                <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="%vvA9a71{#pBL7sP6VuJ">
                                                    <field name="TEXT">Mischbettharz Kartusche muss gewechselt werden</field>
                                                  </shadow>
                                                </value>
                                                <next>
                                                  <block type="control" id="VPki1bO?hssLGQEl/QSW">
                                                    <mutation delay_input="false"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G090LV0371040175.Commands.speak</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="text_join" id="iPHU6.VfiSF[{Ih5Ql?8">
                                                        <mutation items="2"></mutation>
                                                        <value name="ADD0">
                                                          <block type="text" id="F4CDr?yvuDd{]$$IyrJF">
                                                            <field name="TEXT">Mischbettharz hat 1 ppm erreicht</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="text" id="+-2pu*N9GLZ-W,J1)0!M">
                                                            <field name="TEXT">Kartusche muss gewechselt werden</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                        </statement>
                      </block>
                    </xml>
                    
                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @Aphofis last edited by paul53

                      @Aphofis sagte:

                      das ist wohl falsch

                      Ja. Keine Trigger innerhalb von Triggern verwenden !!

                      Blockly_temp.JPG

                      Oder so, wenn die Meldung zu einer bestimmten Uhrzeit kommen soll:

                      Blockly_temp.JPG

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

                        @paul53
                        Das mal wieder Spitze!
                        Vielen Dank @paul53

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        682
                        Online

                        31.9k
                        Users

                        80.3k
                        Topics

                        1.3m
                        Posts

                        2
                        25
                        1127
                        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