Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. S0 Stromzähler umrechnen in aktuelle Verbrauch

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    S0 Stromzähler umrechnen in aktuelle Verbrauch

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

      @paul53 said in S0 Stromzähler umrechnen in aktuelle Verbrauch:

      @do4bmw sagte:

      manchmal 2 impulse pro Sek kommen ... ist das dass problem ?

      Bei 7 kW müssen 2 Impulse pro Sekunde kommen. Das Skript wertet allerdings eine Zeit aus und enthält keine Begrenzung. Logge mal den Trigger-Wert, der bei 7 kW etwas über 500 enthalten muss.

      bei 7.7KW kommt hier sehr häufig der wert 1014 durch

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

        @do4bmw sagte:

        bei 7.7KW kommt hier sehr häufig der wert 1014 durch

        Der Wert ist falsch. Du musst also die Ursache an der Quelle suchen.

        D 1 Reply Last reply Reply Quote 1
        • D
          do4bmw @paul53 last edited by

          @paul53 said in S0 Stromzähler umrechnen in aktuelle Verbrauch:

          @do4bmw sagte:

          bei 7.7KW kommt hier sehr häufig der wert 1014 durch

          Der Wert ist falsch. Du musst also die Ursache an der Quelle suchen.

          das ist der wert der mir das wemos D1 mit EasyESP als Time zurück gibt ...

          ist das der wert den du meinst ?

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

            @do4bmw sagte:

            ist das der wert den du meinst ?

            Ja.

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

              @paul53 said in S0 Stromzähler umrechnen in aktuelle Verbrauch:

              @do4bmw sagte:

              ist das der wert den du meinst ?

              Ja.

              mein fehler

              hatte ein debounce von 1000msec drin

              nun ist der wert bei 468

              und schon klappt es auch mit der anzeige

              danke für die hilfe

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

                erledigt.

                1 Reply Last reply Reply Quote 1
                • D
                  DaveAustria @GoodOld last edited by

                  @GoodOld Hallo, ich bin mal so frei und hol das skript wieder hoch,

                  Ich kann das skript bei mir nicht einfügen, ist es möglich das du mir das nochmal exportierst und schickst ?

                  Das Skript vom 21.Oct 2018 funktioniert soweit nur wenn ich 0 watt erzeuge, also keine impulse geschickt bekomme, werden mir immer 7 Watt angezeigt, woran kann das liegen ?

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

                    @DaveAustria sagte:

                    wenn ich 0 watt erzeuge, also keine impulse geschickt bekomme, werden mir immer 7 Watt angezeigt, woran kann das liegen ?

                    Weil dann wahrscheinlich nicht getriggert wird. Bau ein Timeout ein, der den Wert nach einer bestimmten Zeit ohne Trigger auf 0 setzt.

                    Blockly_temp.JPG

                    <xml xmlns="https://developers.google.com/blockly/xml">
                     <variables>
                       <variable id="Y*)uQOfA3A0pswm8w1GH">leistung</variable>
                       <variable type="timeout" id="timeout">timeout</variable>
                     </variables>
                     <block type="on_ext" id="0Sk;oHtQ6S:k07HPnW?7" x="63" y="88">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                       <field name="CONDITION">any</field>
                       <field name="ACK_CONDITION"></field>
                       <value name="OID0">
                         <shadow type="field_oid" id="L/T2y/92sL}W_HXn2T1~">
                           <field name="oid">mqtt.0.DO4BMW_S0-1.Strom.Time</field>
                         </shadow>
                       </value>
                       <statement name="STATEMENT">
                         <block type="controls_if" id="iUaf[k~^|w),4x.){V+F">
                           <value name="IF0">
                             <block type="logic_compare" id="t[QH7N-2s/0#f()E*+TK">
                               <field name="OP">GT</field>
                               <value name="A">
                                 <block type="on_source" id="D!C)q*uU}]fX1bO6VYxn">
                                   <field name="ATTR">state.val</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="12!)ey:4h!i1Vcpa_P/.">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="variables_set" id="~;[g2O3X(]AA,rIqaiF+">
                               <field name="VAR" id="Y*)uQOfA3A0pswm8w1GH">leistung</field>
                               <value name="VALUE">
                                 <block type="math_arithmetic" id="8*o-g!6Okm;;z%}o*W65">
                                   <field name="OP">DIVIDE</field>
                                   <value name="A">
                                     <shadow type="math_number" id="I[7R;75:Lju`h(5wk]:}">
                                       <field name="NUM">3600000</field>
                                     </shadow>
                                   </value>
                                   <value name="B">
                                     <shadow type="math_number" id="d6ob|)J]{ekBQ]}g`P_4">
                                       <field name="NUM">1000</field>
                                     </shadow>
                                     <block type="on_source" id="a2vbx!t8f}B}UV_Hq~3p">
                                       <field name="ATTR">state.val</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="control" id="Op`JzD}_|;6;ql1k2ON9">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">mqtt.0.DO4BMW_S0-1.Strom.Watt2</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="math_round" id="F=.oa5q#rl**.n0;FfkU">
                                       <field name="OP">ROUND</field>
                                       <value name="NUM">
                                         <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="P=8-%G(uftUvKd|SikfY">
                                           <field name="NUM">3.1</field>
                                         </shadow>
                                         <block type="variables_get" id="0{|G%xhtf5NW3jz4NXe=">
                                           <field name="VAR" id="Y*)uQOfA3A0pswm8w1GH">leistung</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="timeouts_cleartimeout" id="xHoFioZq73=S9tzzBTq0">
                                       <field name="NAME">timeout</field>
                                       <next>
                                         <block type="timeouts_settimeout" id="MA!5nB{$E.2Qm.QJrJaS">
                                           <field name="NAME">timeout</field>
                                           <field name="DELAY">10</field>
                                           <field name="UNIT">min</field>
                                           <statement name="STATEMENT">
                                             <block type="control" id="+2JN]+2,VrSil#6#M{_9">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">mqtt.0.DO4BMW_S0-1.Strom.Watt2</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_number" id="At0ZBoh)@0m1emVJG|Qt">
                                                   <field name="NUM">0</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </statement>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </statement>
                         </block>
                       </statement>
                     </block>
                    </xml>
                    

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

                      Muss das hier nochmal aufwärmen, leider scheint die Rechnung falsch zu sein. Es kommen keine passenden Werte raus.

                      Hier meine Lösung:

                      <xml xmlns="https://developers.google.com/blockly/xml">
                        <variables>
                          <variable id="AP1}0!{NwZLxuu@pAF`Z">Wert</variable>
                        </variables>
                        <block type="on_ext" id="W#4Ls_h_y|cwT?nCY/XR" x="-412" y="-313">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                          <field name="CONDITION">any</field>
                          <field name="ACK_CONDITION"></field>
                          <value name="OID0">
                            <shadow type="field_oid" id="6cdwgAAgS+kz]!+7pnZ)">
                              <field name="oid">mqtt.0.Stromzähler.Strom_S0.Time</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="variables_set" id="ogj^ePrs9*@jzEe:R6Km">
                              <field name="VAR" id="AP1}0!{NwZLxuu@pAF`Z">Wert</field>
                              <value name="VALUE">
                                <block type="math_arithmetic" id="]0M=(k9=r]sxV;nCRTAy">
                                  <field name="OP">DIVIDE</field>
                                  <value name="A">
                                    <shadow type="math_number" id="xc(2ROKN:buynD{lNw[n">
                                      <field name="NUM">3600</field>
                                    </shadow>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="MNkY9Jf5t,f%Q11oIT(1">
                                      <field name="NUM">1000</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="lZpxQ[,}4+i]5FSu[+[~">
                                      <field name="OP">MULTIPLY</field>
                                      <value name="A">
                                        <shadow type="math_number" id="UtZ0GU2I6J.}oqT@qDRd">
                                          <field name="NUM">0</field>
                                        </shadow>
                                        <block type="math_arithmetic" id="b6|Lt+;F9Oq9@:x(*bY9">
                                          <field name="OP">DIVIDE</field>
                                          <value name="A">
                                            <shadow type="math_number" id="Qxvf80B#cQ+k.tWypY(2">
                                              <field name="NUM">400</field>
                                            </shadow>
                                          </value>
                                          <value name="B">
                                            <shadow type="math_number" id="MuNNnjw#(B-u]9gQSqeO">
                                              <field name="NUM">1000</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="I3xE42u.NAVO9Y)#f-}q">
                                          <field name="NUM">0</field>
                                        </shadow>
                                        <block type="math_arithmetic" id="t?g$@EnYr@L(lZzLa3M8">
                                          <field name="OP">DIVIDE</field>
                                          <value name="A">
                                            <shadow type="math_number" id="n~NMy}8^69Ds0AgcZL(9">
                                              <field name="NUM">1</field>
                                            </shadow>
                                            <block type="get_value" id="9)r@Tz4:V@|MA3p$Cqyo">
                                              <field name="ATTR">val</field>
                                              <field name="OID">mqtt.0.Stromzähler.Strom_S0.Time</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <shadow type="math_number" id="EKd;^a4yAI#3k#Dg0nJW">
                                              <field name="NUM">1000</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="Zh:,x@fPl?!iX),z3z_y">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">0_userdata.0.Stromzähler.Leistung</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="math_round" id="sjOp3d8^}jClP_0/9_]Y">
                                      <field name="OP">ROUND</field>
                                      <value name="NUM">
                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number">
                                          <field name="NUM">3.1</field>
                                        </shadow>
                                        <block type="variables_get" id="1_c0K2p^[!Yr.axi5F-e">
                                          <field name="VAR" id="AP1}0!{NwZLxuu@pAF`Z">Wert</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                        <block type="comment" id="6OGtBrzv6fM;c;:x~bS7" x="-213" y="-262">
                          <field name="COMMENT">h in s</field>
                        </block>
                        <block type="comment" id="y=^bV{C~DBmN2AzM3bya" x="-87" y="-262">
                          <field name="COMMENT">Impulse/kWh</field>
                        </block>
                        <block type="comment" id="3(V2ODtu1Kr6+jE;5B{Z" x="38" y="-262">
                          <field name="COMMENT">von kW in W</field>
                        </block>
                        <block type="comment" id="DbtR1m)Y10ih/#v89g%N" x="287" y="-263">
                          <field name="COMMENT">ms in s umrechnen</field>
                        </block>
                        <block type="variables_get" id="OQ3o_4[OzW+,pD{vi7=Q" x="913" y="4263">
                          <field name="VAR" id="AP1}0!{NwZLxuu@pAF`Z">Wert</field>
                        </block>
                      </xml>
                      
                      1 Reply Last reply Reply Quote 0
                      • Elektroniker86
                        Elektroniker86 last edited by

                        Hallo,

                        ich weiß, das hier ist schon ziemlich alt aber benötige hier Hilfe.
                        Und zwar funktioniert das Blockly leider nicht da mir der Datenpunkt "count" fehlt.

                        Ich habe ein S0 Zählerimpuls an einem Eingang der LOGO hängen und schleife den direkt durch zu ioBroker wo ich im Blockly mir den Zählerstand hochzählen lasse.

                        Es sollte doch möglich sein anhand diesem Wert die momentane Leistung zu berechnen in Blockly?
                        Der ändert sich ja nach jedem neuen Impuls.

                        Kann mir da jemand helfen?

                        Vielen Dank im voraus!

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

                          @elektroniker86 sagte: Zählerstand hochzählen lasse.
                          Es sollte doch möglich sein anhand diesem Wert die momentane Leistung zu berechnen in Blockly?

                          Bild_2022-12-13_203229293.png

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

                            @paul53

                            Hey, das ging ja mal wieder schnell.

                            Ich habe derweil doch noch ein altes Thema gefunden mit einem passenden Blockly.

                            Screenshot_20221213_203412.png

                            Allerdings zeigt er mir 163W statt 1600W an was habe ich hier verkehrt?

                            IMG_20221213_203815.jpg

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

                              @elektroniker86 sagte: mit einem passenden Blockly.

                              Ja, mit dem Impulsabstand kann man auch operieren.

                              @elektroniker86 sagte in S0 Stromzähler umrechnen in aktuelle Verbrauch:

                              Allerdings zeigt er mir 163W statt 1600W an was habe ich hier verkehrt?

                              Dann passt der Faktor nicht: 100 Impulse/kWh - nicht 1000.

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

                                @paul53

                                Alles klar, ich hab es. Auf dem Zähler steht ja 1000 Impulse/kWh.......
                                Das ist für die LED gemeint.
                                Der Ausgang taktet mit 100 Imp.

                                Super, Du bist der beste!
                                Dank Dir vielmals!

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

                                  Eins noch, wie muss ich den Timer einbauen damit die Werte z.B nach 2 Minuten ohne Impuls wieder auf null gehen?

                                  Vielen Dank im Vorraus!

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

                                    @elektroniker86 sagte: wie muss ich den Timer einbauen damit die Werte z.B nach 2 Minuten ohne Impuls wieder auf null gehen?

                                    Im Trigger (unten):

                                    Bild_2022-12-14_133314229.png

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

                                      Schönen guten tag

                                      Wollte einmal fragen ob es auch klappt wenn ich den S0 vom Zähler direkt an einen giop anschließe funktioniert da dieses Skript auch?

                                      paul53 1 Reply Last reply Reply Quote 0
                                      • L
                                        lumajo @GoodOld last edited by

                                        @goodold said in S0 Stromzähler umrechnen in aktuelle Verbrauch:

                                        Habe doch etwas gefunden.

                                        viewtopic.php?f=21&t=16953&p=178154&hilit=s0#p178154

                                        Gruß

                                        Eddy

                                        Leider funktioniert der Link auch nicht mehr. Kann man das reparieren?

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

                                          @lumajo sagte in S0 Stromzähler umrechnen in aktuelle Verbrauch:

                                          Leider funktioniert der Link auch nicht mehr.

                                          der ist ja auch von 2018! Wahrscheinlich eh nicht mehr passend.

                                          @lumajo sagte in S0 Stromzähler umrechnen in aktuelle Verbrauch:

                                          Kann man das reparieren?

                                          Wenn du einen Snapshot der damaligen Forensoftware hast und mir sagst, wie der Thread hieß, kann ich es mal versuchen

                                          EDIT:
                                          Weiterlesen!
                                          Da hat @GoodOld das Skript mit Modifikationen gepostet
                                          https://forum.iobroker.net/post/183614

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

                                            @leovandavart sagte: wenn ich den S0 vom Zähler direkt an einen giop anschließe funktioniert da dieses Skript auch?

                                            Wenn die kurzen Impulse in ioBroker ankommen und nicht prellen, sollte dieses Skript funktionieren:

                                            Blockly_temp.JPG

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            723
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            66
                                            6207
                                            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