Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Awattar - die billigsten Strom-Stunden nutzen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Awattar - die billigsten Strom-Stunden nutzen

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

      @judisi sagte: Die Tagespreise stehen am Vortag um 14:00 bereit.

      Auch für die Zeiten heute ab 14:00 Uhr?

      @judisi sagte in Awattar - die billigsten Strom-Stunden nutzen:

      Der Wasserboiler läuft an den billigsten 6 Stunden.
      Die Bodenheizung an den billigsten 12 Stunden.

      Wenn die Daten von heute zur Verfügung stehen, Vorschlag:

      Blockly_temp.JPG

      J O 2 Replies Last reply Reply Quote 1
      • paul53
        paul53 @judisi last edited by

        @judisi sagte: Die Waschmaschine an den billigsten, zusammenhängenden 3 Stunden.

        Das ist nicht so einfach (mit Blockly) umzusetzen.
        Ich würde für jeden Ordner die Werte von "start" und "priceKwh" in ein Objekt schreiben und alle 24 Objekte in ein Array schreiben. Danach das Array nach "start" sortieren und in einer Schleife die minimale Preissumme über 3 aufeinander folgende Werte ermitteln.
        Da Blockly Objekte kaum unterstützt, kommt man an Javascript nicht vorbei.

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

          @paul53 said in Awattar - die billigsten Strom-Stunden nutzen:

          @judisi sagte: Die Tagespreise stehen am Vortag um 14:00 bereit.

          Auch für die Zeiten heute ab 14:00 Uhr?

          Ja, ab 14:00 stehen die Strompreise für den kommenden Tag bereit. Strompreisschnittstellen Awattar

          @judisi sagte in Awattar - die billigsten Strom-Stunden nutzen:

          Der Wasserboiler läuft an den billigsten 6 Stunden.
          Die Bodenheizung an den billigsten 12 Stunden.

          Wenn die Daten von heute zur Verfügung stehen, Vorschlag:

          DANKE, DANKE - für das Weihnachstgeschenk. Das funktioniert! Hab es gerade mit zwei Steckdosen probiert. Ich hätte dafür ewig gebraucht (das letzte mal intensiver programmiert habe ich zu Schulzeiten vor knapp 40 Jahren, und da war es - glaube ich turbopascal und logo oder so ähnlich).

          Vielleicht hat noch jemand eine Idee, wie man die billigsten 3 zusammenhängenden Stunden aus einer der zwei Listen findet.

          • Es gibt eine nach Verbrauch geordnet (wie oben),
          • und eine chronologisch wie hier:

          1Bildschirmfoto_2022-12-26_13-52-11.jpg

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

            @judisi sagte: und eine chronologisch wie hier:

            Das macht es leichter. Welcher Preis soll verwendet werden?

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

              @paul53 said in Awattar - die billigsten Strom-Stunden nutzen:

              @judisi sagte: und eine chronologisch wie hier:

              Das macht es leichter. Welcher Preis soll verwendet werden?

              Am liebsten totalPriceKwh. Aber grundsätzlich nicht so tragisch. Beim totalPriceKwh wird noch ein fixer Betrag zum bruttoPriceKwh dazugezählt (für diverse Fixkosten).

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

                @judisi sagte: Am liebsten totalPriceKwh

                Vorschlag:

                Bild_2022-12-26_150750410.png
                Bild_2022-12-26_151531357.png

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

                  @paul53
                  Danke sehr. So schnell wie Sie/Du das erstellt haben, konnte ich es nicht mal nachbauen. Beim Verstehen happert es bis jetzt.
                  Kann ich irgendwie online einen Kaffee für alle die Mühe spendieren?

                  Leider gibt es einen Fehlermeldung, sobald ich diesen Block aktiviere. Irgendeine Idee, was das sein könnte?

                  1.jpg

                  2.jpg

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

                    @judisi
                    Schau erst mal, wie die Liste mit den Preisen aussieht.

                    Bild_2022-12-26_215018291.png

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

                      @paul53
                      Euje .. mein Fehler. Es läuft alles wie geschmiert! Danke! Ich bin fasziniert.

                      Eine letzte Frage/Bitte hätte ich noch:

                      Gibt es eine Möglichkeit über debug den aktuellen Strompreis der Stunde auszugeben?. Also, dass, sobald die Fußbodenheizung schaltet (oder eben nicht), mittels debug der aktuelle Strompreis ausgegeben wird.

                      Ich habe jetzt mehrere Stunden gesucht/gelernt/probiert, bin aber an meinen Kenntnissen gescheitert.

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

                        @judisi sagte: Möglichkeit über debug den aktuellen Strompreis der Stunde auszugeben?.

                        Der Trigger zur jeden vollen Stunde wird bereits verwendet. Ergänze ihn einfach:

                        Blockly_temp.JPG

                        @judisi sagte in Awattar - die billigsten Strom-Stunden nutzen:

                        mein Fehler.

                        Was musste geändert werden?

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

                          @paul53

                          Hast du vielleicht da einen Tipp.... Ich finde keinen Fehler...

                          20:08:58.301	error	javascript.0 (671) script.js.common.Sonstiges.Tibber_test: TypeError: Cannot read properties of undefined (reading 'toString')
                          20:08:58.302	error	javascript.0 (671) at script.js.common.Sonstiges.Tibber_test:27:62
                          20:08:58.302	error	javascript.0 (671) at script.js.common.Sonstiges.Tibber_test:49:3
                          
                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @Schimi last edited by

                            @schimi sagte: Ich finde keinen Fehler...

                            Ich auch nicht, da ich meine Glaskugel verlegt habe. Skript?

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

                              @paul53 oh sorry... blöd von mir....

                              einmal als Bild:
                              0114b6c7-8e80-4bbf-86ab-169f2a490c55-image.png

                              und als Code:

                              <xml xmlns="https://developers.google.com/blockly/xml">
                                <variables>
                                  <variable id="%{8F(7sB61_K]=(]=HUc">preise</variable>
                                  <variable id="rlR`S0q{is}DhiGVddaP">i</variable>
                                  <variable id="CzYDP|Yq/)s$HVs]C,93">id</variable>
                                  <variable id="*.=ljhdPztMh1WA90]sW">minSumme</variable>
                                  <variable id=".e57X)pK7UP$$qvwNJ_S">summe3</variable>
                                  <variable id=";U~,MEV1]:ofSH@pu[N#">end</variable>
                                  <variable id="w^d~TO3AMO(L(P]Yph+4">start</variable>
                                  <variable type="cron" id="scheduleStart">scheduleStart</variable>
                                  <variable type="cron" id="scheduleEnd">scheduleEnd</variable>
                                </variables>
                                <block type="schedule" id="C_I%*H=O%|is`$_/t|lC" x="113" y="88">
                                  <field name="SCHEDULE">0 * * * *</field>
                                  <statement name="STATEMENT">
                                    <block type="variables_set" id=";hK/pc]qO-Uz_q;D#,rZ">
                                      <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                      <value name="VALUE">
                                        <block type="lists_create_with" id="%vX!Cs$LYl73ZDqXwvFj">
                                          <mutation items="0"></mutation>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="controls_for" id="N`)3NT@?!vred;oGWc5D">
                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                          <value name="FROM">
                                            <shadow type="math_number" id="7Cu}S9{og6!x8lO0nB,,">
                                              <field name="NUM">0</field>
                                            </shadow>
                                          </value>
                                          <value name="TO">
                                            <shadow type="math_number" id="ahEnHWNYjesQxUBi#Ef$">
                                              <field name="NUM">23</field>
                                            </shadow>
                                          </value>
                                          <value name="BY">
                                            <shadow type="math_number" id="MO}{O*G6$8UERzMUWcfj">
                                              <field name="NUM">1</field>
                                            </shadow>
                                          </value>
                                          <statement name="DO">
                                            <block type="variables_set" id="z|@x,@W|7zQZ#ZTs,t4}">
                                              <field name="VAR" id="CzYDP|Yq/)s$HVs]C,93">id</field>
                                              <value name="VALUE">
                                                <block type="text_join" id="Aj}iP57B$WXCk?eb!sD$" inline="true">
                                                  <mutation items="3"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="YMX,!x@T6C@Zm`g(gc*H">
                                                      <field name="TEXT">awattar.0.prices.</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="V3Sl3*:1;h9ni?Uu6ESE">
                                                      <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD2">
                                                    <block type="text" id="4:wi$V)WcA}=Vu3|vLae">
                                                      <field name="TEXT">.totalPriceKwh</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="lists_setIndex" id="=Ms[3R531nFy4Hh|f%Jr">
                                                  <mutation at="false"></mutation>
                                                  <field name="MODE">INSERT</field>
                                                  <field name="WHERE">LAST</field>
                                                  <value name="LIST">
                                                    <block type="variables_get" id="4vlq|cB#S;Eb?swa*_u5">
                                                      <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                    </block>
                                                  </value>
                                                  <value name="TO">
                                                    <block type="get_value_var" id="M+DlC0RvZ?zmwV7vBYc;">
                                                      <field name="ATTR">val</field>
                                                      <value name="OID">
                                                        <shadow type="text" id="t_E|h)a?}V^SX`IQ}@79">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="variables_get" id="k#y/!YFW%zgfT*@;OJGQ">
                                                          <field name="VAR" id="CzYDP|Yq/)s$HVs]C,93">id</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="variables_set" id="/vaqD$KpY#8:rnM%)w{C">
                                              <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                              <value name="VALUE">
                                                <block type="math_number" id="onjmyp,$nceE0u9y8#)t">
                                                  <field name="NUM">30</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="controls_for" id="9`Es?C9}G=XwuUU5a/|5">
                                                  <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                  <value name="FROM">
                                                    <shadow type="math_number" id="x/I;VhH1;`#ZjhYq.RD#">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                  </value>
                                                  <value name="TO">
                                                    <shadow type="math_number" id="FnCNxvOD62s7Fkv.7?*a">
                                                      <field name="NUM">22</field>
                                                    </shadow>
                                                  </value>
                                                  <value name="BY">
                                                    <shadow type="math_number" id="16|)K-L;%nUKjRyq*P$4">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                  </value>
                                                  <statement name="DO">
                                                    <block type="variables_set" id="Jr0b_10U[n})RhkM=fz0">
                                                      <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                      <value name="VALUE">
                                                        <block type="math_arithmetic" id="$Z0-X;1B{HHC7C_5,mc^" inline="false">
                                                          <field name="OP">ADD</field>
                                                          <value name="A">
                                                            <shadow type="math_number" id="EEJ*wsJWpAVi(R]ic,|0">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="math_arithmetic" id=".pqa+jCVbZMUxV~-JR7b" inline="false">
                                                              <field name="OP">ADD</field>
                                                              <value name="A">
                                                                <shadow type="math_number" id="r6YO2,@XR_uL{akr=~LQ">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="lists_getIndex" id="~~.]:Q]4!CkmN/jm$x_z">
                                                                  <mutation statement="false" at="true"></mutation>
                                                                  <field name="MODE">GET</field>
                                                                  <field name="WHERE">FROM_START</field>
                                                                  <value name="VALUE">
                                                                    <block type="variables_get" id="g%RY8@:Mn_Cg;]gGbzT0">
                                                                      <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT">
                                                                    <block type="variables_get" id="F?#7D(_e}Do?IR3N]`,`">
                                                                      <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <shadow type="math_number" id="@}6wc^{^Uu}vI([sH!n=">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="lists_getIndex" id="7c_[^UuKU-BQ}lU(w$}]">
                                                                  <mutation statement="false" at="true"></mutation>
                                                                  <field name="MODE">GET</field>
                                                                  <field name="WHERE">FROM_START</field>
                                                                  <value name="VALUE">
                                                                    <block type="variables_get" id="]I`WTj,8h=8|gx}zmSOY">
                                                                      <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT">
                                                                    <block type="math_arithmetic" id="mVa2wQS4TTOX!CJ`#K(w">
                                                                      <field name="OP">ADD</field>
                                                                      <value name="A">
                                                                        <shadow type="math_number" id="5=BK^ZhgjK`r$neEbA(}">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id=")~nBhcp{V*=y5rcJTfc,">
                                                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <shadow type="math_number" id="knPaInZyJAjzec@7oE+8">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow type="math_number" id="G*k34$T%?v-f6f+8}|R$">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="lists_getIndex" id=";*8#8??ySI!x+)~B95$%">
                                                              <mutation statement="false" at="true"></mutation>
                                                              <field name="MODE">GET</field>
                                                              <field name="WHERE">FROM_START</field>
                                                              <value name="VALUE">
                                                                <block type="variables_get" id="`.HPPXKbLfdun_~FD`T!">
                                                                  <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                </block>
                                                              </value>
                                                              <value name="AT">
                                                                <block type="math_arithmetic" id="q[LUt{{r6_(]K017Ec)`">
                                                                  <field name="OP">ADD</field>
                                                                  <value name="A">
                                                                    <shadow type="math_number">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="h4a71d[~*{Q~`rc)Mo#o">
                                                                      <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <shadow type="math_number" id="X@[YosMR*qX)!CDv9^z-">
                                                                      <field name="NUM">2</field>
                                                                    </shadow>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="controls_if" id="Zg+rib${a)X51!wZ6p2)">
                                                          <value name="IF0">
                                                            <block type="logic_compare" id="kWxAv]7r`mnV7Ni#uaT[">
                                                              <field name="OP">LT</field>
                                                              <value name="A">
                                                                <block type="variables_get" id="y3!!w.`ir_Z]HkihMfek">
                                                                  <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <block type="variables_get" id="Lt/ftuItnB28lQKcJ}jh">
                                                                  <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <statement name="DO0">
                                                            <block type="variables_set" id="x)G/XOGmqh:KPNT;:Dwu">
                                                              <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                                              <value name="VALUE">
                                                                <block type="variables_get" id="UE;AX`2z,_W52/OjyUdH">
                                                                  <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="variables_set" id="+]:uUPB8C$TJX])0=eG9">
                                                                  <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                  <value name="VALUE">
                                                                    <block type="math_arithmetic" id="Z`uk%;tSS)XiXqfF*~I;">
                                                                      <field name="OP">MINUS</field>
                                                                      <value name="A">
                                                                        <shadow type="math_number" id="Rfrs@16dBP4o:`=v4ZFP">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="mCOc-1us%F7%=cUqTc,d">
                                                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <shadow type="math_number" id="j+t+3,1x,oTVi)Y8f|{0">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                  <next>
                                                    <block type="controls_if" id="r;Rl}[QG^hdgn@E;sT|j">
                                                      <value name="IF0">
                                                        <block type="logic_compare" id="U?ma*@(V=cU6dM3*|*Ec">
                                                          <field name="OP">EQ</field>
                                                          <value name="A">
                                                            <block type="variables_get" id=";@^X$-Y]^ey0y{D18qis">
                                                              <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="math_number" id="J/C?X%]/@4G}Nr~XJAgz">
                                                              <field name="NUM">24</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <statement name="DO0">
                                                        <block type="control" id="oINmsjcSdAP7OTPMoM?U">
                                                          <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="logic_boolean" id="FOZVjaxdP0#/kaJ#;_oL">
                                                              <field name="BOOL">FALSE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </statement>
                                                      <next>
                                                        <block type="variables_set" id="B$]uU3-XQ)1x3orP9Oh1">
                                                          <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                          <value name="VALUE">
                                                            <block type="math_arithmetic" id="ugu?@;8t;}.m-T!VtR.%">
                                                              <field name="OP">ADD</field>
                                                              <value name="A">
                                                                <shadow type="math_number" id="*i]5d[y@-33/[+X~Hw+p">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="variables_get" id="|gx4bdL{Q)S6jz41npy,">
                                                                  <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <shadow type="math_number" id="oc`La?%4qKo)S27P4ekO">
                                                                  <field name="NUM">3</field>
                                                                </shadow>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="schedule_clear" id="VpV#7nOi=sxr/ANwIE(u">
                                                              <field name="NAME">scheduleStart</field>
                                                              <next>
                                                                <block type="schedule_clear" id="c{WfH_fUAx(H2Pd,sL=-">
                                                                  <field name="NAME">scheduleEnd</field>
                                                                  <next>
                                                                    <block type="schedule_create" id="~2)[D4+^nCxJb5fUG`8^">
                                                                      <field name="NAME">scheduleStart</field>
                                                                      <value name="SCHEDULE">
                                                                        <shadow type="field_cron">
                                                                          <field name="CRON">* * * * *</field>
                                                                        </shadow>
                                                                        <block type="cron_builder" id="v=E2;/_dgRPdb!Q#Wgwg" inline="true">
                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                                                                          <field name="LINE">FALSE</field>
                                                                          <field name="WITH_SECONDS">FALSE</field>
                                                                          <value name="DOW">
                                                                            <shadow type="text" id="th=}ESiwWw6?95exLO$E">
                                                                              <field name="TEXT">*</field>
                                                                            </shadow>
                                                                          </value>
                                                                          <value name="MONTHS">
                                                                            <shadow type="text" id="yz^]`[ZW$4:D:%6MjmJo">
                                                                              <field name="TEXT">*</field>
                                                                            </shadow>
                                                                          </value>
                                                                          <value name="DAYS">
                                                                            <shadow type="text" id="SPfRBpgL-nS44r;Nt*co">
                                                                              <field name="TEXT">*</field>
                                                                            </shadow>
                                                                          </value>
                                                                          <value name="HOURS">
                                                                            <shadow type="text">
                                                                              <field name="TEXT">*</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="h75i1luVUBkt(Ju=+2+O">
                                                                              <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="MINUTES">
                                                                            <shadow type="text" id="yRt?vmf%x+A/gh@1Oy=4">
                                                                              <field name="TEXT">0</field>
                                                                            </shadow>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <statement name="STATEMENT">
                                                                        <block type="debug" id="X/j?Hf-R?oxReeMdatJm">
                                                                          <field name="Severity">log</field>
                                                                          <value name="TEXT">
                                                                            <shadow type="text" id=",D=8=!MA=fFCH%#oi_%+">
                                                                              <field name="TEXT">test</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="G/gnC-{WW!80Z=j@?a*I">
                                                                              <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                            </block>
                                                                          </value>
                                                                          <next>
                                                                            <block type="control" id="c8j/f4Kb0kXgb]Lssn9O">
                                                                              <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="logic_boolean" id="pvR)i|;^d-!JtJ.tZ%z+">
                                                                                  <field name="BOOL">TRUE</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </statement>
                                                                      <next>
                                                                        <block type="controls_if" id="NrXhX??|fd.KNk]Ht4gf">
                                                                          <value name="IF0">
                                                                            <block type="logic_compare" id="*z@{j2~8GL2a4xah*$P9">
                                                                              <field name="OP">LT</field>
                                                                              <value name="A">
                                                                                <block type="variables_get" id=".nR2M=0A9Vp+jktM*yYN">
                                                                                  <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="B">
                                                                                <block type="math_number" id="ye`LyPc{Udxd+NTYSxof">
                                                                                  <field name="NUM">24</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <statement name="DO0">
                                                                            <block type="schedule_create" id="@i$WSd_S`X{lzj7cM2@f">
                                                                              <field name="NAME">scheduleEnd</field>
                                                                              <value name="SCHEDULE">
                                                                                <shadow type="field_cron" id="[=pvs=Ss^ph)?G_:-4Mm">
                                                                                  <field name="CRON">* * * * *</field>
                                                                                </shadow>
                                                                                <block type="cron_builder" id="GgGa.Ie}G~Kz`SG[KvK/" inline="true">
                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                                                                                  <field name="LINE">FALSE</field>
                                                                                  <field name="WITH_SECONDS">FALSE</field>
                                                                                  <value name="DOW">
                                                                                    <shadow type="text" id="%:%]5ri4`rg7BpQ|iD]1">
                                                                                      <field name="TEXT">*</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <value name="MONTHS">
                                                                                    <shadow type="text" id="Qmk|a^CndrZE:^qt#9K8">
                                                                                      <field name="TEXT">*</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <value name="DAYS">
                                                                                    <shadow type="text" id="YDr;;;U.a}Sk:,%kR7Un">
                                                                                      <field name="TEXT">*</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <value name="HOURS">
                                                                                    <shadow type="text" id="]t%7:eX#x-.W3r/J!RFY">
                                                                                      <field name="TEXT">*</field>
                                                                                    </shadow>
                                                                                    <block type="variables_get" id=".c1^J;6rj)vY.AbI|8*3">
                                                                                      <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="MINUTES">
                                                                                    <shadow type="text" id="_js@zAppMtcx](q.SM_4">
                                                                                      <field name="TEXT">0</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <statement name="STATEMENT">
                                                                                <block type="control" id="ycEj|^3Z!}a;JH(_@uE[">
                                                                                  <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="logic_boolean" id=",zq0N12JZSC|s.O)LVA0">
                                                                                      <field name="BOOL">FALSE</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </statement>
                                                                            </block>
                                                                          </statement>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </xml>
                              
                              paul53 1 Reply Last reply Reply Quote 0
                              • paul53
                                paul53 @Schimi last edited by paul53

                                @schimi
                                Den "steuere"-Blöcken ist kein Datenpunkt zugewiesen.
                                Außerdem darf der Zeitplan nur am Tagesende und nicht jede volle Stunde ausgeführt werden.

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

                                  @paul53

                                  Hi, habe es mal mit zugewiesenen Datenpunkt nochmal probiert... Hatte bisher den "steuer"-Blockly deaktiviert und wollte mit Pushover mitteilungen schicken um das alles zu testen).

                                  Jedenfalls, jetzt mit "echtem" Datenpunkt und ausführung einmal am Tag... immer noch der gleiche Fehler... (Ich lasse es sofort loslaufen zum testen, ohne die wartezeit auf 23:59Uhr)

                                  
                                  javascript.0
                                  2022-12-29 19:58:39.438	error	at Script.runInContext (node:vm:141:12)
                                  
                                  javascript.0
                                  2022-12-29 19:58:39.437	error	at script.js.common.Sonstiges.Tibber_test:36:3
                                  
                                  javascript.0
                                  2022-12-29 19:58:39.437	error	at script.js.common.Sonstiges.Tibber_test:23:62
                                  
                                  javascript.0
                                  2022-12-29 19:58:39.436	error	script.js.common.Sonstiges.Tibber_test: TypeError: Cannot read properties of undefined (reading 'toString')
                                  
                                  javascript.0
                                  2022-12-29 19:58:39.434	info	script.js.common.Sonstiges.Tibber_test: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                                  
                                  javascript.0
                                  2022-12-29 19:58:39.426	info	Start javascript script.js.common.Sonstiges.Tibber_test
                                  
                                  <xml xmlns="https://developers.google.com/blockly/xml">
                                    <variables>
                                      <variable id="%{8F(7sB61_K]=(]=HUc">preise</variable>
                                      <variable id="rlR`S0q{is}DhiGVddaP">i</variable>
                                      <variable id="CzYDP|Yq/)s$HVs]C,93">id</variable>
                                      <variable id="*.=ljhdPztMh1WA90]sW">minSumme</variable>
                                      <variable id=".e57X)pK7UP$$qvwNJ_S">summe3</variable>
                                      <variable id=";U~,MEV1]:ofSH@pu[N#">end</variable>
                                      <variable id="w^d~TO3AMO(L(P]Yph+4">start</variable>
                                      <variable type="cron" id="scheduleStart">scheduleStart</variable>
                                      <variable type="cron" id="scheduleEnd">scheduleEnd</variable>
                                    </variables>
                                    <block type="schedule" id="C_I%*H=O%|is`$_/t|lC" x="113" y="88">
                                      <field name="SCHEDULE">59 23 * * *</field>
                                      <statement name="STATEMENT">
                                        <block type="variables_set" id=";hK/pc]qO-Uz_q;D#,rZ">
                                          <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                          <value name="VALUE">
                                            <block type="lists_create_with" id="%vX!Cs$LYl73ZDqXwvFj">
                                              <mutation items="0"></mutation>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="controls_for" id="N`)3NT@?!vred;oGWc5D">
                                              <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                              <value name="FROM">
                                                <shadow type="math_number" id="7Cu}S9{og6!x8lO0nB,,">
                                                  <field name="NUM">0</field>
                                                </shadow>
                                              </value>
                                              <value name="TO">
                                                <shadow type="math_number" id="ahEnHWNYjesQxUBi#Ef$">
                                                  <field name="NUM">23</field>
                                                </shadow>
                                              </value>
                                              <value name="BY">
                                                <shadow type="math_number" id="MO}{O*G6$8UERzMUWcfj">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                              </value>
                                              <statement name="DO">
                                                <block type="variables_set" id="z|@x,@W|7zQZ#ZTs,t4}">
                                                  <field name="VAR" id="CzYDP|Yq/)s$HVs]C,93">id</field>
                                                  <value name="VALUE">
                                                    <block type="text_join" id="Aj}iP57B$WXCk?eb!sD$" inline="true">
                                                      <mutation items="3"></mutation>
                                                      <value name="ADD0">
                                                        <block type="text" id="YMX,!x@T6C@Zm`g(gc*H">
                                                          <field name="TEXT">awattar.0.prices.</field>
                                                        </block>
                                                      </value>
                                                      <value name="ADD1">
                                                        <block type="variables_get" id="V3Sl3*:1;h9ni?Uu6ESE">
                                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                        </block>
                                                      </value>
                                                      <value name="ADD2">
                                                        <block type="text" id="4:wi$V)WcA}=Vu3|vLae">
                                                          <field name="TEXT">.totalPriceKwh</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="lists_setIndex" id="=Ms[3R531nFy4Hh|f%Jr">
                                                      <mutation at="false"></mutation>
                                                      <field name="MODE">INSERT</field>
                                                      <field name="WHERE">LAST</field>
                                                      <value name="LIST">
                                                        <block type="variables_get" id="4vlq|cB#S;Eb?swa*_u5">
                                                          <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                        </block>
                                                      </value>
                                                      <value name="TO">
                                                        <block type="get_value_var" id="M+DlC0RvZ?zmwV7vBYc;">
                                                          <field name="ATTR">val</field>
                                                          <value name="OID">
                                                            <shadow type="text" id="t_E|h)a?}V^SX`IQ}@79">
                                                              <field name="TEXT"></field>
                                                            </shadow>
                                                            <block type="variables_get" id="k#y/!YFW%zgfT*@;OJGQ">
                                                              <field name="VAR" id="CzYDP|Yq/)s$HVs]C,93">id</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="variables_set" id="/vaqD$KpY#8:rnM%)w{C">
                                                  <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="onjmyp,$nceE0u9y8#)t">
                                                      <field name="NUM">30</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="controls_for" id="9`Es?C9}G=XwuUU5a/|5">
                                                      <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                      <value name="FROM">
                                                        <shadow type="math_number" id="x/I;VhH1;`#ZjhYq.RD#">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                      </value>
                                                      <value name="TO">
                                                        <shadow type="math_number" id="FnCNxvOD62s7Fkv.7?*a">
                                                          <field name="NUM">22</field>
                                                        </shadow>
                                                      </value>
                                                      <value name="BY">
                                                        <shadow type="math_number" id="16|)K-L;%nUKjRyq*P$4">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                      </value>
                                                      <statement name="DO">
                                                        <block type="variables_set" id="Jr0b_10U[n})RhkM=fz0">
                                                          <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                          <value name="VALUE">
                                                            <block type="math_arithmetic" id="$Z0-X;1B{HHC7C_5,mc^" inline="false">
                                                              <field name="OP">ADD</field>
                                                              <value name="A">
                                                                <shadow type="math_number" id="EEJ*wsJWpAVi(R]ic,|0">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="math_arithmetic" id=".pqa+jCVbZMUxV~-JR7b" inline="false">
                                                                  <field name="OP">ADD</field>
                                                                  <value name="A">
                                                                    <shadow type="math_number" id="r6YO2,@XR_uL{akr=~LQ">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="lists_getIndex" id="~~.]:Q]4!CkmN/jm$x_z">
                                                                      <mutation statement="false" at="true"></mutation>
                                                                      <field name="MODE">GET</field>
                                                                      <field name="WHERE">FROM_START</field>
                                                                      <value name="VALUE">
                                                                        <block type="variables_get" id="g%RY8@:Mn_Cg;]gGbzT0">
                                                                          <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="AT">
                                                                        <block type="variables_get" id="F?#7D(_e}Do?IR3N]`,`">
                                                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <shadow type="math_number" id="@}6wc^{^Uu}vI([sH!n=">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="lists_getIndex" id="7c_[^UuKU-BQ}lU(w$}]">
                                                                      <mutation statement="false" at="true"></mutation>
                                                                      <field name="MODE">GET</field>
                                                                      <field name="WHERE">FROM_START</field>
                                                                      <value name="VALUE">
                                                                        <block type="variables_get" id="]I`WTj,8h=8|gx}zmSOY">
                                                                          <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="AT">
                                                                        <block type="math_arithmetic" id="mVa2wQS4TTOX!CJ`#K(w">
                                                                          <field name="OP">ADD</field>
                                                                          <value name="A">
                                                                            <shadow type="math_number" id="5=BK^ZhgjK`r$neEbA(}">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id=")~nBhcp{V*=y5rcJTfc,">
                                                                              <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="B">
                                                                            <shadow type="math_number" id="knPaInZyJAjzec@7oE+8">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <shadow type="math_number" id="G*k34$T%?v-f6f+8}|R$">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="lists_getIndex" id=";*8#8??ySI!x+)~B95$%">
                                                                  <mutation statement="false" at="true"></mutation>
                                                                  <field name="MODE">GET</field>
                                                                  <field name="WHERE">FROM_START</field>
                                                                  <value name="VALUE">
                                                                    <block type="variables_get" id="`.HPPXKbLfdun_~FD`T!">
                                                                      <field name="VAR" id="%{8F(7sB61_K]=(]=HUc">preise</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT">
                                                                    <block type="math_arithmetic" id="q[LUt{{r6_(]K017Ec)`">
                                                                      <field name="OP">ADD</field>
                                                                      <value name="A">
                                                                        <shadow type="math_number">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="h4a71d[~*{Q~`rc)Mo#o">
                                                                          <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <shadow type="math_number" id="X@[YosMR*qX)!CDv9^z-">
                                                                          <field name="NUM">2</field>
                                                                        </shadow>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="controls_if" id="Zg+rib${a)X51!wZ6p2)">
                                                              <value name="IF0">
                                                                <block type="logic_compare" id="kWxAv]7r`mnV7Ni#uaT[">
                                                                  <field name="OP">LT</field>
                                                                  <value name="A">
                                                                    <block type="variables_get" id="y3!!w.`ir_Z]HkihMfek">
                                                                      <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <block type="variables_get" id="Lt/ftuItnB28lQKcJ}jh">
                                                                      <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <statement name="DO0">
                                                                <block type="variables_set" id="x)G/XOGmqh:KPNT;:Dwu">
                                                                  <field name="VAR" id="*.=ljhdPztMh1WA90]sW">minSumme</field>
                                                                  <value name="VALUE">
                                                                    <block type="variables_get" id="UE;AX`2z,_W52/OjyUdH">
                                                                      <field name="VAR" id=".e57X)pK7UP$$qvwNJ_S">summe3</field>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="variables_set" id="+]:uUPB8C$TJX])0=eG9">
                                                                      <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                      <value name="VALUE">
                                                                        <block type="math_arithmetic" id="Z`uk%;tSS)XiXqfF*~I;">
                                                                          <field name="OP">MINUS</field>
                                                                          <value name="A">
                                                                            <shadow type="math_number" id="Rfrs@16dBP4o:`=v4ZFP">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="mCOc-1us%F7%=cUqTc,d">
                                                                              <field name="VAR" id="rlR`S0q{is}DhiGVddaP">i</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="B">
                                                                            <shadow type="math_number" id="j+t+3,1x,oTVi)Y8f|{0">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </statement>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                      <next>
                                                        <block type="controls_if" id="r;Rl}[QG^hdgn@E;sT|j">
                                                          <value name="IF0">
                                                            <block type="logic_compare" id="U?ma*@(V=cU6dM3*|*Ec">
                                                              <field name="OP">EQ</field>
                                                              <value name="A">
                                                                <block type="variables_get" id=";@^X$-Y]^ey0y{D18qis">
                                                                  <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <block type="math_number" id="J/C?X%]/@4G}Nr~XJAgz">
                                                                  <field name="NUM">24</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <statement name="DO0">
                                                            <block type="control" id="oINmsjcSdAP7OTPMoM?U">
                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                              <field name="OID">0_userdata.0.example_state</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="logic_boolean" id="FOZVjaxdP0#/kaJ#;_oL">
                                                                  <field name="BOOL">FALSE</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </statement>
                                                          <next>
                                                            <block type="variables_set" id="B$]uU3-XQ)1x3orP9Oh1">
                                                              <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                              <value name="VALUE">
                                                                <block type="math_arithmetic" id="ugu?@;8t;}.m-T!VtR.%">
                                                                  <field name="OP">ADD</field>
                                                                  <value name="A">
                                                                    <shadow type="math_number" id="*i]5d[y@-33/[+X~Hw+p">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="|gx4bdL{Q)S6jz41npy,">
                                                                      <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <shadow type="math_number" id="oc`La?%4qKo)S27P4ekO">
                                                                      <field name="NUM">3</field>
                                                                    </shadow>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="schedule_clear" id="VpV#7nOi=sxr/ANwIE(u">
                                                                  <field name="NAME">scheduleStart</field>
                                                                  <next>
                                                                    <block type="schedule_clear" id="c{WfH_fUAx(H2Pd,sL=-">
                                                                      <field name="NAME">scheduleEnd</field>
                                                                      <next>
                                                                        <block type="schedule_create" id="~2)[D4+^nCxJb5fUG`8^">
                                                                          <field name="NAME">scheduleStart</field>
                                                                          <value name="SCHEDULE">
                                                                            <shadow type="field_cron">
                                                                              <field name="CRON">* * * * *</field>
                                                                            </shadow>
                                                                            <block type="cron_builder" id="v=E2;/_dgRPdb!Q#Wgwg" inline="true">
                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                                                                              <field name="LINE">FALSE</field>
                                                                              <field name="WITH_SECONDS">FALSE</field>
                                                                              <value name="DOW">
                                                                                <shadow type="text" id="th=}ESiwWw6?95exLO$E">
                                                                                  <field name="TEXT">*</field>
                                                                                </shadow>
                                                                              </value>
                                                                              <value name="MONTHS">
                                                                                <shadow type="text" id="yz^]`[ZW$4:D:%6MjmJo">
                                                                                  <field name="TEXT">*</field>
                                                                                </shadow>
                                                                              </value>
                                                                              <value name="DAYS">
                                                                                <shadow type="text" id="SPfRBpgL-nS44r;Nt*co">
                                                                                  <field name="TEXT">*</field>
                                                                                </shadow>
                                                                              </value>
                                                                              <value name="HOURS">
                                                                                <shadow type="text">
                                                                                  <field name="TEXT">*</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="h75i1luVUBkt(Ju=+2+O">
                                                                                  <field name="VAR" id="w^d~TO3AMO(L(P]Yph+4">start</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="MINUTES">
                                                                                <shadow type="text" id="yRt?vmf%x+A/gh@1Oy=4">
                                                                                  <field name="TEXT">0</field>
                                                                                </shadow>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <statement name="STATEMENT">
                                                                            <block type="control" id="c8j/f4Kb0kXgb]Lssn9O">
                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                              <field name="OID">0_userdata.0.example_state</field>
                                                                              <field name="WITH_DELAY">FALSE</field>
                                                                              <value name="VALUE">
                                                                                <block type="logic_boolean" id="pvR)i|;^d-!JtJ.tZ%z+">
                                                                                  <field name="BOOL">TRUE</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </statement>
                                                                          <next>
                                                                            <block type="controls_if" id="NrXhX??|fd.KNk]Ht4gf">
                                                                              <value name="IF0">
                                                                                <block type="logic_compare" id="*z@{j2~8GL2a4xah*$P9">
                                                                                  <field name="OP">LT</field>
                                                                                  <value name="A">
                                                                                    <block type="variables_get" id=".nR2M=0A9Vp+jktM*yYN">
                                                                                      <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="B">
                                                                                    <block type="math_number" id="ye`LyPc{Udxd+NTYSxof">
                                                                                      <field name="NUM">24</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <statement name="DO0">
                                                                                <block type="schedule_create" id="@i$WSd_S`X{lzj7cM2@f">
                                                                                  <field name="NAME">scheduleEnd</field>
                                                                                  <value name="SCHEDULE">
                                                                                    <shadow type="field_cron" id="[=pvs=Ss^ph)?G_:-4Mm">
                                                                                      <field name="CRON">* * * * *</field>
                                                                                    </shadow>
                                                                                    <block type="cron_builder" id="GgGa.Ie}G~Kz`SG[KvK/" inline="true">
                                                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
                                                                                      <field name="LINE">FALSE</field>
                                                                                      <field name="WITH_SECONDS">FALSE</field>
                                                                                      <value name="DOW">
                                                                                        <shadow type="text" id="%:%]5ri4`rg7BpQ|iD]1">
                                                                                          <field name="TEXT">*</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                      <value name="MONTHS">
                                                                                        <shadow type="text" id="Qmk|a^CndrZE:^qt#9K8">
                                                                                          <field name="TEXT">*</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                      <value name="DAYS">
                                                                                        <shadow type="text" id="YDr;;;U.a}Sk:,%kR7Un">
                                                                                          <field name="TEXT">*</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                      <value name="HOURS">
                                                                                        <shadow type="text" id="]t%7:eX#x-.W3r/J!RFY">
                                                                                          <field name="TEXT">*</field>
                                                                                        </shadow>
                                                                                        <block type="variables_get" id=".c1^J;6rj)vY.AbI|8*3">
                                                                                          <field name="VAR" id=";U~,MEV1]:ofSH@pu[N#">end</field>
                                                                                        </block>
                                                                                      </value>
                                                                                      <value name="MINUTES">
                                                                                        <shadow type="text" id="_js@zAppMtcx](q.SM_4">
                                                                                          <field name="TEXT">0</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <statement name="STATEMENT">
                                                                                    <block type="control" id="ycEj|^3Z!}a;JH(_@uE[">
                                                                                      <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="logic_boolean" id=",zq0N12JZSC|s.O)LVA0">
                                                                                          <field name="BOOL">FALSE</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </statement>
                                                                                </block>
                                                                              </statement>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </xml>
                                  

                                  b95ab11e-53fe-4323-bc54-68b227db421f-image.png

                                  @judisi könntest du mir vielleicht dein Blockly exportieren? Vielleicht habe ich auch irgendwo nen Tippfehler und finde ihn einfach nicht....

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

                                    @schimi sagte: Vielleicht habe ich auch irgendwo nen Tippfehler

                                    Ich kann keinen finden. Bau mal Log-Ausgaben der Variablen preise und start ein.

                                    Bild_2022-12-29_201757540.png

                                    EDIT: Hier fehlt noch der Datenpunkt:

                                    Bild_2022-12-29_202724579.png

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

                                      @paul53
                                      Datenpounkt aktualiesiert, kein unterschied....

                                      Debug auf preis:

                                      javascript.0
                                      2022-12-30 01:49:08.818	info	script.js.common.Sonstiges.Tibber_test: [19.87981,19.87505,19.8691,19.74058,19.75605,19.88338,19.99405,20.01071,21.06862,20.71043,20.62832,20.47719,20.23681,20.4046,22.37405,22.92026,23.2368,24.11026,26.11779,25.70486,23.16778,22.97619,23.13089,22.50733]
                                      

                                      Debug auf start:

                                      javascript.0
                                      2022-12-30 01:49:18.421	info	script.js.common.Sonstiges.Tibber_test: undefined
                                      
                                      paul53 1 Reply Last reply Reply Quote 0
                                      • paul53
                                        paul53 @Schimi last edited by

                                        @schimi sagte: Debug auf preis:

                                        Sieht gut aus.

                                        @schimi sagte in Awattar - die billigsten Strom-Stunden nutzen:

                                        Debug auf start:

                                        Habe ich vermutet. Grund: "setze minSumme auf 30" ist viel zu klein. Ändere es auf 99 oder größer und es wird wohl funktionieren.

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

                                          @paul53

                                          tatsächlich.... auf 99 kommt der Fehler nicht mehr....

                                          bin davon ausgegangen das er die 99 als 0,99€ interpretiert....
                                          ich teste das Skript erstmal und versuche es zu verstehen 🙂

                                          Eigentlich hatte ich es vor auf Tibber anzuwenden, aber erstmal so verstehen bevor ich daran "rumfummel" 🙂

                                          DANKE!!!

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            judisi @Schimi last edited by judisi

                                            @schimi
                                            Hab das erst jetzt gesehen. Anbei (hoffe das geht so mit dem raufladen).awattar.txt

                                            Momentan quäle ich mich ein wenig, weil der Awattar-Adapter nach 14:00 die Daten vom heutigen und den morgigen Tag holt. Das führt dazu, dass es dann zwei IDs mit identischen Startzeiten gibt - und dann stimmt die Sortierung der Preise nicht mehr: es werden die Preise von zwei Tagen vermischt.
                                            1.jpg

                                            Vielleicht findest ja du eine Lösung dafür. Ich versuche es über die Abrufintervalle sowohl vom Adapter als auch von den Script-Ausführungen zu regeln.

                                            paul53 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            632
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            10
                                            82
                                            8003
                                            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