Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Strom Tagesverbrauch aus Datenbank

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Strom Tagesverbrauch aus Datenbank

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

      @paul53 komme ich nicht wirklich mit klar!
      Ist das dann ein komplett neuer Trigger ?

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

        @aphofis sagte: Ist das dann ein komplett neuer Trigger ?

        Nein, das ist nur eine Erweiterung des Programms im Tageswechsel-Trigger um die Kostenberechnung.
        Ich denke, dass ich die Variable kWh_Preis eindeutig bezeichnet habe?

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

          @paul53
          jetzt bin ich volkommen raus !

          var energie, verbrauch_heute, kWh_Preis, morgen;
          
          
          // kWh
          energie = getState("0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total").val;
          on({id: 'hs100.0.192_168_0_28.power', change: "ne"}, async function (obj) {
            var value = obj.state.val;
            var oldValue = obj.oldState.val;
            energie = (typeof energie == 'number' ? energie : 0) + ((obj.oldState ? obj.oldState.val : "") * ((obj.state ? obj.state.lc : "") - (obj.oldState ? obj.oldState.lc : ""))) / 3600000000;
            setState("0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total"/*Stomzähler_Total*/, Math.round(energie*100)/100, true);
            verbrauch_heute = energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht").val;
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Aktuell"/*Stromverbrauch_Aktuell*/, Math.round(verbrauch_heute*100)/100, true);
          });
          schedule("59 59 23 * * *", async function () {
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Gestern"/*Stromverbrauch_Gestern*/, Math.round(verbrauch_heute*100)/100, true);
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht"/*Stromzähler_Mitternacht*/, Math.round(energie*100)/100, true);
            morgen = (new Date().getTime()) + 2000;
            if (getDateObject(morgen).getDate() == 1) {
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat"/*Stromverbrauch_letzter_Monat*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende").val)*100)/100, true);
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende"/*Stromzähler_Monatsende*/, Math.round(energie*100)/100, true);
              if ((getDateObject(morgen).getMonth() + 1) == 1) {
                setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letztes_Jahr"/*Stromverbrauch_letztes_Jahr*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende").val)*100)/100, true);
                setState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende"/*Zählwert_Jahresende*/, Math.round(energie*100)/100, true);
              }
            }
          });
          schedule("59 59 23 * * *", async function () {
            kWh_Preis = getState("0_userdata.0.Aqua_Control.0.Strom.kW_Preis").val;
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Gestern"/*Stromverbrauch_Gestern*/, Math.round(verbrauch_heute*100)/100, true);
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Tag"/*Stomkosten_Tag*/, Math.round((kWh_Preis * verbrauch_heute)*100)/100, true);
            setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht"/*Stromzähler_Mitternacht*/, Math.round(energie*100)/100, true);
            morgen = (new Date().getTime()) + 2000;
            if (getDateObject(morgen).getDate() == 1) {
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat"/*Stromverbrauch_letzter_Monat*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende").val)*100)/100, true);
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende"/*Stromzähler_Monatsende*/, Math.round(energie*100)/100, true);
              if ((getDateObject(morgen).getMonth() + 1) == 1) {
                setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letztes_Jahr"/*Stromverbrauch_letztes_Jahr*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende").val)*100)/100, true);
                setState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende"/*Zählwert_Jahresende*/, Math.round(energie*100)/100, true);
              }
            }
          });
          
          Aphofis paul53 2 Replies Last reply Reply Quote 0
          • Aphofis
            Aphofis @Aphofis last edited by

            so noch mal !

            var energie, kWh_Preis, verbrauch_heute, morgen, Stromverbrauch_Monat;
            
            
            // kWh
            energie = getState("0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total").val;
            on({id: 'hs100.0.192_168_0_28.power', change: "ne"}, async function (obj) {
              var value = obj.state.val;
              var oldValue = obj.oldState.val;
              energie = (typeof energie == 'number' ? energie : 0) + ((obj.oldState ? obj.oldState.val : "") * ((obj.state ? obj.state.lc : "") - (obj.oldState ? obj.oldState.lc : ""))) / 3600000000;
              setState("0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total"/*Stomzähler_Total*/, Math.round(energie*100)/100, true);
              verbrauch_heute = energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht").val;
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Aktuell"/*Stromverbrauch_Aktuell*/, Math.round(verbrauch_heute*100)/100, true);
            });
            schedule("59 59 23 * * *", async function () {
              kWh_Preis = getState("0_userdata.0.Aqua_Control.0.Strom.kW_Preis").val;
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Gestern"/*Stromverbrauch_Gestern*/, Math.round(verbrauch_heute*100)/100, true);
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Tag"/*Stomkosten_Tag*/, Math.round((kWh_Preis * verbrauch_heute)*100)/100, true);
              setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht"/*Stromzähler_Mitternacht*/, Math.round(energie*100)/100, true);
              morgen = (new Date().getTime()) + 2000;
              if (getDateObject(morgen).getDate() == 1) {
                Stromverbrauch_Monat = energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat").val;
                setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat"/*Stromverbrauch_letzter_Monat*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende").val)*100)/100, true);
                setState("0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Monat", Math.round((kWh_Preis * Stromverbrauch_Monat)*100)/100, true);
                setState("0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende"/*Stromzähler_Monatsende*/, Math.round(energie*100)/100, true);
                if ((getDateObject(morgen).getMonth() + 1) == 1) {
                  setState("0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letztes_Jahr"/*Stromverbrauch_letztes_Jahr*/, Math.round((energie - getState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende").val)*100)/100, true);
                  setState("0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende"/*Zählwert_Jahresende*/, Math.round(energie*100)/100, true);
                }
              }
            });
            
            1 Reply Last reply Reply Quote 0
            • paul53
              paul53 @Aphofis last edited by paul53

              @aphofis
              Das sieht doch schon gut aus.
              Poste bitte den Blockly-Export, damit ich es für die Monats- und Jahreskosten ohne Datenpunkt-Zuweisung ergänzen kann.

              Edit: Zeile 21 (Stromverbrauch_Monat) ist falsch.

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

                @paul53
                Wenn ich dich nihct hätte, wäre es ziemlich still in meinem Javascript Adapter!

                <xml xmlns="https://developers.google.com/blockly/xml">
                  <variables>
                    <variable id="=}(t[?(kyO6G;_5{47zw">energie</variable>
                    <variable id="EM/_h4I|j;OmlODcL6%~">kWh_Preis</variable>
                    <variable id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</variable>
                    <variable id="_6-y]Y9]t#{T,8m8Nld|">morgen</variable>
                    <variable id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</variable>
                  </variables>
                  <block type="comment" id="hQraEeWfHpLGYW97I+DF" x="13" y="-38">
                    <field name="COMMENT">kWh</field>
                    <next>
                      <block type="variables_set" id="G;SczN+pnoC0.C-Qe`C+">
                        <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                        <value name="VALUE">
                          <block type="get_value" id="^zKNE#ta?kxb4g)gwVP7">
                            <field name="ATTR">val</field>
                            <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total</field>
                          </block>
                        </value>
                        <next>
                          <block type="on_ext" id="Y8qNI3:jg^#*MWHeg?#h">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <value name="OID0">
                              <shadow type="field_oid" id="$8eD5S!}r|AQlC#uLB4l">
                                <field name="oid">hs100.0.192_168_0_28.power</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="math_change" id="?{JM=9{pk(Z6LoI6cxQE">
                                <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                <value name="DELTA">
                                  <shadow type="math_number" id="Xf[d~|kq/aP_DDr]DK1l">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="jJYI,7@dx)qZAG@va]_." inline="false">
                                    <field name="OP">DIVIDE</field>
                                    <value name="A">
                                      <shadow type="math_number" id="=$N|b~CMlpLQkVj]ChTX">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_arithmetic" id="+)/#ivXT|4U-`QOw,xSf">
                                        <field name="OP">MULTIPLY</field>
                                        <value name="A">
                                          <shadow type="math_number" id="?MAStt72g7n3yIy5#),L">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="on_source" id="jk5ZtHcPTZxIJ9**dT.a">
                                            <field name="ATTR">oldState.val</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="%rMg4hLIG8=;w:Aw(6s%">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="math_arithmetic" id="xl,~%fsgoDoc(jGFkn(3">
                                            <field name="OP">MINUS</field>
                                            <value name="A">
                                              <shadow type="math_number" id="9MU=I%OuetykN3Zbxcj`">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="on_source" id="|[g`7q;E;C}sAlQ^|2hK">
                                                <field name="ATTR">state.lc</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="8z13T?Bu?$~.iKDR9m#0">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="on_source" id="{Xxuo?BM~S7)mhYX[6}{">
                                                <field name="ATTR">oldState.lc</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="`,WX5Lw*~W`N6I9_JIv5">
                                        <field name="NUM">3600000000</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="update" id="7;=+:MQY5gvy#wxD$E9y">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_rndfixed" id="=zTyO$T{|F{x#aruTU{1">
                                        <field name="n">2</field>
                                        <value name="x">
                                          <shadow type="math_number" id="]Ci$6#5q*i||oO%yTX$L">
                                            <field name="NUM">3.1234</field>
                                          </shadow>
                                          <block type="variables_get" id="I++a7,|Ag:L;T}v{DnFN">
                                            <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" id="0$$G4,492Crm7Qp^fvhQ">
                                        <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                        <value name="VALUE">
                                          <block type="math_arithmetic" id="jo2({_QE1,!7H,)%i+c%">
                                            <field name="OP">MINUS</field>
                                            <value name="A">
                                              <shadow type="math_number" id="p~D[c1OhSg6yE%D?0U`S">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="#`6CkJT-F54W2]Ln-F=B">
                                                <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="sgz+%W6FFv$cBl#_eP](">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="get_value" id="hizt:4X.JcU!hND,z^EZ">
                                                <field name="ATTR">val</field>
                                                <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="update" id="5(A(1PCekzhf2%D(/({~">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Aktuell</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_rndfixed" id="cG)G/,P:O,EmkP)t_?(%">
                                                <field name="n">2</field>
                                                <value name="x">
                                                  <shadow type="math_number">
                                                    <field name="NUM">3.1234</field>
                                                  </shadow>
                                                  <block type="variables_get" id="ucfMpk(paE-yhCg$-]r)">
                                                    <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="schedule" id="5L@5J0fW$;xp/^dgNg2F">
                                <field name="SCHEDULE">59 59 23 * * *</field>
                                <statement name="STATEMENT">
                                  <block type="variables_set" id="}_d?gzvnJ0UtE_2?:DOP">
                                    <field name="VAR" id="EM/_h4I|j;OmlODcL6%~">kWh_Preis</field>
                                    <value name="VALUE">
                                      <block type="get_value" id="r;?6sYap=c?qe=EatE6o">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.Aqua_Control.0.Strom.kW_Preis</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="update" id=":|C=ZeFE%G4t]HU4G,GX">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Gestern</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_rndfixed" id="8J`C*Gj|/~?j=Kx3B/7H">
                                            <field name="n">2</field>
                                            <value name="x">
                                              <shadow type="math_number">
                                                <field name="NUM">3.1234</field>
                                              </shadow>
                                              <block type="variables_get" id="s-73/vJV!W-H)A(c;K:_">
                                                <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="update" id="fyU0q-Zl{0kd|w(j-EoF">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Tag</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_rndfixed" id="~z0CZmkM7t5rr0}[~N+.">
                                                <field name="n">2</field>
                                                <value name="x">
                                                  <shadow type="math_number" id="dXHs:=qFgRcV+t{?Ncs`">
                                                    <field name="NUM">3.1234</field>
                                                  </shadow>
                                                  <block type="math_arithmetic" id="$-;8h0tU)^Dz+E^!AT01">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="1tiN}LCuPM`.wB4EEjQF">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id="P@_J}Tw6:)Lk9-24af0y">
                                                        <field name="VAR" id="EM/_h4I|j;OmlODcL6%~">kWh_Preis</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="X29_UN}T4D|q50Z_H[JE">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id="aMhp[?L9GCKZ:2mDat5k">
                                                        <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="update" id="f,A}%Bt4g30WGa]GTlwN">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_rndfixed" id="+^7Gd0J`n)J${Yur#yj+">
                                                    <field name="n">2</field>
                                                    <value name="x">
                                                      <shadow type="math_number">
                                                        <field name="NUM">3.1234</field>
                                                      </shadow>
                                                      <block type="variables_get" id="!k6k?zl^moYh}-|zn1)v">
                                                        <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="~U:saO7D4o2LncPD,$zJ">
                                                    <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                    <value name="VALUE">
                                                      <block type="math_arithmetic" id="%?pT5iAdIb,Cj~SD?g=k">
                                                        <field name="OP">ADD</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id=")jmzPSW};.V6b+2@i5eD">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="time_get" id="jHhduk?.rJa7Q(WC2W2W">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                            <field name="OPTION">object</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="b-VxX~PvK`j^J?{T2Irv">
                                                            <field name="NUM">2000</field>
                                                          </shadow>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="controls_if" id="}.7+3h;NdT^5s9c.3Vae">
                                                        <value name="IF0">
                                                          <block type="logic_compare" id="p)4g6@/nlzWJ2fJVY`mb">
                                                            <field name="OP">EQ</field>
                                                            <value name="A">
                                                              <block type="convert_from_date" id="?8CaQ3WXs]T.MCig`3^F">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                <field name="OPTION">d</field>
                                                                <value name="VALUE">
                                                                  <block type="variables_get" id="2DwPFc;$Q9WDv{n(D.6@">
                                                                    <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <block type="math_number" id="@%/xTRH:]%|r8E]]rM/M">
                                                                <field name="NUM">1</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <statement name="DO0">
                                                          <block type="variables_set" id="[]RYwR1UEl.c?`@07mq;">
                                                            <field name="VAR" id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</field>
                                                            <value name="VALUE">
                                                              <block type="math_arithmetic" id="M;%xIq9CW-o~+:SCNysS">
                                                                <field name="OP">MINUS</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id=")jmzPSW};.V6b+2@i5eD">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="0UXXV=p76)a^rVgH/hm=">
                                                                    <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="t=3jpp:4]Bq4r;+YS+KL">
                                                                    <field name="NUM">2000</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="k,2Z*ocRX~wfSia0%YG|">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="update" id="efm:)%PS{1H%^87@H}[Q">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_rndfixed" id="pe?8NRCD)LyeA[aJ,w+G">
                                                                    <field name="n">2</field>
                                                                    <value name="x">
                                                                      <shadow type="math_number" id="C6nfJzqfl40`vUOA7bK0">
                                                                        <field name="NUM">3.1234</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="cFsB;G3B|IJItb:;7dun">
                                                                        <field name="OP">MINUS</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="QV@Rpbbz-*PS;AIi8g1B">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="e+.3i!bZf2Y}x`e88TL=">
                                                                            <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="0W/uAFcI7r2Zo(;@(Br:">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="get_value" id="f8)az8=xs0,xElE/2?~I">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="update" id="TgqCzFkzY:0-iB`2Uxgl">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Monat</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_rndfixed" id="@TX2*YJu,Ev}+/Y6E$%F">
                                                                        <field name="n">2</field>
                                                                        <value name="x">
                                                                          <shadow type="math_number">
                                                                            <field name="NUM">3.1234</field>
                                                                          </shadow>
                                                                          <block type="math_arithmetic" id="gZCnEKvkUSr^PwD{lJ~6">
                                                                            <field name="OP">MULTIPLY</field>
                                                                            <value name="A">
                                                                              <shadow type="math_number">
                                                                                <field name="NUM">1</field>
                                                                              </shadow>
                                                                              <block type="variables_get" id="iV5c9^Kg(s-E?0@x]r$+">
                                                                                <field name="VAR" id="EM/_h4I|j;OmlODcL6%~">kWh_Preis</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <shadow type="math_number">
                                                                                <field name="NUM">1</field>
                                                                              </shadow>
                                                                              <block type="variables_get" id="9*G.Uuks%UX.0N#e!@?B">
                                                                                <field name="VAR" id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="update" id="K)a|UPpQHP}0#}oM0,,u">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_rndfixed" id="6@t{cc91iP1jCoF8dlIg">
                                                                            <field name="n">2</field>
                                                                            <value name="x">
                                                                              <shadow type="math_number" id="r;_Vule$5+w?pZqfy6,L">
                                                                                <field name="NUM">3.1234</field>
                                                                              </shadow>
                                                                              <block type="variables_get" id="$LHW]-?]O}qeSRMpi4v.">
                                                                                <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <next>
                                                                          <block type="controls_if" id="A5?c6a^o-I%|]=giP]X%">
                                                                            <value name="IF0">
                                                                              <block type="logic_compare" id="uGr1B3D+]Kfc)KQg$IXQ">
                                                                                <field name="OP">EQ</field>
                                                                                <value name="A">
                                                                                  <block type="convert_from_date" id="6KRF+EEuu9-]a@eW@Y74">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                                    <field name="OPTION">M</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="variables_get" id="o!khYDv4C$j?/EG1P@EH">
                                                                                        <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="B">
                                                                                  <block type="math_number" id=".Si1uKF/KOVCYhCfl-lZ">
                                                                                    <field name="NUM">1</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <statement name="DO0">
                                                                              <block type="update" id="hPTu@CRozsyZL%OJ)r-`">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letztes_Jahr</field>
                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                <value name="VALUE">
                                                                                  <block type="math_rndfixed" id="!hZyNV]dqhcWO4^[O!A@">
                                                                                    <field name="n">2</field>
                                                                                    <value name="x">
                                                                                      <shadow type="math_number" id="kd@_3s.FD__2K560^zTW">
                                                                                        <field name="NUM">3.1234</field>
                                                                                      </shadow>
                                                                                      <block type="math_arithmetic" id="brezP^ABzjiLeIByXUOM">
                                                                                        <field name="OP">MINUS</field>
                                                                                        <value name="A">
                                                                                          <shadow type="math_number">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="variables_get" id="Dmc%=h~c:^IM:SNxmR.T">
                                                                                            <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="B">
                                                                                          <shadow type="math_number" id="yg8fL_$?XWU{AjA(b2D-">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="get_value" id="dMUa.TVZ8^@p8`l(wts?">
                                                                                            <field name="ATTR">val</field>
                                                                                            <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="update" id="-eBmB,R_Ta0ks9!fo,io">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                    <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende</field>
                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="math_rndfixed" id="1L5@],}r8lfE,mp@F]14">
                                                                                        <field name="n">2</field>
                                                                                        <value name="x">
                                                                                          <shadow type="math_number">
                                                                                            <field name="NUM">3.1234</field>
                                                                                          </shadow>
                                                                                          <block type="variables_get" id="_+PGSUL?:6nLvv)4jg,j">
                                                                                            <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </statement>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </xml>
                
                1 Reply Last reply Reply Quote 0
                • Aphofis
                  Aphofis @paul53 last edited by

                  @paul53 sagte in Strom Tagesverbrauch aus Datenbank:

                  Edit: Zeile 21 (Stromverbrauch_Monat) ist falsch.

                  Was muss das denn rein !?

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

                    @aphofis sagte: Was muss das denn rein !?

                    Habe ich korrigiert. Der Datenpunkt für "Stromkosten_Jahr" muss noch zugewiesen werden.

                    <xml xmlns="https://developers.google.com/blockly/xml">
                     <variables>
                       <variable id="=}(t[?(kyO6G;_5{47zw">energie</variable>
                       <variable id="u1`@(g^zHXaeeGH)cD:{">kWh_Preis</variable>
                       <variable id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</variable>
                       <variable id="_6-y]Y9]t#{T,8m8Nld|">morgen</variable>
                       <variable id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</variable>
                       <variable id="X#X}3JX?[j_abA[mPhUl">Stromverbrauch_Jahr</variable>
                     </variables>
                     <block type="comment" id="hQraEeWfHpLGYW97I+DF" x="13" y="-38">
                       <field name="COMMENT">kWh</field>
                       <next>
                         <block type="variables_set" id="G;SczN+pnoC0.C-Qe`C+">
                           <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                           <value name="VALUE">
                             <block type="get_value" id="^zKNE#ta?kxb4g)gwVP7">
                               <field name="ATTR">val</field>
                               <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total</field>
                             </block>
                           </value>
                           <next>
                             <block type="on_ext" id="Y8qNI3:jg^#*MWHeg?#h">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                               <field name="CONDITION">ne</field>
                               <field name="ACK_CONDITION"></field>
                               <value name="OID0">
                                 <shadow type="field_oid" id="$8eD5S!}r|AQlC#uLB4l">
                                   <field name="oid">hs100.0.192_168_0_28.power</field>
                                 </shadow>
                               </value>
                               <statement name="STATEMENT">
                                 <block type="math_change" id="?{JM=9{pk(Z6LoI6cxQE">
                                   <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                   <value name="DELTA">
                                     <shadow type="math_number" id="Xf[d~|kq/aP_DDr]DK1l">
                                       <field name="NUM">1</field>
                                     </shadow>
                                     <block type="math_arithmetic" id="jJYI,7@dx)qZAG@va]_." inline="false">
                                       <field name="OP">DIVIDE</field>
                                       <value name="A">
                                         <shadow type="math_number" id="=$N|b~CMlpLQkVj]ChTX">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="+)/#ivXT|4U-`QOw,xSf">
                                           <field name="OP">MULTIPLY</field>
                                           <value name="A">
                                             <shadow type="math_number" id="?MAStt72g7n3yIy5#),L">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="on_source" id="jk5ZtHcPTZxIJ9**dT.a">
                                               <field name="ATTR">oldState.val</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="%rMg4hLIG8=;w:Aw(6s%">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="xl,~%fsgoDoc(jGFkn(3">
                                               <field name="OP">MINUS</field>
                                               <value name="A">
                                                 <shadow type="math_number" id="9MU=I%OuetykN3Zbxcj`">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="on_source" id="|[g`7q;E;C}sAlQ^|2hK">
                                                   <field name="ATTR">state.lc</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="8z13T?Bu?$~.iKDR9m#0">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="on_source" id="{Xxuo?BM~S7)mhYX[6}{">
                                                   <field name="ATTR">oldState.lc</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number" id="`,WX5Lw*~W`N6I9_JIv5">
                                           <field name="NUM">3600000000</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="update" id="7;=+:MQY5gvy#wxD$E9y">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stomzähler_Total</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="math_rndfixed" id="=zTyO$T{|F{x#aruTU{1">
                                           <field name="n">2</field>
                                           <value name="x">
                                             <shadow type="math_number" id="]Ci$6#5q*i||oO%yTX$L">
                                               <field name="NUM">3.1234</field>
                                             </shadow>
                                             <block type="variables_get" id="I++a7,|Ag:L;T}v{DnFN">
                                               <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="variables_set" id="0$$G4,492Crm7Qp^fvhQ">
                                           <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                           <value name="VALUE">
                                             <block type="math_arithmetic" id="jo2({_QE1,!7H,)%i+c%">
                                               <field name="OP">MINUS</field>
                                               <value name="A">
                                                 <shadow type="math_number" id="p~D[c1OhSg6yE%D?0U`S">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id="#`6CkJT-F54W2]Ln-F=B">
                                                   <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="sgz+%W6FFv$cBl#_eP](">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="get_value" id="hizt:4X.JcU!hND,z^EZ">
                                                   <field name="ATTR">val</field>
                                                   <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="update" id="5(A(1PCekzhf2%D(/({~">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Aktuell</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_rndfixed" id="cG)G/,P:O,EmkP)t_?(%">
                                                   <field name="n">2</field>
                                                   <value name="x">
                                                     <shadow type="math_number">
                                                       <field name="NUM">3.1234</field>
                                                     </shadow>
                                                     <block type="variables_get" id="ucfMpk(paE-yhCg$-]r)">
                                                       <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <next>
                                 <block type="schedule" id="5L@5J0fW$;xp/^dgNg2F">
                                   <field name="SCHEDULE">59 59 23 * * *</field>
                                   <statement name="STATEMENT">
                                     <block type="variables_set" id="}_d?gzvnJ0UtE_2?:DOP">
                                       <field name="VAR" id="u1`@(g^zHXaeeGH)cD:{">kWh_Preis</field>
                                       <value name="VALUE">
                                         <block type="get_value" id="r;?6sYap=c?qe=EatE6o">
                                           <field name="ATTR">val</field>
                                           <field name="OID">0_userdata.0.Aqua_Control.0.Strom.kW_Preis</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="update" id=":|C=ZeFE%G4t]HU4G,GX">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_Gestern</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="math_rndfixed" id="8J`C*Gj|/~?j=Kx3B/7H">
                                               <field name="n">2</field>
                                               <value name="x">
                                                 <shadow type="math_number">
                                                   <field name="NUM">3.1234</field>
                                                 </shadow>
                                                 <block type="variables_get" id="s-73/vJV!W-H)A(c;K:_">
                                                   <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="update" id="fyU0q-Zl{0kd|w(j-EoF">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Tag</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_rndfixed" id="~z0CZmkM7t5rr0}[~N+.">
                                                   <field name="n">2</field>
                                                   <value name="x">
                                                     <shadow type="math_number" id="dXHs:=qFgRcV+t{?Ncs`">
                                                       <field name="NUM">3.1234</field>
                                                     </shadow>
                                                     <block type="math_arithmetic" id="$-;8h0tU)^Dz+E^!AT01">
                                                       <field name="OP">MULTIPLY</field>
                                                       <value name="A">
                                                         <shadow type="math_number" id="1tiN}LCuPM`.wB4EEjQF">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="variables_get" id="P@_J}Tw6:)Lk9-24af0y">
                                                           <field name="VAR" id="u1`@(g^zHXaeeGH)cD:{">kWh_Preis</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <shadow type="math_number" id="X29_UN}T4D|q50Z_H[JE">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="variables_get" id="aMhp[?L9GCKZ:2mDat5k">
                                                           <field name="VAR" id="77Wt!M~fc;QCn4*b~)yF">verbrauch_heute</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="update" id="f,A}%Bt4g30WGa]GTlwN">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                   <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Mitternacht</field>
                                                   <field name="WITH_DELAY">FALSE</field>
                                                   <value name="VALUE">
                                                     <block type="math_rndfixed" id="+^7Gd0J`n)J${Yur#yj+">
                                                       <field name="n">2</field>
                                                       <value name="x">
                                                         <shadow type="math_number">
                                                           <field name="NUM">3.1234</field>
                                                         </shadow>
                                                         <block type="variables_get" id="!k6k?zl^moYh}-|zn1)v">
                                                           <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="variables_set" id="~U:saO7D4o2LncPD,$zJ">
                                                       <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                       <value name="VALUE">
                                                         <block type="math_arithmetic" id="%?pT5iAdIb,Cj~SD?g=k">
                                                           <field name="OP">ADD</field>
                                                           <value name="A">
                                                             <shadow type="math_number" id=")jmzPSW};.V6b+2@i5eD">
                                                               <field name="NUM">1</field>
                                                             </shadow>
                                                             <block type="time_get" id="jHhduk?.rJa7Q(WC2W2W">
                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                               <field name="OPTION">object</field>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <shadow type="math_number" id="b-VxX~PvK`j^J?{T2Irv">
                                                               <field name="NUM">2000</field>
                                                             </shadow>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="controls_if" id="}.7+3h;NdT^5s9c.3Vae">
                                                           <value name="IF0">
                                                             <block type="logic_compare" id="p)4g6@/nlzWJ2fJVY`mb">
                                                               <field name="OP">EQ</field>
                                                               <value name="A">
                                                                 <block type="convert_from_date" id="?8CaQ3WXs]T.MCig`3^F">
                                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                   <field name="OPTION">d</field>
                                                                   <value name="VALUE">
                                                                     <block type="variables_get" id="2DwPFc;$Q9WDv{n(D.6@">
                                                                       <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="math_number" id="@%/xTRH:]%|r8E]]rM/M">
                                                                   <field name="NUM">1</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="variables_set" id="[]RYwR1UEl.c?`@07mq;">
                                                               <field name="VAR" id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</field>
                                                               <value name="VALUE">
                                                                 <block type="math_arithmetic" id="cFsB;G3B|IJItb:;7dun">
                                                                   <field name="OP">MINUS</field>
                                                                   <value name="A">
                                                                     <shadow type="math_number" id="QV@Rpbbz-*PS;AIi8g1B">
                                                                       <field name="NUM">1</field>
                                                                     </shadow>
                                                                     <block type="variables_get" id="e+.3i!bZf2Y}x`e88TL=">
                                                                       <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <shadow type="math_number" id="0W/uAFcI7r2Zo(;@(Br:">
                                                                       <field name="NUM">1</field>
                                                                     </shadow>
                                                                     <block type="get_value" id="f8)az8=xs0,xElE/2?~I">
                                                                       <field name="ATTR">val</field>
                                                                       <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="update" id="efm:)%PS{1H%^87@H}[Q">
                                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                   <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letzter_Monat</field>
                                                                   <field name="WITH_DELAY">FALSE</field>
                                                                   <value name="VALUE">
                                                                     <block type="math_rndfixed" id="pe?8NRCD)LyeA[aJ,w+G">
                                                                       <field name="n">2</field>
                                                                       <value name="x">
                                                                         <shadow type="math_number" id="C6nfJzqfl40`vUOA7bK0">
                                                                           <field name="NUM">3.1234</field>
                                                                         </shadow>
                                                                         <block type="variables_get" id="5fQ9Je8P{w00}PB$T2Y(">
                                                                           <field name="VAR" id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <next>
                                                                     <block type="update" id="TgqCzFkzY:0-iB`2Uxgl">
                                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                       <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromkosten_Monat</field>
                                                                       <field name="WITH_DELAY">FALSE</field>
                                                                       <value name="VALUE">
                                                                         <block type="math_rndfixed" id="@TX2*YJu,Ev}+/Y6E$%F">
                                                                           <field name="n">2</field>
                                                                           <value name="x">
                                                                             <shadow type="math_number">
                                                                               <field name="NUM">3.1234</field>
                                                                             </shadow>
                                                                             <block type="math_arithmetic" id="gZCnEKvkUSr^PwD{lJ~6">
                                                                               <field name="OP">MULTIPLY</field>
                                                                               <value name="A">
                                                                                 <shadow type="math_number">
                                                                                   <field name="NUM">1</field>
                                                                                 </shadow>
                                                                                 <block type="variables_get" id="iV5c9^Kg(s-E?0@x]r$+">
                                                                                   <field name="VAR" id="u1`@(g^zHXaeeGH)cD:{">kWh_Preis</field>
                                                                                 </block>
                                                                               </value>
                                                                               <value name="B">
                                                                                 <shadow type="math_number">
                                                                                   <field name="NUM">1</field>
                                                                                 </shadow>
                                                                                 <block type="variables_get" id="9*G.Uuks%UX.0N#e!@?B">
                                                                                   <field name="VAR" id="CXvj%f2,^`q.7fX9iSyn">Stromverbrauch_Monat</field>
                                                                                 </block>
                                                                               </value>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </value>
                                                                       <next>
                                                                         <block type="update" id="K)a|UPpQHP}0#}oM0,,u">
                                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                           <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromzähler_Monatsende</field>
                                                                           <field name="WITH_DELAY">FALSE</field>
                                                                           <value name="VALUE">
                                                                             <block type="math_rndfixed" id="6@t{cc91iP1jCoF8dlIg">
                                                                               <field name="n">2</field>
                                                                               <value name="x">
                                                                                 <shadow type="math_number" id="r;_Vule$5+w?pZqfy6,L">
                                                                                   <field name="NUM">3.1234</field>
                                                                                 </shadow>
                                                                                 <block type="variables_get" id="$LHW]-?]O}qeSRMpi4v.">
                                                                                   <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                                 </block>
                                                                               </value>
                                                                             </block>
                                                                           </value>
                                                                           <next>
                                                                             <block type="controls_if" id="A5?c6a^o-I%|]=giP]X%">
                                                                               <value name="IF0">
                                                                                 <block type="logic_compare" id="uGr1B3D+]Kfc)KQg$IXQ">
                                                                                   <field name="OP">EQ</field>
                                                                                   <value name="A">
                                                                                     <block type="convert_from_date" id="6KRF+EEuu9-]a@eW@Y74">
                                                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                                       <field name="OPTION">M</field>
                                                                                       <value name="VALUE">
                                                                                         <block type="variables_get" id="o!khYDv4C$j?/EG1P@EH">
                                                                                           <field name="VAR" id="_6-y]Y9]t#{T,8m8Nld|">morgen</field>
                                                                                         </block>
                                                                                       </value>
                                                                                     </block>
                                                                                   </value>
                                                                                   <value name="B">
                                                                                     <block type="math_number" id=".Si1uKF/KOVCYhCfl-lZ">
                                                                                       <field name="NUM">1</field>
                                                                                     </block>
                                                                                   </value>
                                                                                 </block>
                                                                               </value>
                                                                               <statement name="DO0">
                                                                                 <block type="variables_set" id="VN~@8}Wk+#~sY?X6J$yK">
                                                                                   <field name="VAR" id="X#X}3JX?[j_abA[mPhUl">Stromverbrauch_Jahr</field>
                                                                                   <value name="VALUE">
                                                                                     <block type="math_arithmetic" id="brezP^ABzjiLeIByXUOM">
                                                                                       <field name="OP">MINUS</field>
                                                                                       <value name="A">
                                                                                         <shadow type="math_number">
                                                                                           <field name="NUM">1</field>
                                                                                         </shadow>
                                                                                         <block type="variables_get" id="Dmc%=h~c:^IM:SNxmR.T">
                                                                                           <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                                         </block>
                                                                                       </value>
                                                                                       <value name="B">
                                                                                         <shadow type="math_number" id="yg8fL_$?XWU{AjA(b2D-">
                                                                                           <field name="NUM">1</field>
                                                                                         </shadow>
                                                                                         <block type="get_value" id="dMUa.TVZ8^@p8`l(wts?">
                                                                                           <field name="ATTR">val</field>
                                                                                           <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende</field>
                                                                                         </block>
                                                                                       </value>
                                                                                     </block>
                                                                                   </value>
                                                                                   <next>
                                                                                     <block type="update" id="hPTu@CRozsyZL%OJ)r-`">
                                                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                       <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Stromverbrauch_letztes_Jahr</field>
                                                                                       <field name="WITH_DELAY">FALSE</field>
                                                                                       <value name="VALUE">
                                                                                         <block type="math_rndfixed" id="!hZyNV]dqhcWO4^[O!A@">
                                                                                           <field name="n">2</field>
                                                                                           <value name="x">
                                                                                             <shadow type="math_number" id="kd@_3s.FD__2K560^zTW">
                                                                                               <field name="NUM">3.1234</field>
                                                                                             </shadow>
                                                                                             <block type="variables_get" id="}Gg8g=dZ_L+D1e6KF5.Z">
                                                                                               <field name="VAR" id="X#X}3JX?[j_abA[mPhUl">Stromverbrauch_Jahr</field>
                                                                                             </block>
                                                                                           </value>
                                                                                         </block>
                                                                                       </value>
                                                                                       <next>
                                                                                         <block type="update" id="S2)Qgv/)$grhJLzSd@Da">
                                                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                           <field name="OID">Object ID</field>
                                                                                           <field name="WITH_DELAY">FALSE</field>
                                                                                           <value name="VALUE">
                                                                                             <block type="math_rndfixed" id="qoCW5Q,Oy.pHW;,}A#4o">
                                                                                               <field name="n">2</field>
                                                                                               <value name="x">
                                                                                                 <shadow type="math_number">
                                                                                                   <field name="NUM">3.1234</field>
                                                                                                 </shadow>
                                                                                                 <block type="math_arithmetic" id="_E!pt_eX~kE(kUk=tmjG">
                                                                                                   <field name="OP">MULTIPLY</field>
                                                                                                   <value name="A">
                                                                                                     <shadow type="math_number">
                                                                                                       <field name="NUM">1</field>
                                                                                                     </shadow>
                                                                                                     <block type="variables_get" id="D$7olGnz_lsHlJ(+hvW#">
                                                                                                       <field name="VAR" id="u1`@(g^zHXaeeGH)cD:{">kWh_Preis</field>
                                                                                                     </block>
                                                                                                   </value>
                                                                                                   <value name="B">
                                                                                                     <shadow type="math_number">
                                                                                                       <field name="NUM">1</field>
                                                                                                     </shadow>
                                                                                                     <block type="variables_get" id="{v)HHA!KqH$e%*_@(wZ8">
                                                                                                       <field name="VAR" id="X#X}3JX?[j_abA[mPhUl">Stromverbrauch_Jahr</field>
                                                                                                     </block>
                                                                                                   </value>
                                                                                                 </block>
                                                                                               </value>
                                                                                             </block>
                                                                                           </value>
                                                                                           <next>
                                                                                             <block type="update" id="-eBmB,R_Ta0ks9!fo,io">
                                                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                               <field name="OID">0_userdata.0.Aqua_Control.0.Strom.Zählwert_Jahresende</field>
                                                                                               <field name="WITH_DELAY">FALSE</field>
                                                                                               <value name="VALUE">
                                                                                                 <block type="math_rndfixed" id="1L5@],}r8lfE,mp@F]14">
                                                                                                   <field name="n">2</field>
                                                                                                   <value name="x">
                                                                                                     <shadow type="math_number">
                                                                                                       <field name="NUM">3.1234</field>
                                                                                                     </shadow>
                                                                                                     <block type="variables_get" id="_+PGSUL?:6nLvv)4jg,j">
                                                                                                       <field name="VAR" id="=}(t[?(kyO6G;_5{47zw">energie</field>
                                                                                                     </block>
                                                                                                   </value>
                                                                                                 </block>
                                                                                               </value>
                                                                                             </block>
                                                                                           </next>
                                                                                         </block>
                                                                                       </next>
                                                                                     </block>
                                                                                   </next>
                                                                                 </block>
                                                                               </statement>
                                                                             </block>
                                                                           </next>
                                                                         </block>
                                                                       </next>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                    </xml>
                    

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

                      @paul53
                      Supi! Vielen Dank.
                      Wann wird denn der Tages Preis angezeigt !? weil der Datenpunkt noch leer ist.
                      oder warten wenn 24 std um sind !?

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

                        @aphofis sagte: Wann wird denn der Tages Preis angezeigt !?

                        Ab Mitternacht.

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

                          @paul53
                          OK dumme Frage!
                          so siehts jetzt aus

                          stromverbrauch.png

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

                            @paul53
                            Momentan sieht es so aus.
                            stromverbrauch.png
                            Woran liegt es, das Kosten Tag noch nichts anzeigt !? muss erst ein kompletter Tag getriggert werden???
                            Kann man auch Kosten gestern, letzten Monat und letztes Jahr in der Steuerung aufnehmen!?

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

                              @aphofis sagte: Woran liegt es, das Kosten Tag noch nichts anzeigt !?

                              Weil der kWh-Preis ein Komma anstelle eines Punktes enthält?
                              Der Wert von "Stromkosten_Tag" enthält einen String "0,00". Alle Datenpunkte müssen vom Typ "number" sein!

                              @aphofis sagte in Strom Tagesverbrauch aus Datenbank:

                              Kann man auch Kosten gestern, letzten Monat und letztes Jahr in der Steuerung aufnehmen!?

                              Die sind enthalten. Kosten gestern = Stromkosten_Tag.

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

                                @paul53 sagte:

                                Weil der kWh-Preis ein Komma anstelle eines Punktes enthält?

                                Das hatte ich schon bei seinem ersten Screenshot gedacht.
                                Allerdings enthält inzwischen alles ein Komma als Dezimaltrenner

                                @aphofis sagte in Strom Tagesverbrauch aus Datenbank:

                                Kann man auch Kosten gestern, letzten Monat und letztes Jahr in der Steuerung aufnehmen!?

                                Das macht auch alles der Source-Analytics Adapter.
                                Es wäre doch jetzt etwas übertrieben diesen Adapter hier nochmal durch Paul neu erfinden wollen zu lassen.

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

                                  @homoran sagte: Das macht auch alles der Source-Analytics Adapter.

                                  Mein Reden

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

                                    @paul53
                                    Dann werde ich Dussel das mal ganz schnell ändern

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

                                      @paul53
                                      Ich habe nur nicht verstanden, wie man in den sourceanalytics Adapter dann das Gerät implementiert woraus die Watt genommen wird.

                                      Hatte die drei Datenpunkte die Konvertierung Standard wert 0,00 raus genommen Datenpunkte liegen als Zahl vor oder müssen die als zeichenkette eingestellt werden!?

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

                                        @aphofis sagte: Datenpunkte liegen als Zahl vor oder müssen die als zeichenkette eingestellt werden!?

                                        Wiederhole mich: Alle Datenpunkte müssen vom Typ "number" sein!

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

                                          @paul53
                                          Ja habe alle Datenpunkte
                                          Als Zahl eingestellt aber kosten werden nicht angezeigt
                                          0FCA6800-464B-40DA-A464-6CFD52ED812A.jpeg

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

                                            @aphofis sagte: kosten werden nicht angezeigt

                                            Dann prüfe mal:

                                            Bild_2021-09-30_110829.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            397
                                            Online

                                            32.0k
                                            Users

                                            80.4k
                                            Topics

                                            1.3m
                                            Posts

                                            blockly monitoring
                                            3
                                            54
                                            2253
                                            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