Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Script/Visualisierung

    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

    Script/Visualisierung

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

      Re: Ferraris Zähler mit TCRT5000 und esp8266

      Hallo, bin ja hier absoluter Anfänger,
      bis zum Mqtt bin ich gekommen, alöso im Dashboard kommen Daten/Impulse an,
      wie bekomme ich das jetzt visualisiert ?
      Gibt es da kein Blockly oder sonstiges Script dazu ?

      LG Alex

      Codierknecht paul53 Homoran 3 Replies Last reply Reply Quote 0
      • Codierknecht
        Codierknecht Developer Most Active @Alex_K last edited by Codierknecht

        @alex_k sagte in Script/Visualisierung:

        alöso im Dashboard kommen Daten/Impulse an

        In welchem "Dashboard"?
        Hast Du die Impulse schon als DP in den Objekten?
        Was willst Du wie visualisieren?

        Für meinen Stromzähler sieht das z.B. in der VIS so aus:
        2d32f4a8-12d3-418f-9f0c-68d5ea75771d-image.png

        Realisiert habe ich das mit 4 numerischen DP und folgendem Blockly:
        5c31233d-c065-4dfd-825b-dd39f8ba3b54-image.png

        Der erste Block berechnet die durchschnittliche Leistung während der letzten beiden Impulse.
        Der zweite Block erhöht den Zählerstand und den laufenden Tagesverbrauch.
        Und der dritte Block schreibt nachts den Tagesverbrauch in einen DP der mit dem SQL-Adapter historisiert wird.

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable id="fUo;|AKX{|bfv{)DmYCq">leistung</variable>
           <variable id="S)o?E2SGY!hKSBZ+g5im">sekunden</variable>
           <variable id="1jANP]Icz|,knL:)bIB)">zaehlerstand</variable>
           <variable id="l@a`W@hJ+dr.[Z[=vs+A">verbrauch</variable>
         </variables>
         <block type="on" id="`7!bo707pBg6O=i)6O6K" x="-462" y="63">
           <field name="OID">mqtt.0.esp-easy.Stromzaehler.Time</field>
           <field name="CONDITION">gt</field>
           <field name="ACK_CONDITION"></field>
           <statement name="STATEMENT">
             <block type="variables_set" id="pVdf^Pg6^)|mwuKPBFKH">
               <field name="VAR" id="fUo;|AKX{|bfv{)DmYCq">leistung</field>
               <value name="VALUE">
                 <block type="math_arithmetic" id="$p}VnA9U?sW./Qe-N2A*">
                   <field name="OP">MULTIPLY</field>
                   <value name="A">
                     <shadow type="math_number" id=")D[TjHLi:37Tj}L9h]=B">
                       <field name="NUM">1</field>
                     </shadow>
                     <block type="math_arithmetic" id="-fuE,Wtp1|P}H7)YVh{p">
                       <field name="OP">DIVIDE</field>
                       <value name="A">
                         <shadow type="math_number" id="?82O_loI,yo3hO9FvkfE">
                           <field name="NUM">1</field>
                         </shadow>
                       </value>
                       <value name="B">
                         <shadow type="math_number" id="z1Neui`!+0]+)lK0Xfdb">
                           <field name="NUM">96</field>
                         </shadow>
                       </value>
                     </block>
                   </value>
                   <value name="B">
                     <shadow type="math_number" id="}9dvD{)^n8ocs]M8FN@k">
                       <field name="NUM">1000</field>
                     </shadow>
                   </value>
                 </block>
               </value>
               <next>
                 <block type="variables_set" id="@q,A*6UZT4nN_-/1n8Ij">
                   <field name="VAR" id="S)o?E2SGY!hKSBZ+g5im">sekunden</field>
                   <value name="VALUE">
                     <block type="math_arithmetic" id="%@45Dt=hsg$VC9a`eVv)">
                       <field name="OP">DIVIDE</field>
                       <value name="A">
                         <shadow type="math_number">
                           <field name="NUM">1</field>
                         </shadow>
                         <block type="on_source" id="OLLIf^qcv,jl@:#d?-y{">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="B">
                         <shadow type="math_number" id="6X^K,UK[7#CmXPys5+L!">
                           <field name="NUM">1000</field>
                         </shadow>
                       </value>
                     </block>
                   </value>
                   <next>
                     <block type="update" id="dY%B6q9@(]Jm=TD*4Cbd">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">0_userdata.0.Strom.watt</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="math_arithmetic" id="284=i,lWnBhe4Is*DAq5">
                           <field name="OP">MULTIPLY</field>
                           <value name="A">
                             <shadow type="math_number" id="[IVGZ=:7[za%MoXWfW(]">
                               <field name="NUM">1</field>
                             </shadow>
                             <block type="math_arithmetic" id="C1%d|jS@G[`L8]PiczKM">
                               <field name="OP">DIVIDE</field>
                               <value name="A">
                                 <shadow type="math_number" id="$N`3dHRi:Cb^:k|$vt.b">
                                   <field name="NUM">1</field>
                                 </shadow>
                                 <block type="variables_get" id="pH?pU02T^H?*,`)HtV(%">
                                   <field name="VAR" id="fUo;|AKX{|bfv{)DmYCq">leistung</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <shadow type="math_number" id="?%:wp#*)9ml@?/L7_K}:">
                                   <field name="NUM">1</field>
                                 </shadow>
                                 <block type="variables_get" id="pJH`O+zh(U?VT8`~@vC*">
                                   <field name="VAR" id="S)o?E2SGY!hKSBZ+g5im">sekunden</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="B">
                             <shadow type="math_number" id="~qeCWcg63GX=Ols{Iy5G">
                               <field name="NUM">3600</field>
                             </shadow>
                           </value>
                         </block>
                       </value>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
           <next>
             <block type="on" id="?bq+E/6xtsnzeLpF`;n,">
               <field name="OID">mqtt.0.esp-easy.Stromzaehler.Total</field>
               <field name="CONDITION">gt</field>
               <field name="ACK_CONDITION"></field>
               <statement name="STATEMENT">
                 <block type="variables_set" id="!?Z)Kq-Sd49U29_VT$mm">
                   <field name="VAR" id="1jANP]Icz|,knL:)bIB)">zaehlerstand</field>
                   <value name="VALUE">
                     <block type="get_value" id="7@IoajBsw/#C42hl9t/H">
                       <field name="ATTR">val</field>
                       <field name="OID">0_userdata.0.Strom.zaehlerstand</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="[Dav$a,2G^PwHiJ)!83l">
                       <field name="VAR" id="l@a`W@hJ+dr.[Z[=vs+A">verbrauch</field>
                       <value name="VALUE">
                         <block type="get_value" id="hhWF%so_}1UC7U|-j#iz">
                           <field name="ATTR">val</field>
                           <field name="OID">0_userdata.0.Strom.verbrauch</field>
                         </block>
                       </value>
                       <next>
                         <block type="math_change" id="C)LwRy(kt0R[k,Kn?j=5">
                           <field name="VAR" id="1jANP]Icz|,knL:)bIB)">zaehlerstand</field>
                           <value name="DELTA">
                             <shadow type="math_number" id="Zx21tUMEqcQEuxvNZ^M^">
                               <field name="NUM">1</field>
                             </shadow>
                             <block type="math_arithmetic" id="Ev}CqD[C_vOAdB,t5I5c">
                               <field name="OP">DIVIDE</field>
                               <value name="A">
                                 <shadow type="math_number" id="VhlWl#$B8*;y-,elv:vz">
                                   <field name="NUM">1</field>
                                 </shadow>
                               </value>
                               <value name="B">
                                 <shadow type="math_number" id="jBRLG_0t}BL=jQ`L!M1`">
                                   <field name="NUM">96</field>
                                 </shadow>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="math_change" id="Rq}3~T0ClYtt*lZ-y9[7">
                               <field name="VAR" id="l@a`W@hJ+dr.[Z[=vs+A">verbrauch</field>
                               <value name="DELTA">
                                 <shadow type="math_number">
                                   <field name="NUM">1</field>
                                 </shadow>
                                 <block type="math_arithmetic" id=";6sJ%u1n%OkC,ESB6Msd">
                                   <field name="OP">DIVIDE</field>
                                   <value name="A">
                                     <shadow type="math_number" id="UTa@oN.^z?gGUYk%$A,l">
                                       <field name="NUM">1</field>
                                     </shadow>
                                   </value>
                                   <value name="B">
                                     <shadow type="math_number" id=";z]Vls4v|s!a(V,.$)o;">
                                       <field name="NUM">96</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="update" id="lr5*L/o;!vW3RzSZ0]uo">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">0_userdata.0.Strom.zaehlerstand</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="variables_get" id="@?@He+L.mA2bHO[(^dA*">
                                       <field name="VAR" id="1jANP]Icz|,knL:)bIB)">zaehlerstand</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="update" id="yiFOK98pi|]-SEAg]?rR">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">0_userdata.0.Strom.verbrauch</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="variables_get" id="toa@stwv)`wNJzHU~k%$">
                                           <field name="VAR" id="l@a`W@hJ+dr.[Z[=vs+A">verbrauch</field>
                                         </block>
                                       </value>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </statement>
               <next>
                 <block type="schedule" id="L,WV+;?iQuzvWiM,BmP@">
                   <field name="SCHEDULE">45 59 23 * * *</field>
                   <statement name="STATEMENT">
                     <block type="update" id="m.u{-$Tys=S~Y%Kik(Ss">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">0_userdata.0.Strom.tagesverbrauch</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="get_value" id="+biTR7xS#jo)Q:b#Qv+J">
                           <field name="ATTR">val</field>
                           <field name="OID">0_userdata.0.Strom.verbrauch</field>
                         </block>
                       </value>
                       <next>
                         <block type="update" id="]4$W;ohH|Xop[)jj2z!0">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">0_userdata.0.Strom.verbrauch</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="math_number" id="yN)sX=wt+DY-c]CWp=hM">
                               <field name="NUM">0</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </next>
         </block>
        </xml>
        

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

          @alex_k sagte: Gibt es da kein Blockly oder sonstiges Script dazu ?

          Sind die Datenpunkte "Total" und "Time" in ioBroker unter "mqtt.0" vorhanden?
          Dann erstelle eigene Datenpunkte für "Zaehlerstand" (kWh) und Leistung (W) vom Typ "number" unter "0_userdata.0". Das folgende Blockly ist für Zähler mit 1000 Impulsen/kWh ausgelegt:

          Bild_2022-12-05_160211983.png

          Vor Skriptstart den eingelesenen Zählerstand manuell eingeben!

          1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @Alex_K last edited by

            @alex_k

            @codierknecht sagte in Script/Visualisierung:

            In welchem "Dashboard"?

            ist das die "Hardware"?
            oder warum in diesem Unterforum?

            Codierknecht 1 Reply Last reply Reply Quote 0
            • Codierknecht
              Codierknecht Developer Most Active @Homoran last edited by

              @homoran sagte in Script/Visualisierung:

              oder warum in diesem Unterforum?

              und warum doppelt?
              https://forum.iobroker.net/topic/35404/ferraris-zähler-mit-tcrt5000-und-esp8266/442

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

              Support us

              ioBroker
              Community Adapters
              Donate

              681
              Online

              31.7k
              Users

              79.9k
              Topics

              1.3m
              Posts

              4
              5
              434
              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