Navigation

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

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Waschmaschine

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

      @Asgothian

      Den Baustein steure mit setze ersetzen, richtig? So, wie jetzt das Beispiel.

      Screenshot_2020-08-30 javascript - ioBroker(3).png

      Screenshot_2020-08-30 javascript - ioBroker(4).png

      Richtiger Ansatz?

      Asgothian 1 Reply Last reply Reply Quote 0
      • Asgothian
        Asgothian Developer @Slowman last edited by

        @Slowman Exakt

        Slowman 1 Reply Last reply Reply Quote 1
        • Slowman
          Slowman @Asgothian last edited by Slowman

          @Asgothian

          So, denke mal das es so passt. Den Wert Stromkosten holt er sich jetzt nur noch aus dem Datenpunkt. Den Rest habe ich umgeändert.

          Screenshot_2020-08-30 javascript - ioBroker(5).png Screenshot_2020-08-30 javascript - ioBroker(6).png

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id="ZM0_}Z7tdRGw|OEboSUb">Geschirrspüler Start</variable>
              <variable id="eA~.c[yxGq8R8{!f%:h#">Geschirrspüler Ende</variable>
              <variable id="mB|+S;|3QAoN;5)#v~5u">Startzeit</variable>
              <variable id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</variable>
              <variable type="timeout" id="timeout4">timeout4</variable>
              <variable id="Y6O#H}N0!M,ytg,|2#=p">EndZeit</variable>
              <variable id="E!Psgr8)b[wT9RI9HC[">Dauer</variable>
              <variable type="timeout" id="timeout2">timeout2</variable>
              <variable type="timeout" id="timeout">timeout</variable>
              <variable id="6zR3cy!$c$@HV6PVyN2!">Stromverbrauch pro Waschgang</variable>
              <variable id="A/ePxr2pS]eX9Gqw8qOT">Stromkosten pro Waschgang</variable>
            </variables>
            <block type="variables_set" id="iv@mYR:]_^Upop_#qFH;" x="838" y="-62">
              <field name="VAR" id="ZM0_}Z7tdRGw|OEboSUb">Geschirrspüler Start</field>
              <value name="VALUE">
                <block type="math_number" id="8cbWw~V?WpG?Ccg#quGr">
                  <field name="NUM">0</field>
                </block>
              </value>
              <next>
                <block type="variables_set" id="VK~5i!)A9wx1YlVROhEu">
                  <field name="VAR" id="eA~.c[yxGq8R8{!f%:h#">Geschirrspüler Ende</field>
                  <value name="VALUE">
                    <block type="math_number" id="bNEma8]R^c,:H*N9q#W_">
                      <field name="NUM">0</field>
                    </block>
                  </value>
                  <next>
                    <block type="variables_set" id="UgHqqacY6TM}7wOP;wsy">
                      <field name="VAR" id="mB|+S;|3QAoN;5)#v~5u">Startzeit</field>
                      <value name="VALUE">
                        <block type="math_number" id=")00MK5w]q^f%?v+:k60k">
                          <field name="NUM">0</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="i@;~wXOo)(5+=$9v:QF">
                          <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="stD7DD67D[4(YSQ3dCvR">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="on_ext" id="%l??Ns0%ZOhlZQJn)RIY">
                              <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="8p+iN2CjzC1M$2o|Xq=m">
                                  <field name="oid">shelly.0.SHPLG-S#F8C02D#1.Relay0.Power</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="-4y,4m5H68[U,UjJH(0">
                                  <mutation elseif="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_operation" id="-^U__L=#GGG_LD~6o~hg" inline="false">
                                      <field name="OP">AND</field>
                                      <comment pinned="false" h="84" w="432">Falls Maschinengang erkannt (Wattzahl &gt;200) UND Modus ist auf falsch dann starte und schreibe den aktuellen verbrauch in den Datenpunkt</comment>
                                      <value name="A">
                                        <block type="logic_compare" id="-%Kg)H+S;{}Yyd@cqe=l">
                                          <field name="OP">GTE</field>
                                          <value name="A">
                                            <block type="on_source" id="QS5)==Ahwtfe.nNTlR@">
                                              <field name="ATTR">state.val</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="OT1x**T)z3hCtGxhqDDI">
                                              <field name="NUM">100</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id=",LW++gUB/lbO[yiNJdv">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="variables_get" id="[$/1md}o9xogfLp!}WA">
                                              <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="V}KP*,b;J,.3q802Q0l^">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="variables_set" id="HHIFm}6:U#VVrIRv7e|">
                                      <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="%.!o$LmcZOm0##5WWoJ">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="comment" id="#niZnE_tgmb6Kk@Fr$fl">
                                          <field name="COMMENT">Falls ein Programm ein paar Stunden vorher gestartet wurde sieht man wenn ob die Maschine Startet</field>
                                          <next>
                                            <block type="telegram" id="n~A-iElr}zQGmh%dFiiq">
                                              <field name="INSTANCE"></field>
                                              <field name="LOG"></field>
                                              <field name="SILENT">FALSE</field>
                                              <field name="PARSEMODE">default</field>
                                              <value name="MESSAGE">
                                                <shadow type="text" id="Wo1gRgI.3j=lL!S+j/dX">
                                                  <field name="TEXT">Geschirrspüler läuft jetzt</field>
                                                </shadow>
                                              </value>
                                              <value name="USERNAME">
                                                <block type="text" id="BW6HWl3D$1GxO~]!7=|/">
                                                  <field name="TEXT">Frank</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="variables_set" id=":|$gI;wDf+V^N6RD,#T%">
                                                  <field name="VAR" id="ZM0_}Z7tdRGw|OEboSUb">Geschirrspüler Start</field>
                                                  <value name="VALUE">
                                                    <block type="get_value" id="b$lgvB*z^u:a@_hX4hL]">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">shelly.0.SHPLG-S#F8C02D#1.Relay0.Energy</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="comment" id="~kES-^z;=BjbpxXK9yo}">
                                                      <field name="COMMENT">Startzeit speichern zur Berechnung der gesamt Laufzeit</field>
                                                      <next>
                                                        <block type="variables_set" id="wN^[UA.lTmij81cgn#[@">
                                                          <field name="VAR" id="mB|+S;|3QAoN;5)#v~5u">Startzeit</field>
                                                          <value name="VALUE">
                                                            <block type="time_get" id="!~RJI|{hH)+qo._Sk]q;">
                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                              <field name="OPTION">mid</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_operation" id="[:7QWv4Op8S6o@lG45(y" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_operation" id="Y(DY5TjFzyX=D_%6;##7" inline="false">
                                          <field name="OP">AND</field>
                                          <comment pinned="false" h="49" w="563">Falls der Verbrauch vorher grösser 3 Watt ist dun dann unter 2.9 fällt und der Modus ist Wahr dann beende den Waschmodus.</comment>
                                          <value name="A">
                                            <block type="logic_compare" id="ydDpT$dnoB]3iV0{BiSL">
                                              <field name="OP">GTE</field>
                                              <value name="A">
                                                <block type="on_source" id="TI;SFi6{]mr@]Ir[QtYg">
                                                  <field name="ATTR">oldState.val</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="wCZMQjlh5X9NCvvT5hm">
                                                  <field name="NUM">4</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_compare" id="igy_8vlVI|k$sL-O!Ya">
                                              <field name="OP">LT</field>
                                              <value name="A">
                                                <block type="on_source" id="oKi^o%$Qa%i0^MVE?s)Y">
                                                  <field name="ATTR">state.val</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="bx}yjZ_C7J2#/$NzLoS">
                                                  <field name="NUM">3.9</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="}A,!m2TVXL.^LQWg%!e|">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="variables_get" id="r/rnzWL?1!/.2!+pr@5(">
                                              <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="S,c^%FKOd(.(Q(BL!=g">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="comment" id="l_UxyF[7l.W[9+KCjUzR">
                                      <field name="COMMENT">Zusätzliches Timeout "Wenn für 3 Minuten weniger wie 2 Watt verbraucht werden ist die Maschine Fertig</field>
                                      <next>
                                        <block type="timeouts_settimeout" id="FT-Aebrk1nQxA(D0}bjX">
                                          <field name="NAME">timeout4</field>
                                          <field name="DELAY">58</field>
                                          <field name="UNIT">min</field>
                                          <statement name="STATEMENT">
                                            <block type="controls_if" id="z#h:Sgr$YhLz;/sJ:;q+">
                                              <value name="IF0">
                                                <block type="logic_operation" id="k8k9;Ypy[xEoy_mm2)_">
                                                  <field name="OP">AND</field>
                                                  <comment pinned="false" h="80" w="160">Falls Verbrauch unter 3 Watt fällt und der Modus ist Wahr dann beende den Waschmodus.</comment>
                                                  <value name="A">
                                                    <block type="logic_compare" id="kgv@}Wxf%H71-6[LoA2">
                                                      <field name="OP">LT</field>
                                                      <value name="A">
                                                        <block type="get_value" id="p,SxCr5G+PUY,ToS?g64">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">shelly.0.SHPLG-S#F8C02D#1.Relay0.Power</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="math_number" id="OqAYX/y!j21Y]dVWdJ82">
                                                          <field name="NUM">4</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_compare" id="7k@eXCwx[(!$|iKjlX?">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="variables_get" id="_DQp6uLs##,TQ84hTu,X">
                                                          <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="m[z$R3x+t7q:t3NePYda">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="variables_set" id="qp?4+EqX93)A7YpT,6t">
                                                  <field name="VAR" id="Y6O#H}N0!M,ytg,|2#=p">EndZeit</field>
                                                  <value name="VALUE">
                                                    <block type="time_get" id="GGpCtGnJ^|XKC8!mS_S">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                      <field name="OPTION">mid</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="variables_set" id="%6t-7+/fnYOGIfAn+5qZ">
                                                      <field name="VAR" id="E!Psgr8)b[wT9RI9HC[">Dauer</field>
                                                      <value name="VALUE">
                                                        <block type="math_arithmetic" id="weAo4py)IC-58@is52Cg">
                                                          <field name="OP">MINUS</field>
                                                          <value name="A">
                                                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="i0wQ=PLCNBKJc5hpz7w7">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id="BzJhg};$iBly2m!o}f">
                                                              <field name="VAR" id="Y6O#H}N0!M,ytg,|2#=p">EndZeit</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id=":dsZj_obi1eBcP%hJC">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id="(j[-tV+kr]?e7G1s}-m4">
                                                              <field name="VAR" id="mB|+S;|3QAoN;5)#v~5u">Startzeit</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="variables_set" id="vj!Vu=sDr5yt.:ZU#OfU">
                                                          <field name="VAR" id="Hhe!Hg(xh7gHuy(6hLlx">Geschirrspueler_EinAus</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="5xCJ(QRB3mIo5.f1Fsg">
                                                              <field name="BOOL">FALSE</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="variables_set" id="w5M[qUK=HD;mzLUoU@hK">
                                                              <field name="VAR" id="eA~.c[yxGq8R8{!f%:h#">Geschirrspüler Ende</field>
                                                              <value name="VALUE">
                                                                <block type="get_value" id="}_}=j6pEBm+0afN/394(">
                                                                  <field name="ATTR">val</field>
                                                                  <field name="OID">shelly.0.SHPLG-S#F8C02D#1.Relay0.Energy</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="controls_if" id="RMHH_kch:3FQxQaWZ]lG">
                                                                  <value name="IF0">
                                                                    <block type="logic_compare" id="aQAt;O+zWr%|HvV+j=P;">
                                                                      <field name="OP">GT</field>
                                                                      <value name="A">
                                                                        <block type="variables_get" id="Diq%z$U$)7AU#3nVC$@T">
                                                                          <field name="VAR" id="E!Psgr8)b[wT9RI9HC[">Dauer</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <block type="math_number" id="?yyDu7by5#NGlcmd1pve">
                                                                          <field name="NUM">2</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <statement name="DO0">
                                                                    <block type="timeouts_settimeout" id=",NjGW@Wtt+n7RKNkcxK!">
                                                                      <field name="NAME">timeout2</field>
                                                                      <field name="DELAY">5</field>
                                                                      <field name="UNIT">sec</field>
                                                                      <statement name="STATEMENT">
                                                                        <block type="comment" id="P5Kh.,h#^UMV[v9Yzkh">
                                                                          <field name="COMMENT">Daten Schreiben für History Verbrauch pro Waschgang</field>
                                                                          <next>
                                                                            <block type="variables_set" id="SX5GEsOAo0@yW:@TRwa.">
                                                                              <field name="VAR" id="6zR3cy!$c$@HV6PVyN2!">Stromverbrauch pro Waschgang</field>
                                                                              <value name="VALUE">
                                                                                <block type="math_arithmetic" id="MHdw2]y[BCS~xV|[m3_T">
                                                                                  <field name="OP">DIVIDE</field>
                                                                                  <value name="A">
                                                                                    <shadow type="math_number" id=";x*EJIT-UHcl7Q0j{G#U">
                                                                                      <field name="NUM">1</field>
                                                                                    </shadow>
                                                                                    <block type="math_rndfixed" id="%DceoHsJ1|2ktnX;ik;Y">
                                                                                      <field name="n">2</field>
                                                                                      <value name="x">
                                                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="}[m8CJ[~.H(X2Ez)$MNC">
                                                                                          <field name="NUM">3.1234</field>
                                                                                        </shadow>
                                                                                        <block type="math_arithmetic" id="B1^}sQT!K1/]T@W1L[xe" inline="false">
                                                                                          <field name="OP">MINUS</field>
                                                                                          <value name="A">
                                                                                            <shadow type="math_number" id=";x*EJIT-UHcl7Q0j{G#U">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="get_value_var" id="NE:F^hWocTr{gUS)^@+C">
                                                                                              <field name="ATTR">val</field>
                                                                                              <value name="OID">
                                                                                                <shadow type="text" id="3,LTg[wy.`^G94cq1a9U">
                                                                                                  <field name="TEXT"></field>
                                                                                                </shadow>
                                                                                                <block type="variables_get" id="nFN@SA]Ly$)Yxe1!haUM">
                                                                                                  <field name="VAR" id="eA~.c[yxGq8R8{!f%:h#">Geschirrspüler Ende</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <shadow type="math_number" id=")KC,Lt~MMGdb=v/v*dsR">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="get_value_var" id="UjRGZ[Ue75(_M[ns82He">
                                                                                              <field name="ATTR">val</field>
                                                                                              <value name="OID">
                                                                                                <shadow type="text">
                                                                                                  <field name="TEXT"></field>
                                                                                                </shadow>
                                                                                                <block type="variables_get" id="{|N8PR7|_,8J=eXQy:zw">
                                                                                                  <field name="VAR" id="ZM0_}Z7tdRGw|OEboSUb">Geschirrspüler Start</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="B">
                                                                                    <shadow type="math_number" id="HI4EdrTO/8H*p;STQrM">
                                                                                      <field name="NUM">1000</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="comment" id="gigTfir/Q3o9S2gzD{90">
                                                                                  <field name="COMMENT">Ausrechnen der Stromkosten für diesen Waschgang und in den Datenpunkt schreiben</field>
                                                                                  <next>
                                                                                    <block type="variables_set" id="O#@cdr5/Wy!Z2G_`7AO7">
                                                                                      <field name="VAR" id="A/ePxr2pS]eX9Gqw8qOT">Stromkosten pro Waschgang</field>
                                                                                      <value name="VALUE">
                                                                                        <block type="math_rndfixed" id="}:X/;ygx%4P%rz05DOma">
                                                                                          <field name="n">4</field>
                                                                                          <value name="x">
                                                                                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="}[m8CJ[~.H(X2Ez)$MNC">
                                                                                              <field name="NUM">3.1234</field>
                                                                                            </shadow>
                                                                                            <block type="math_arithmetic" id="8~CdvibGo?t^vfDF.ry">
                                                                                              <field name="OP">DIVIDE</field>
                                                                                              <value name="A">
                                                                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id=";xEJIT-UHcl7Q0j{G#U">
                                                                                                  <field name="NUM">1</field>
                                                                                                </shadow>
                                                                                                <block type="math_arithmetic" id="jk_su~s;-F0M0+89zf6!">
                                                                                                  <field name="OP">MULTIPLY</field>
                                                                                                  <value name="A">
                                                                                                    <shadow type="math_number" id=";xEJIT-UHcl7Q0j{G#U">
                                                                                                      <field name="NUM">1</field>
                                                                                                    </shadow>
                                                                                                    <block type="get_value_var" id="prkh^UeeTL-n$}%VsXjN">
                                                                                                      <field name="ATTR">val</field>
                                                                                                      <value name="OID">
                                                                                                        <shadow type="text">
                                                                                                          <field name="TEXT"></field>
                                                                                                        </shadow>
                                                                                                        <block type="variables_get" id="9aTw2Fq6Ee*]bt,IM:Mz">
                                                                                                          <field name="VAR" id="6zR3cy!$c$@HV6PVyN2!">Stromverbrauch pro Waschgang</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                  <value name="B">
                                                                                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id=")KC,Lt~MMGdb=v/vdsR">
                                                                                                      <field name="NUM">1000</field>
                                                                                                    </shadow>
                                                                                                    <block type="get_value" id="C2GwSFjOKe-T0-p9HB0">
                                                                                                      <field name="ATTR">val</field>
                                                                                                      <field name="OID">0_userdata.0.Eigener_Datenpunkt.WaschmaschineVerbrauchKosten.Preis_KW</field>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <shadow type="math_number" id="k|9t!~JsdR/2hn,.Ta~.">
                                                                                                  <field name="NUM">1000</field>
                                                                                                </shadow>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <next>
                                                                                        <block type="comment" id="wF!c?,7;T=c_:f5E$ca%">
                                                                                          <field name="COMMENT">Alexa Benachrichtung</field>
                                                                                          <next>
                                                                                            <block type="control" id="w3DS%f?P5Y+pO7;1V~SB">
                                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                              <field name="OID">alexa2.0.Echo-Devices.5f894234bce346edbb4a1adce0045f99.Commands.speak</field>
                                                                                              <field name="WITH_DELAY">FALSE</field>
                                                                                              <value name="VALUE">
                                                                                                <block type="text" id="vtK95A?T0Tj#c5DEZ[5~">
                                                                                                  <field name="TEXT">50;Geschirrspüler ist fertig</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <next>
                                                                                                <block type="comment" id="@dC$^axcVYkgm8#naev1">
                                                                                                  <field name="COMMENT">Nachricht über Telegramm</field>
                                                                                                  <next>
                                                                                                    <block type="telegram" id=":)Sqh|eio_J%+h7Q@6nJ">
                                                                                                      <field name="INSTANCE"></field>
                                                                                                      <field name="LOG"></field>
                                                                                                      <field name="SILENT">FALSE</field>
                                                                                                      <field name="PARSEMODE">default</field>
                                                                                                      <value name="MESSAGE">
                                                                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="zaE.r=+WylppU_4Nmdx~">
                                                                                                          <field name="TEXT">Waschmaschine ist fertig</field>
                                                                                                        </shadow>
                                                                                                        <block type="text_join" id="3,~.TJZeugM.!B%S1^X}">
                                                                                                          <mutation items="13"></mutation>
                                                                                                          <value name="ADD0">
                                                                                                            <block type="text" id="|9?4%icsy2}Q088ry:q">
                                                                                                              <field name="TEXT">😎😎😎 Die Geschirrspüler ist Fertig. 😎😎😎</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD1">
                                                                                                            <block type="time_get" id="a?D^RPe+s+Si=kkfgj[">
                                                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                                                                                              <field name="OPTION">custom</field>
                                                                                                              <field name="FORMAT">\n</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD2">
                                                                                                            <block type="text" id="grfj-@D75~7#;4n|Zja">
                                                                                                              <field name="TEXT">Dauer: </field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD3">
                                                                                                            <block type="variables_get" id="n.X3BETU_{qnfXV+E~:">
                                                                                                              <field name="VAR" id="E!Psgr8)b[wT9RI9HC[">Dauer</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD4">
                                                                                                            <block type="text" id="hB0LeD{cRvcWSjG+y.+=">
                                                                                                              <field name="TEXT"> Minuten.</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD5">
                                                                                                            <block type="time_get" id="cA93H,ih=ovnjMRR4?Q6">
                                                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                                                                                              <field name="OPTION">custom</field>
                                                                                                              <field name="FORMAT">\n</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD6">
                                                                                                            <block type="text" id="iq5TjK!:5+gf]#fZ42]">
                                                                                                              <field name="TEXT">Verbrauch: </field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD7">
                                                                                                            <shadow type="math_number" id="}[m8CJ[~.H(X2Ez)$MNC">
                                                                                                              <field name="NUM">3.1234</field>
                                                                                                            </shadow>
                                                                                                            <block type="math_rndfixed" id="F$p9}8[w8:T(m=e~CovU">
                                                                                                              <field name="n">2</field>
                                                                                                              <value name="x">
                                                                                                                <shadow type="math_number" id="RA,BraD%kOetT,YHoI^E">
                                                                                                                  <field name="NUM">3.1234</field>
                                                                                                                </shadow>
                                                                                                                <block type="get_value_var" id="m3kCO;qi/UVymfMc-a^S">
                                                                                                                  <field name="ATTR">val</field>
                                                                                                                  <value name="OID">
                                                                                                                    <shadow type="text">
                                                                                                                      <field name="TEXT"></field>
                                                                                                                    </shadow>
                                                                                                                    <block type="variables_get" id="itHxUmSztiKq#*Ks;J@g">
                                                                                                                      <field name="VAR" id="6zR3cy!$c$@HV6PVyN2!">Stromverbrauch pro Waschgang</field>
                                                                                                                    </block>
                                                                                                                  </value>
                                                                                                                </block>
                                                                                                              </value>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD8">
                                                                                                            <block type="text" id="Gq}sI5FR]paEBl+;3+e">
                                                                                                              <field name="TEXT">kWh.</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD9">
                                                                                                            <block type="time_get" id="Y::7Q};)~]J%;pazFL$-">
                                                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                                                                                              <field name="OPTION">custom</field>
                                                                                                              <field name="FORMAT">\n</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD10">
                                                                                                            <block type="text" id=":9AW!oL(k/~DAOIvpo.B">
                                                                                                              <field name="TEXT">Kosten:</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD11">
                                                                                                            <block type="math_rndfixed" id=",4=#-lGzI:f:Ap/,[n?9">
                                                                                                              <field name="n">2</field>
                                                                                                              <value name="x">
                                                                                                                <shadow type="math_number" id="xB4np%~c;TqHj([{.Tdr">
                                                                                                                  <field name="NUM">3.1234</field>
                                                                                                                </shadow>
                                                                                                                <block type="get_value_var" id="||^gpO+zJzH_~C;0aP*_">
                                                                                                                  <field name="ATTR">val</field>
                                                                                                                  <value name="OID">
                                                                                                                    <shadow type="text">
                                                                                                                      <field name="TEXT"></field>
                                                                                                                    </shadow>
                                                                                                                    <block type="variables_get" id="}++0hy7-PR)Tb-8D|:)p">
                                                                                                                      <field name="VAR" id="A/ePxr2pS]eX9Gqw8qOT">Stromkosten pro Waschgang</field>
                                                                                                                    </block>
                                                                                                                  </value>
                                                                                                                </block>
                                                                                                              </value>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="ADD12">
                                                                                                            <block type="text" id="Mjs)p.:/ObS*R{2tiwa7">
                                                                                                              <field name="TEXT">€</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                      <value name="USERNAME">
                                                                                                        <block type="text" id="F-U1oN3NElzVk6CJ);7R">
                                                                                                          <field name="TEXT">Frank</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </next>
                                                                                                </block>
                                                                                              </next>
                                                                                            </block>
                                                                                          </next>
                                                                                        </block>
                                                                                      </next>
                                                                                    </block>
                                                                                  </next>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </statement>
                                                                    </block>
                                                                  </statement>
                                                                  <next>
                                                                    <block type="timeouts_settimeout" id="5eCX;s4%zZGWS;Kg_9D1">
                                                                      <field name="NAME">timeout</field>
                                                                      <field name="DELAY">40</field>
                                                                      <field name="UNIT">sec</field>
                                                                      <statement name="STATEMENT">
                                                                        <block type="variables_set" id="3p2f0I240p9[+F;-I-k/">
                                                                          <field name="VAR" id="mB|+S;|3QAoN;5)#v~5u">Startzeit</field>
                                                                          <value name="VALUE">
                                                                            <block type="math_number" id="pEblBF9FjJdAXjifbc)">
                                                                              <field name="NUM">0</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </statement>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </xml>
          

          Oder was faslch umgesetzt?
          Muss jetzt bloss mal schaune, das ich ein wenig Geschirr dreckig mache 😊

          Asgothian 1 Reply Last reply Reply Quote 0
          • Asgothian
            Asgothian Developer @Slowman last edited by Asgothian

            @Slowman
            das ist soweit ok. Aber:

            Die Werte werden möglicherweise weiter nicht passen:

            1598776648945-screenshot_2020-08-30-objects-iobroker.png

            Die Werte in dem Screenshot oben kommen ja von den jeweiligen "Energy" Datenpunkten deiner Energiemessung. Und da sieht man:

            Waschmaschine: Anfang 99.43, Ende 99.15. - Delta 0.4
            Spülmaschine: Anfang 119345, Ende 159382 - Delta 40000

            Wenn ich mir die Faustregel "Ein Waschgang kostet im Schnitt ca. 30 cent" anschaue, dann scheint die Waschmaschine den Energiewert in kW anzugeben während bei der Spülmaschine eher Watt angegeben sind.

            Du musst also nachschauen in welchen Einheiten deine Energiemessung stattfindet. Nur wenn da auch vergleichbare Einheiten genutzt werden kannst du identische Skripte nutzen. Ansonsten musst du die Formel hier anpassen: Screen Shot 2020-08-30 at 12.08.15 .png

            A.

            Slowman 1 Reply Last reply Reply Quote 1
            • Slowman
              Slowman @Asgothian last edited by

              @Asgothian

              Danke, man eh darauf bin ich nicht gekommen 🙄
              Sind beides Shellys, da denkt man an so was nicht.

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

                @Asgothian

                Muss doch irgendwo ein Fehler sein 🙄

                Screenshot_2020-08-30 Telegram Web(2).png

                Asgothian 1 Reply Last reply Reply Quote 0
                • Asgothian
                  Asgothian Developer @Slowman last edited by

                  @Slowman Stimmt.. lesen hilft..

                  bei diesen Bausteinen muss das "wert von" weg..

                  Screen Shot 2020-08-30 at 16.44.57 .png

                  Statt dessen einfach "Stromverbrauch pro Waschgang" nehmen.

                  Das gleiche überall da wo mit der Variable rechnen willst.

                  A.

                  Slowman 1 Reply Last reply Reply Quote 1
                  • Slowman
                    Slowman @Asgothian last edited by

                    @Asgothian

                    Danke, habe es jetzt abgeändert.

                    Screenshot_2020-08-30 javascript - ioBroker(7).png

                    Asgothian 1 Reply Last reply Reply Quote 0
                    • Asgothian
                      Asgothian Developer @Slowman last edited by

                      @Slowman so sollte es passen

                      Slowman 1 Reply Last reply Reply Quote 1
                      • Slowman
                        Slowman @Asgothian last edited by

                        @Asgothian

                        Screenshot_2020-09-01 Telegram Web.png

                        Mit dem niedrigen KW Anzeige, kenne ich den Fehler. Aber warum der Preis 0,00€ nicht. Schaut noch mal einer rüber.

                        Asgothian 1 Reply Last reply Reply Quote 0
                        • Asgothian
                          Asgothian Developer @Slowman last edited by

                          @Slowman Das Skript macht genau das was es soll.

                          Wenn ich die Daten aus dem Objektbaum-Screenshot ansetze, dann ist
                          verbrauch * Stromkosten / 1000 = 0.11 * 26.19 / 1000 = 0.0028809. Das auf 2 Nachkommastellen gerundet ist.. 0 🙂

                          A.

                          Slowman 1 Reply Last reply Reply Quote 0
                          • Slowman
                            Slowman @Asgothian last edited by

                            @Asgothian

                            Oh man, die Rechnung verstehe ich. Das ist jetzt Waschmaschine, wo der auch falsch rechnet.
                            Ich kommt nicht drauf, wa sich ändern muss 🙄

                            Asgothian 1 Reply Last reply Reply Quote 0
                            • Asgothian
                              Asgothian Developer @Slowman last edited by

                              @Slowman Du musst dir anschauen warum die in dem Screenshot markierten Werte so unterschiedlich sind. Ich gehe davon aus das es an der verwendeten Mess-Hardware bzw. deren Einstellungen liegt.

                              Da kann ich Dir nur helfen wenn wir da gemeinsam drauf schauen.1598776648945-screenshot_2020-08-30-objects-iobroker-1.png

                              Slowman 1 Reply Last reply Reply Quote 0
                              • Slowman
                                Slowman @Asgothian last edited by Slowman

                                @Asgothian

                                Ich habe die Shelly alle jetzt nochmal aufgesetzt und die obigen Punkte alle gelöscht, außer den Datenpunkt Preis_KW. Diese anderen Punkte brauche ich doch nicht mehr? Variable "Geschirrspüler Start" "- Stop" zählt doch dies oder auch einen Denkfehler.

                                Screenshot_2020-09-01 objects - ioBroker.png

                                Strompreis verlinkt.

                                Asgothian 1 Reply Last reply Reply Quote 0
                                • Asgothian
                                  Asgothian Developer @Slowman last edited by

                                  @Slowman Das stimmt. Allerdings musst du schauen das die Werte bei Spülmaschine und Waschmaschine zumindest in der gleichen Grössenordnung sind. Dann kannst du die Formeln in den Skripten anpassen.

                                  A.

                                  Slowman 1 Reply Last reply Reply Quote 1
                                  • Slowman
                                    Slowman @Asgothian last edited by

                                    @Asgothian

                                    Danke für die Antwort.
                                    Wenn wir jetzt von den Datenpunkten Verbrauch ausgehen (Bild 3.Postings über meins). Brauche ich bei WaMa kein /1000 , da es ja in KW angezeigt wird und bei Geschirrspüler ist bei den Datenpunkte der "Wurm" drin. Watt kann ja die Anzeige auch nicht sein /1000 und deziWatt /100000. Mal sehen und beobachten. Ich werde mal eine 60W Birne ran hängen, geht bestimmt schneller als immer zu warten, bis sie läuft 😊

                                    1 Reply Last reply Reply Quote 0
                                    • Xenon
                                      Xenon Forum Testing Developer last edited by

                                      Vielleicht wäre das für den ein oder anderen hier noch was, mein neustes Projekt zu genau dem Thema hier. Steht noch ziemlich am Anfang. Kostenberechnung ist noch nicht mit drin ..

                                      https://forum.iobroker.net/topic/36531/vorl-gerätezustandsüberw-benachrichtigung-bei-start-ende

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      377
                                      Online

                                      31.8k
                                      Users

                                      80.0k
                                      Topics

                                      1.3m
                                      Posts

                                      blockly
                                      16
                                      109
                                      9400
                                      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