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.
    • 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
                            • leovandavart
                              leovandavart last edited by

                              @paul53 ich hab das so abgebaut nur leider passiert da leider nix

                              gpio bringt dauerhaft true im objekt baum

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

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

                                gpio bringt dauerhaft true

                                was für eine Hardware und was für ein OS?
                                Welcher GPIO und womit wird der augelesen?

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

                                  @homoran

                                  rasberry pi 4 8gb nomrales rasberry os
                                  gpio 20

                                  stromzähler eltako dsz15d 3x80a wo die s0 schnitstelle raus kommt

                                  Homoran 2 Replies Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @leovandavart last edited by

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

                                    nomrales rasberry os

                                    heisst in "Codenamen" wie?

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

                                      @homoran bookworm heißt es

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

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

                                        @homoran bookworm heißt es

                                        und due gpio willst du über den rpi2 Adapter auslesen?

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

                                          @homoran genau sollte ja eigendlich gehen oder gibt es eine andere möglichkeit

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

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

                                            sollte ja eigendlich gehen

                                            nicht mehr unter bookworm. Dort werden neue Pakete verwendet.
                                            Dazu müsste der Adapter angepasst werden.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            547
                                            Online

                                            31.6k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

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