Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Fehler in Javascript Adapter 6.2 (History)

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Fehler in Javascript Adapter 6.2 (History)

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

      Ich berechne die PV-Autarkie mit diesem Blocklyscript aus der History. Das läuft mit Version 6.1.4 des Javascript Adapters auch problemlos. Mit dem neuen 6.2 geht es nicht mehr.

      5c71e47b-188b-463a-a721-4d374a0d05c9-image.png

      npm -v
      8.19.3

      node -v
      v16.19.0

      Und hier das Script

      <block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="X}C9A9`H`D:N0:t.15,f" x="-662" y="196">
        <field name="SCHEDULE">59 23 * * *</field>
        <statement name="STATEMENT">
          <block type="control" id="qpdM*^@M`/P[_?Y*o4I3">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
            <field name="OID">javascript.0.EigeneGeraete.Solarinsel.Autarkie_Tageswert(24h)</field>
            <field name="WITH_DELAY">FALSE</field>
            <value name="VALUE">
              <block type="get_value" id="Zm+*WpT+-cVz+DL3K`i~">
                <field name="ATTR">val</field>
                <field name="OID">mqtt.0.Stromzaehler.Stromkosten.Autarkie_Tag_Prozent</field>
              </block>
            </value>
            <next>
              <block type="comment" id="DUp8mH*guuOv#.%{V1e6">
                <field name="COMMENT">AnzTage*24h*60min*60sec*1000millisec</field>
                <next>
                  <block type="variables_set" id="PG/38W2*oyMH9+}|$A4#">
                    <field name="VAR" id="WX[:Tk-|~F2Z[odL2-!]">timeRange</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="fy_VvXklbS=w7G~B{^bU">
                        <field name="OP">MULTIPLY</field>
                        <value name="A">
                          <shadow type="math_number" id="V-Hl/+FpHykkn^VdyI,j">
                            <field name="NUM">730</field>
                          </shadow>
                        </value>
                        <value name="B">
                          <shadow type="math_number">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="math_arithmetic" id="K]u9I%9/7N8.R~rGSBF_">
                            <field name="OP">MULTIPLY</field>
                            <value name="A">
                              <shadow type="math_number" id="bT:VFu#Tvy{;pjEn~@VV">
                                <field name="NUM">24</field>
                              </shadow>
                            </value>
                            <value name="B">
                              <shadow type="math_number">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="math_arithmetic" id="i^hII!+PAT`T4RJT%Qb[">
                                <field name="OP">MULTIPLY</field>
                                <value name="A">
                                  <shadow type="math_number" id="$38*l;0(zDZdM5J3!Jb8">
                                    <field name="NUM">3600</field>
                                  </shadow>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="hH=SfwF*,|{{a%7J}P+u">
                                    <field name="NUM">1000</field>
                                  </shadow>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="zP2)Y5fLw.a#j8NlD?~]">
                        <field name="VAR" id="gH-;kXfKuQjqeAAq)RR2">end</field>
                        <value name="VALUE">
                          <block type="time_get" id="7U[k(^zz0$SXG7sN#,*4">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                            <field name="OPTION">object</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="xT_WQ?{,ksjBd;s+6psg">
                            <field name="VAR" id="iw:GM1Yv=^4(|dJHog`+">Summe</field>
                            <value name="VALUE">
                              <block type="math_number" id="wjH6Bs[6YW21l|Vas;U`">
                                <field name="NUM">0</field>
                              </block>
                            </value>
                            <next>
                              <block type="sendto_custom" id="Rg)Z!+~V+AbJe!_:7y9s">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="id,options" with_statement="true"></mutation>
                                <field name="INSTANCE">sql.0</field>
                                <field name="COMMAND">getHistory</field>
                                <field name="LOG"></field>
                                <field name="WITH_STATEMENT">TRUE</field>
                                <value name="ARG0">
                                  <shadow type="text" id="nnuc`jtM=nhX=L${Z5-$">
                                    <field name="TEXT">javascript.0.EigeneGeraete.Solarinsel.Autarkie_Tageswert(24h)</field>
                                  </shadow>
                                </value>
                                <value name="ARG1">
                                  <shadow type="text" id="q)Gq5W*4y[Jn)oPe!Dh4">
                                    <field name="TEXT">{start: end - timeRange,end: end,aggregate: "onchange",ignoreNull: true}</field>
                                  </shadow>
                                </value>
                                <statement name="STATEMENT">
                                  <block type="variables_set" id="iW*;J;cdfm6_@}uIJD_=">
                                    <field name="VAR" id="Z.VC)8^?qXuW0hD)HGzh">Liste</field>
                                    <value name="VALUE">
                                      <block type="convert_jsonata" id="Q0H8$O%-8eJBB;?M3=s3">
                                        <value name="EXPRESSION">
                                          <shadow type="text" id="9f63CyOyB}]#;VO,MQZ|">
                                            <field name="TEXT">result</field>
                                          </shadow>
                                        </value>
                                        <value name="TARGET">
                                          <block type="variables_get" id="MEdwX5,:DYh8krUPHwnw">
                                            <field name="VAR" id="vl)04H}3D;^/v=azk~1i">result</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="controls_forEach" id=";^rrq;:C|%-_sQojDfDE">
                                        <field name="VAR" id="0bVTJYJUF1nDSgr|FqjF">verbrauchmitsolar</field>
                                        <value name="LIST">
                                          <block type="variables_get" id="e:uI8~5)-P4^(3YVMAp|">
                                            <field name="VAR" id="Z.VC)8^?qXuW0hD)HGzh">Liste</field>
                                          </block>
                                        </value>
                                        <statement name="DO">
                                          <block type="math_change" id="bK?F,NO34!s9sMYw|XCG">
                                            <field name="VAR" id="iw:GM1Yv=^4(|dJHog`+">Summe</field>
                                            <value name="DELTA">
                                              <shadow type="math_number">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="convert_tonumber" id="q,[gu0x7$]$nemJof^JR">
                                                <value name="VALUE">
                                                  <block type="convert_jsonata" id="Pm;^WYH.ybMykRl^t+-1">
                                                    <value name="EXPRESSION">
                                                      <shadow type="text" id="U6|DV0:Lz|Suz[?7=%2U">
                                                        <field name="TEXT">val</field>
                                                      </shadow>
                                                    </value>
                                                    <value name="TARGET">
                                                      <block type="variables_get" id="BkE}^UcI]ya~ua{1Q@^3">
                                                        <field name="VAR" id="0bVTJYJUF1nDSgr|FqjF">verbrauchmitsolar</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="control" id="lQ?9nqz(]KY$s8?a+(Aq">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.SDM630.Autark_Gesamt</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_rndfixed" id="[RIUMXlydSZbbD3o~|CR">
                                                <field name="n">2</field>
                                                <value name="x">
                                                  <shadow type="math_number">
                                                    <field name="NUM">3.1234</field>
                                                  </shadow>
                                                  <block type="math_arithmetic" id="Tjs3b%3-6Awed7nJA;*-">
                                                    <field name="OP">DIVIDE</field>
                                                    <value name="A">
                                                      <shadow type="math_number">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id=".%D?gKUXo#!wN5jy4($L">
                                                        <field name="VAR" id="iw:GM1Yv=^4(|dJHog`+">Summe</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="lists_length" id="RKz};?=sw%hVO-ifXAdL">
                                                        <value name="VALUE">
                                                          <block type="variables_get" id="5ik#M0@H3!:!+:o_$I9v">
                                                            <field name="VAR" id="Z.VC)8^?qXuW0hD)HGzh">Liste</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
      
      DJMarc75 1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active last edited by

        @caravandriver sagte in Fehler in Javascript Adapter 6.2 (History):

        Mit dem neuen 6.2 geht es nicht mehr.

        ein Traum von Fehlerbeschreibung..im ernst ???
        WAS GEHT DEN NICHT.. LOGS ??

        caravandriver 1 Reply Last reply Reply Quote -1
        • DJMarc75
          DJMarc75 @caravandriver last edited by

          @caravandriver

          https://github.com/ioBroker/ioBroker.javascript/issues/1253

          JSONata - ist bekannt 🙂

          str3000 created this issue in ioBroker/ioBroker.javascript

          closed After Upgrade to 6.2.0 - JSON Ausdruck dosn't work any more #1253

          caravandriver 1 Reply Last reply Reply Quote 1
          • caravandriver
            caravandriver @arteck last edited by

            @arteck Ich dachte es wird klar... Es kommt kein Wert mehr für "Autark_Gesamt" raus. Vorher problemlos. Installiere ich die alte Version gehts wieder.

            1 Reply Last reply Reply Quote 0
            • caravandriver
              caravandriver @DJMarc75 last edited by

              @djmarc75 Danke, das ist hilfreich 🙂

              DJMarc75 1 Reply Last reply Reply Quote 0
              • DJMarc75
                DJMarc75 @caravandriver last edited by

                @caravandriver hatte gestern das selbe festgestellt. Ich warte jetzt mal auf eine neue Version da anscheinend schon gefixed ist (laut GIT-Issue)

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

                Support us

                ioBroker
                Community Adapters
                Donate

                473
                Online

                32.0k
                Users

                80.5k
                Topics

                1.3m
                Posts

                3
                6
                220
                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