Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Hardware
  4. Script/Visualisierung

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.3k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.3k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.5k

Script/Visualisierung

Scheduled Pinned Locked Moved Hardware
5 Posts 4 Posters 534 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alex_K
    wrote on last edited by
    #1

    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

    CodierknechtC paul53P HomoranH 3 Replies Last reply
    0
    • A Alex_K

      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

      CodierknechtC Online
      CodierknechtC Online
      Codierknecht
      Developer Most Active
      wrote on last edited by Codierknecht
      #2

      @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>
      

      "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

      Proxmox 9.1.1 LXC|8 GB|Core i7-6700
      HmIP|ZigBee|Tasmota|Unifi
      Zabbix Certified Specialist
      Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

      1 Reply Last reply
      0
      • A Alex_K

        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

        paul53P Offline
        paul53P Offline
        paul53
        wrote on last edited by paul53
        #3

        @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!

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        1 Reply Last reply
        0
        • A Alex_K

          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

          HomoranH Do not disturb
          HomoranH Do not disturb
          Homoran
          Global Moderator Administrators
          wrote on last edited by
          #4

          @alex_k

          @codierknecht sagte in Script/Visualisierung:

          In welchem "Dashboard"?

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

          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

          CodierknechtC 1 Reply Last reply
          0
          • HomoranH Homoran

            @alex_k

            @codierknecht sagte in Script/Visualisierung:

            In welchem "Dashboard"?

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

            CodierknechtC Online
            CodierknechtC Online
            Codierknecht
            Developer Most Active
            wrote on last edited by
            #5

            @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

            "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

            Proxmox 9.1.1 LXC|8 GB|Core i7-6700
            HmIP|ZigBee|Tasmota|Unifi
            Zabbix Certified Specialist
            Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            Support us

            ioBroker
            Community Adapters
            Donate

            752

            Online

            32.5k

            Users

            81.7k

            Topics

            1.3m

            Posts
            Community
            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
            ioBroker Community 2014-2025
            logo
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Home
            • Recent
            • Tags
            • Unread 0
            • Categories
            • Unreplied
            • Popular
            • GitHub
            • Docu
            • Hilfe