Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Praktische Anwendungen (Showcase)
  4. Enphase / Envoy / IQ-Gateway Solar Blockly Skript

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    2.0k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    927

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

Enphase / Envoy / IQ-Gateway Solar Blockly Skript

Scheduled Pinned Locked Moved Praktische Anwendungen (Showcase)
enphasesolarpv anlageapienvoyiq-gatewayscript
230 Posts 16 Posters 54.8k Views 14 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D dexic

    @steffe-s Die Daten werden regelmäßig im Minutentakt aktualisiert. Die Batterie hat aber zuletzt am 5.12.24 etwas anderes als Null gemeldet.

    Mir scheint also der Fehler bei Enphase zu sein. Die Batterie war eine Zeit lang ausgeschaltet, weil sie mangels Leistung im Winter sowieso nichts zu speichern hatte. Dafür ist meine kleine Experimentier-Anlage mit 660Wp zu klein. Mit zwei guten Tagen füllt sie aber die 3,5 kWh voll auf. :-)

    Wenn die Batterie den SoC sauber meldet, warum dann nicht auch die Leistung? Vielleicht ist ja der Funk gestört, so dass nur der vergleichsweise langsam wechselnde SoC sauber vom Envoy empfangen wird?

    Steffe.S.S Offline
    Steffe.S.S Offline
    Steffe.S.
    wrote on last edited by
    #181

    @dexic

    hast Du auch die Enlighten App von Enphase laufen?

    D 1 Reply Last reply
    0
    • D dexic

      @steffe-s Die Daten werden regelmäßig im Minutentakt aktualisiert. Die Batterie hat aber zuletzt am 5.12.24 etwas anderes als Null gemeldet.

      Mir scheint also der Fehler bei Enphase zu sein. Die Batterie war eine Zeit lang ausgeschaltet, weil sie mangels Leistung im Winter sowieso nichts zu speichern hatte. Dafür ist meine kleine Experimentier-Anlage mit 660Wp zu klein. Mit zwei guten Tagen füllt sie aber die 3,5 kWh voll auf. :-)

      Wenn die Batterie den SoC sauber meldet, warum dann nicht auch die Leistung? Vielleicht ist ja der Funk gestört, so dass nur der vergleichsweise langsam wechselnde SoC sauber vom Envoy empfangen wird?

      Steffe.S.S Offline
      Steffe.S.S Offline
      Steffe.S.
      wrote on last edited by
      #182

      @dexic

      lösche einfach mal den "storage - Ordner" und schau, ob dieser neu angelegt wird ( habe ich gerade an meinem System getestet, wenn der Ordner nicht vorhanden ist wird dieser neu angelegt)

      D 1 Reply Last reply
      0
      • Steffe.S.S Steffe.S.

        @dexic

        hast Du auch die Enlighten App von Enphase laufen?

        D Offline
        D Offline
        dexic
        wrote on last edited by
        #183

        @steffe-s Ja, die läuft. Die zeigt aber bei der Batterie offenbar auch keine Leistung an. Die LED an der Batterie blinkt blau und wird gerade ordentlich entladen. Die App zeigt 0W (Standby) an.

        1 Reply Last reply
        0
        • Steffe.S.S Steffe.S.

          @dexic

          lösche einfach mal den "storage - Ordner" und schau, ob dieser neu angelegt wird ( habe ich gerade an meinem System getestet, wenn der Ordner nicht vorhanden ist wird dieser neu angelegt)

          D Offline
          D Offline
          dexic
          wrote on last edited by
          #184

          @steffe-s Erledigt! :-) Wurde auch bei mir erneuert. Jetzt sind die Werte eben frisch, inkl. SoC, der mir auch in der Enphase-App angezeigt wird.

          Steffe.S.S 1 Reply Last reply
          0
          • D dexic

            @steffe-s Erledigt! :-) Wurde auch bei mir erneuert. Jetzt sind die Werte eben frisch, inkl. SoC, der mir auch in der Enphase-App angezeigt wird.

            Steffe.S.S Offline
            Steffe.S.S Offline
            Steffe.S.
            wrote on last edited by
            #185

            @dexic

            Lade- / Entladewert passt auch wieder?

            D 1 Reply Last reply
            0
            • Steffe.S.S Steffe.S.

              @dexic

              Lade- / Entladewert passt auch wieder?

              D Offline
              D Offline
              dexic
              wrote on last edited by
              #186

              @steffe-s Leider nicht. Enphase scheint wohl Mist zu melden (0W), also muss ich da ansetzen. Ich werde mal am Abend alle Geräte neu starten und schauen, was dann herauskommt.

              Steffe.S.S 1 Reply Last reply
              0
              • D dexic

                @steffe-s Leider nicht. Enphase scheint wohl Mist zu melden (0W), also muss ich da ansetzen. Ich werde mal am Abend alle Geräte neu starten und schauen, was dann herauskommt.

                Steffe.S.S Offline
                Steffe.S.S Offline
                Steffe.S.
                wrote on last edited by Steffe.S.
                #187

                @dexic

                Frage ist denn Dein Akku voll? Dann sind 0W in Ordnung.

                oder starte doch einfach mal die beiden skripte neu

                1x Enphase_Envoy_Datenabfrage

                und

                1x sc-stream

                vielleicht auch einmal beim Enphase - Support anrufen, wenn auch in der LiveAnsicht die Werte nicht stimmen (hier sollte erstmal alles passen und dann weiter im iobroker)

                Ich meine gelesen zu haben, dass die Batterie immer online sein muss .

                S 1 Reply Last reply
                0
                • Steffe.S.S Steffe.S.

                  @dexic

                  Frage ist denn Dein Akku voll? Dann sind 0W in Ordnung.

                  oder starte doch einfach mal die beiden skripte neu

                  1x Enphase_Envoy_Datenabfrage

                  und

                  1x sc-stream

                  vielleicht auch einmal beim Enphase - Support anrufen, wenn auch in der LiveAnsicht die Werte nicht stimmen (hier sollte erstmal alles passen und dann weiter im iobroker)

                  Ich meine gelesen zu haben, dass die Batterie immer online sein muss .

                  S Offline
                  S Offline
                  syntetic
                  wrote on last edited by
                  #188

                  Nach gefühlt ewig langer Suche bin ich auf eure Lösung gestoßen. Leider funktioniert das Skript bei mir gar nicht, ich hab aber zu wenig Ahnung, um den Fehler finden zu können.
                  Könnt ihr mir helfen?

                  Bildschirmfoto 2025-06-14 um 15.32.51.png

                  1 Reply Last reply
                  0
                  • NegaleinN Negalein

                    @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                    Ich hab das Ding gespeichert, danach versucht zu importieren über die Funktion im Kontextmenü

                    Nein, das geht so nicht.

                    Ich habe auch versucht, ein neues Blockly zu erstellen, dann auf die JS-Ansicht zu gehen, und den Text zu kopieren und dann einzufügen

                    erstell ein neues Blockly
                    dann gehst du auf 91f7931e-248b-40d1-b01e-0809d5103082-image.png

                    dann hier den Text aus der .txt einfügen.
                    Alternativ die .txt hier reinziehen oder klicken zum auswählen.
                    9677e9e7-4961-490c-b9da-82bd7903af20-image.png

                    Steffe.S.S Offline
                    Steffe.S.S Offline
                    Steffe.S.
                    wrote on last edited by Steffe.S.
                    #189

                    @negalein sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                    @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                    Ich hab das Ding gespeichert, danach versucht zu importieren über die Funktion im Kontextmenü

                    Nein, das geht so nicht.

                    Ich habe auch versucht, ein neues Blockly zu erstellen, dann auf die JS-Ansicht zu gehen, und den Text zu kopieren und dann einzufügen

                    erstell ein neues Blockly
                    dann gehst du auf 91f7931e-248b-40d1-b01e-0809d5103082-image.png

                    dann hier den Text aus der .txt einfügen.
                    Alternativ die .txt hier reinziehen oder klicken zum auswählen.
                    9677e9e7-4961-490c-b9da-82bd7903af20-image.png

                    @syntetic hast Du die Skripte, so wie hier beschrieben, in Blockly eingefügt?

                    S 1 Reply Last reply
                    0
                    • Steffe.S.S Steffe.S.

                      @negalein sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                      @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                      Ich hab das Ding gespeichert, danach versucht zu importieren über die Funktion im Kontextmenü

                      Nein, das geht so nicht.

                      Ich habe auch versucht, ein neues Blockly zu erstellen, dann auf die JS-Ansicht zu gehen, und den Text zu kopieren und dann einzufügen

                      erstell ein neues Blockly
                      dann gehst du auf 91f7931e-248b-40d1-b01e-0809d5103082-image.png

                      dann hier den Text aus der .txt einfügen.
                      Alternativ die .txt hier reinziehen oder klicken zum auswählen.
                      9677e9e7-4961-490c-b9da-82bd7903af20-image.png

                      @syntetic hast Du die Skripte, so wie hier beschrieben, in Blockly eingefügt?

                      S Offline
                      S Offline
                      syntetic
                      wrote on last edited by
                      #190

                      @steffe-s Exakt so. Selbst ausgefüllt hab ich dann username, Passwort, SN & IP

                      1 Reply Last reply
                      0
                      • Steffe.S.S Steffe.S.

                        BITTE MACHT VORHER EIN BACKUP VOM AKTUELLEN IOBROKERSYSTEM, BEVOR IHR DAS SKRIPT TESTET!!!

                        Hier die 4 Skripte:

                        .1. Skript

                        Abholen aller Daten einmal pro Minute ( erweitert um Punkt 6 und Punkt 7). Unter 1 Minute gibt es Fehler.

                        *edit 19.09.2024: Aktualisierung unter 1 Minute gelöst...

                        *edit 10.04.2024:

                        wenn man sich auf LiveDaten und Microwechselrichterdaten beschränkt geht auch eine Aktualisierungszeit von 15 Sekunden. Einfach die Zeit im Trigger auf 15 sec stellen.*

                        LiveDaten.JPG

                        Enphase_Envoy_Datenabfrage.txt

                        Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                        ....................................................................
                        2.Skript

                        Das envoy bleibt mit den LiveDaten max 15 Minuten online, diese Skript aktualisiert sich alle 10 Minunten und hält das envoy im Onlinemodus.

                        sc_stream enable.JPG

                        sc-stream.txt

                        Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                        ...................................................................
                        2.2. Datenpunkte erstellen

                        Datenpunkte aus Json importieren:

                        Unbenannt.JPG

                        0_userdata.0.Enphase-Werte_durch_1000.json

                        ...................................................................
                        3. Skript

                        Die LiveDaten werden in MilliWatt ausgegeben. Dieses Skript rechnet die Daten im Watt um.

                        Enphase durch 1000 inkl. Netzbezug ohne Einspeisung.JPG

                        aktualisiert am 19.05.2024

                        DAS SKRIPT FUNKTIONIERT NUR MIT DEN DATENPUNKTEN AUS "PUNKT 2.2 DATENPUNKTE ERSTELLEN"!!!

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <block type="comment" id="b34XJZy@p3[tYg9~i77(" x="-438" y="-687">
                            <field name="COMMENT">Netzbezug / Netzeinspeisung</field>
                            <next>
                              <block type="on" id="R=TcB:Y;oW+@!R21r;.c">
                                <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                <field name="CONDITION">ne</field>
                                <field name="ACK_CONDITION"></field>
                                <statement name="STATEMENT">
                                  <block type="update" id=",Smtm*YKzeEoxCw%Y$$}">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_round" id="`:SgM1(S!e7wO$x#rdA7">
                                        <field name="OP">ROUNDUP</field>
                                        <value name="NUM">
                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                            <field name="NUM">3.1</field>
                                          </shadow>
                                          <block type="math_arithmetic" id="fGHNrBIh0Rb4C1Y1a[rY">
                                            <field name="OP">DIVIDE</field>
                                            <value name="A">
                                              <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="on_source" id=",b5/]n=AWf?^Ow=8yf^?">
                                                <field name="ATTR">state.val</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="math_number" id="QP84}[6.N0:{p**V+VhE">
                                                <field name="NUM">1000</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="update" id=":Am_Gm[7mE|w]#]*i_(*">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Netzbezug_ohne_Einspeisung</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_round" id="1WQ]FtxW*Rr[{i/vpEr~">
                                            <field name="OP">ROUNDUP</field>
                                            <value name="NUM">
                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                <field name="NUM">3.1</field>
                                              </shadow>
                                              <block type="math_arithmetic" id="V6]7*W;hmF]Fh=H]ov$D">
                                                <field name="OP">DIVIDE</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="on_source" id="iVlAXB/ie7[Z+4P$#g(A">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_number" id="F^B_8!nAS[2AWfxJ}[t7">
                                                    <field name="NUM">1000</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="(oz0QsPxo%1,Hcawpks.">
                                    <field name="COMMENT">Netzeinspeisung negiert</field>
                                    <next>
                                      <block type="on" id="o!/9@gfrBge5q!FXL_aq">
                                        <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                        <field name="CONDITION">any</field>
                                        <field name="ACK_CONDITION"></field>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="R!lRI5?P:IpDL/YpJ6mc">
                                            <mutation else="1"></mutation>
                                            <value name="IF0">
                                              <block type="logic_compare" id="92KNC^=Hu_c4o!15yeJ*">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="H*HRgODY9:4F_H2?s]2*">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="A**xn9B,cbBzS6eq1Xa0">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="update" id="/]@j_??kR~lK`?GljvLk">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_arithmetic" id=",wij]CcH[K|9{zF.($Ne">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="get_value" id="R92$P`uocO;{95ac+S^E">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="math_number" id="@K{D^A]w8mzwrK*~dh7|">
                                                        <field name="NUM">-1</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <statement name="ELSE">
                                              <block type="update" id="{^EgD^wDw$p*s%uAVi+B">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="-0gPy-bv:cv@giTA}fr:">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="comment" id="z.XJ|8h6gD-i^Dk255KS">
                                            <field name="COMMENT">Hausverbrauch</field>
                                            <next>
                                              <block type="on" id="F4|LHxJ-9e3}FbqgM*%0">
                                                <field name="OID">0_userdata.0.enphase.livedata.meters.load.agg_p_mw</field>
                                                <field name="CONDITION">any</field>
                                                <field name="ACK_CONDITION"></field>
                                                <statement name="STATEMENT">
                                                  <block type="update" id="sX/%.U3(d@0FH;[c-7Z$">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Hausverbrauch</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_round" id=":i2J#BlN1uy4Jye~K!IR">
                                                        <field name="OP">ROUNDUP</field>
                                                        <value name="NUM">
                                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                            <field name="NUM">3.1</field>
                                                          </shadow>
                                                          <block type="math_arithmetic" id="*e~+quHSP.z$azvq~}F0">
                                                            <field name="OP">DIVIDE</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="M`Yh{e~{r5:_-:9P^:JW">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="on_source" id="phJx!7L#U!a.]5=76AZf">
                                                                <field name="ATTR">state.val</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id="MQBq|1jXHJ#%,1..gxvY">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="math_number" id="3:i,RAn2:9TkS3H_=-J#">
                                                                <field name="NUM">1000</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="comment" id="`*;dUWj=!LDNpbkLc))M">
                                                    <field name="COMMENT">PV Erzeugnung</field>
                                                    <next>
                                                      <block type="on" id="iT)3o|gf6HB.%eCN$@zP">
                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.pv.agg_p_mw</field>
                                                        <field name="CONDITION">any</field>
                                                        <field name="ACK_CONDITION"></field>
                                                        <statement name="STATEMENT">
                                                          <block type="controls_if" id="l^zE[P~R)a!2t|:jiM(|">
                                                            <mutation else="1"></mutation>
                                                            <value name="IF0">
                                                              <block type="logic_compare" id="nh3/v4+,91w5I[3IadS$">
                                                                <field name="OP">GT</field>
                                                                <value name="A">
                                                                  <block type="on_source" id="8T=N6GJN8KUjykUuNW?P">
                                                                    <field name="ATTR">state.val</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="x)}j2:d+Is%sN@z_6g,~">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <statement name="DO0">
                                                              <block type="update" id="$5xwgaIa3ULu9MP@`DUx">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_round" id="{:U/C2)dpiqCyXsRX%2}">
                                                                    <field name="OP">ROUNDUP</field>
                                                                    <value name="NUM">
                                                                      <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                        <field name="NUM">3.1</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="KdjcX,q(-3l`vCx2(o~l">
                                                                        <field name="OP">DIVIDE</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="Z;YmcS)C![ri*hWck9-#">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="on_source" id="ydT%+`wmTw+}+t/sF=C~">
                                                                            <field name="ATTR">state.val</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="BGWnp9qn*ZZM4o|#M[tX">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="math_number" id="LrV1n3ml@ZTfS0C$j9@b">
                                                                            <field name="NUM">1000</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </statement>
                                                            <statement name="ELSE">
                                                              <block type="update" id="w_ky5IC/WO/2W,dnzB5A">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_number" id="m;ZDZySI%b2~}UZEDIso">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </statement>
                                                          </block>
                                                        </statement>
                                                        <next>
                                                          <block type="comment" id="4]s2;oO[A.DKS^feZs*l">
                                                            <field name="COMMENT">Batterieladung über PV</field>
                                                            <next>
                                                              <block type="on" id="}*xtxiY-j7g,_jBEDV?^">
                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                <field name="CONDITION">any</field>
                                                                <field name="ACK_CONDITION"></field>
                                                                <statement name="STATEMENT">
                                                                  <block type="controls_if" id="Z+Le9t!]wro?Aiyjq9yT">
                                                                    <mutation else="1"></mutation>
                                                                    <value name="IF0">
                                                                      <block type="logic_compare" id="ye0=tBqFC3,,.^@ywMv3">
                                                                        <field name="OP">GT</field>
                                                                        <value name="A">
                                                                          <block type="get_value" id="U#-I`pnZzIDQ/1JJ|4I{">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <block type="math_number" id="b;}lR*{qn8YNnYK5(,$m">
                                                                            <field name="NUM">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <statement name="DO0">
                                                                      <block type="update" id="moZ7/vz`Ex*wXp+S%OxU">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_round" id="/eg]`f){,*d1F*!nHB7k">
                                                                            <field name="OP">ROUNDUP</field>
                                                                            <value name="NUM">
                                                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                <field name="NUM">3.1</field>
                                                                              </shadow>
                                                                              <block type="math_arithmetic" id="6t5]{-=r?*[|^C_yl8U]">
                                                                                <field name="OP">DIVIDE</field>
                                                                                <value name="A">
                                                                                  <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="on_source" id="r/fj8*GRX+DEAB?kB.I*">
                                                                                    <field name="ATTR">state.val</field>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="B">
                                                                                  <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="math_number" id="-.qb;4Y|6v05uZ$5@o$0">
                                                                                    <field name="NUM">1000</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </statement>
                                                                    <statement name="ELSE">
                                                                      <block type="update" id="Wczg}72@veb-mhG7s*!b">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_number" id="l),T@!ne5;zU)D:=@gxm">
                                                                            <field name="NUM">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </statement>
                                                                  </block>
                                                                </statement>
                                                                <next>
                                                                  <block type="comment" id="Ci}(~uQL=y.a5k~;ZJRC">
                                                                    <field name="COMMENT">Batterie Eigenverbrauch</field>
                                                                    <next>
                                                                      <block type="on" id=".ftf(ks:n?jlQW7{QbfI">
                                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                        <field name="CONDITION">any</field>
                                                                        <field name="ACK_CONDITION"></field>
                                                                        <statement name="STATEMENT">
                                                                          <block type="update" id="1Ek@Ld0k%0Mz#x#9LC({">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                            <value name="VALUE">
                                                                              <block type="math_round" id="eeH:@M.MP@((T[C^O{qP">
                                                                                <field name="OP">ROUNDUP</field>
                                                                                <value name="NUM">
                                                                                  <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                    <field name="NUM">3.1</field>
                                                                                  </shadow>
                                                                                  <block type="math_arithmetic" id="DrW_.;3ED~7qV?5zl#Sr">
                                                                                    <field name="OP">DIVIDE</field>
                                                                                    <value name="A">
                                                                                      <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="on_source" id="BL1JGJ:+%L=I;4NL?zsV">
                                                                                        <field name="ATTR">state.val</field>
                                                                                      </block>
                                                                                    </value>
                                                                                    <value name="B">
                                                                                      <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="math_number" id="..lWof[ekOiU~KQ$b@_z">
                                                                                        <field name="NUM">1000</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="update" id="R0.]Ji-I)USF_IdoA+AM">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_nur_Entladung</field>
                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                <value name="VALUE">
                                                                                  <block type="math_round" id="K[hTID9Zd?9b~HXXU2c)">
                                                                                    <field name="OP">ROUNDUP</field>
                                                                                    <value name="NUM">
                                                                                      <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                        <field name="NUM">3.1</field>
                                                                                      </shadow>
                                                                                      <block type="math_arithmetic" id="i)mZ;NsE4%KMcWNRe-qA">
                                                                                        <field name="OP">DIVIDE</field>
                                                                                        <value name="A">
                                                                                          <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="on_source" id="rog!@vu:BUw@Vg][g_s-">
                                                                                            <field name="ATTR">state.val</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="B">
                                                                                          <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="math_number" id="=B6I[z+GTuc%s9HjeCp.">
                                                                                            <field name="NUM">1000</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </statement>
                                                                        <next>
                                                                          <block type="comment" id="vRvyUxzeAknF8-y?1y0B">
                                                                            <field name="COMMENT">Batterieladung über Netz</field>
                                                                            <next>
                                                                              <block type="on" id="=*hn}Nh%cbF,,8MeTD]^">
                                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                <field name="CONDITION">any</field>
                                                                                <field name="ACK_CONDITION"></field>
                                                                                <statement name="STATEMENT">
                                                                                  <block type="controls_if" id="EH:,]-n4sq!W5GWX,m|m">
                                                                                    <mutation else="1"></mutation>
                                                                                    <value name="IF0">
                                                                                      <block type="logic_multi_and" id="lW?R`+GrZ@=NB^1N/Cen">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                        <value name="AND0">
                                                                                          <block type="logic_compare" id="=Lvy-Uh?XG6D@v1[fH7J">
                                                                                            <field name="OP">LT</field>
                                                                                            <value name="A">
                                                                                              <block type="get_value" id="w+;2Z=7!oi:C[|b+pAO!">
                                                                                                <field name="ATTR">val</field>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <block type="math_number" id="hvg[h3Ahp62?asD)A62y">
                                                                                                <field name="NUM">1</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="AND1">
                                                                                          <block type="logic_compare" id="BRtu[S[p!ssG=2nXo8c)">
                                                                                            <field name="OP">LT</field>
                                                                                            <value name="A">
                                                                                              <block type="get_value" id="`l13.Y11VCD%BgA^a${y">
                                                                                                <field name="ATTR">val</field>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <block type="math_number" id="T#B_8-Whfw2/@Pax@HSO">
                                                                                                <field name="NUM">0</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                    <statement name="DO0">
                                                                                      <block type="update" id="E}[(Oer7{z~U99E]}Yg8">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                        <value name="VALUE">
                                                                                          <block type="math_round" id="MuU[;fK/1Y9aLyNVtU75">
                                                                                            <field name="OP">ROUNDUP</field>
                                                                                            <value name="NUM">
                                                                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                                <field name="NUM">3.1</field>
                                                                                              </shadow>
                                                                                              <block type="math_arithmetic" id="f`t{sxRGwz0].eAhs^Lp">
                                                                                                <field name="OP">DIVIDE</field>
                                                                                                <value name="A">
                                                                                                  <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                                    <field name="NUM">1</field>
                                                                                                  </shadow>
                                                                                                  <block type="on_source" id="8SG6UKL:;PK9pJmzo!#+">
                                                                                                    <field name="ATTR">state.val</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="B">
                                                                                                  <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                                    <field name="NUM">1</field>
                                                                                                  </shadow>
                                                                                                  <block type="math_number" id="08aprkxhJ(S+Epf:((;j">
                                                                                                    <field name="NUM">1000</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </statement>
                                                                                    <statement name="ELSE">
                                                                                      <block type="update" id="GC}I02Vvv]W2Qwz(Q1Q4">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                        <value name="VALUE">
                                                                                          <block type="math_number" id="5,,H-17)2^Z0MDN^r=6-">
                                                                                            <field name="NUM">0</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </statement>
                                                                                  </block>
                                                                                </statement>
                                                                                <next>
                                                                                  <block type="comment" id=")+j/rdrw_?8@eq8v9ZCJ">
                                                                                    <field name="COMMENT">Batterie Netzeinspeisung</field>
                                                                                    <next>
                                                                                      <block type="on" id="@^J}E`J,eF[p88x3@)R~">
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                                                        <field name="CONDITION">any</field>
                                                                                        <field name="ACK_CONDITION"></field>
                                                                                        <statement name="STATEMENT">
                                                                                          <block type="controls_if" id="V|c1tWUOT+8:QuZ`!,H)">
                                                                                            <mutation else="1"></mutation>
                                                                                            <value name="IF0">
                                                                                              <block type="logic_multi_and" id="=KcG/8jovF.B~aDV%-f^">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                <value name="AND0">
                                                                                                  <block type="logic_compare" id="2zioA7V=.):tLA{d)@7q">
                                                                                                    <field name="OP">LT</field>
                                                                                                    <value name="A">
                                                                                                      <block type="get_value" id="{@Dh.,9$-ffuh-7*/WX:">
                                                                                                        <field name="ATTR">val</field>
                                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <block type="math_number" id="q%}PR8,Zz/J*--zC0B78">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="AND1">
                                                                                                  <block type="logic_compare" id="tZWZgq#FLQRb]]3+EF0U">
                                                                                                    <field name="OP">LT</field>
                                                                                                    <value name="A">
                                                                                                      <block type="on_source" id=";!|_5s7C[dW2G9YK=p|:">
                                                                                                        <field name="ATTR">state.val</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <block type="math_number" id="~eL=-y4L+Zu/+qNUr#no">
                                                                                                        <field name="NUM">0</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                            <statement name="DO0">
                                                                                              <block type="update" id="haTT(QWr_$U!5x^QJi[,">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="math_arithmetic" id="5b/^SFE,,N~i#R`?hRms">
                                                                                                    <field name="OP">MULTIPLY</field>
                                                                                                    <value name="A">
                                                                                                      <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="on_source" id="4!IyP4Ha`A#jlkbA5lBZ">
                                                                                                        <field name="ATTR">state.val</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="math_number" id="/y44l`eJ3ReZcj;kPXZ?">
                                                                                                        <field name="NUM">-1</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </statement>
                                                                                            <statement name="ELSE">
                                                                                              <block type="update" id="Xm7@K;6NKB@3Cp##D5;h">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="math_number" id="SqR.*8V`hJIugw[Ry?+O">
                                                                                                    <field name="NUM">0</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </statement>
                                                                                          </block>
                                                                                        </statement>
                                                                                        <next>
                                                                                          <block type="comment" id="K6+js$fu%A[`-=y!bKU4">
                                                                                            <field name="COMMENT">Batterie Netzbezug / Einspeisung</field>
                                                                                            <next>
                                                                                              <block type="on" id="Odpmlsk?AOC(xp@rs,-,">
                                                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                                <field name="CONDITION">any</field>
                                                                                                <field name="ACK_CONDITION"></field>
                                                                                                <statement name="STATEMENT">
                                                                                                  <block type="update" id="%{Kfj,`XYX|AJV(m5}@=">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Netz_gesamt</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="logic_multi_or" id="D*oB1RnVhQ{(L)~iarPr">
                                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                        <value name="OR0">
                                                                                                          <block type="get_value" id="E6aezjYKj2#^|Z*+S|]j">
                                                                                                            <field name="ATTR">val</field>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="OR1">
                                                                                                          <block type="get_value" id=")@FRm9dq5(rIKc6d,V6n">
                                                                                                            <field name="ATTR">val</field>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </statement>
                                                                                                <next>
                                                                                                  <block type="comment" id="1rPj2U$Mym_}FRlbfjbj">
                                                                                                    <field name="COMMENT">Batteriekapazität</field>
                                                                                                    <next>
                                                                                                      <block type="on" id="^#q+~or)i4nq{7LEc_[!">
                                                                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.soc</field>
                                                                                                        <field name="CONDITION">any</field>
                                                                                                        <field name="ACK_CONDITION"></field>
                                                                                                        <statement name="STATEMENT">
                                                                                                          <block type="update" id="/PV#v$$.`*2*H1L#C?Pb">
                                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batteriekapazität</field>
                                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                                            <value name="VALUE">
                                                                                                              <block type="on_source" id="goZCXBnXJKbY.Rz{AdtQ">
                                                                                                                <field name="ATTR">state.val</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                          </block>
                                                                                                        </statement>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </xml>
                        

                        ...............................................................

                        Steffe.S.S Offline
                        Steffe.S.S Offline
                        Steffe.S.
                        wrote on last edited by Steffe.S.
                        #191

                        @steffe-s sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                        BITTE MACHT VORHER EIN BACKUP VOM AKTUELLEN IOBROKERSYSTEM, BEVOR IHR DAS SKRIPT TESTET!!!

                        Hier die 4 Skripte:

                        .1. Skript

                        Abholen aller Daten einmal pro Minute ( erweitert um Punkt 6 und Punkt 7). Unter 1 Minute gibt es Fehler.

                        *edit 19.09.2024: Aktualisierung unter 1 Minute gelöst...

                        *edit 10.04.2024:

                        wenn man sich auf LiveDaten und Microwechselrichterdaten beschränkt geht auch eine Aktualisierungszeit von 15 Sekunden. Einfach die Zeit im Trigger auf 15 sec stellen.*

                        LiveDaten.JPG

                        Enphase_Envoy_Datenabfrage.txt

                        Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                        ....................................................................
                        2.Skript

                        Das envoy bleibt mit den LiveDaten max 15 Minuten online, diese Skript aktualisiert sich alle 10 Minunten und hält das envoy im Onlinemodus.

                        sc_stream enable.JPG

                        sc-stream.txt

                        Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                        ...................................................................
                        2.2. Datenpunkte erstellen

                        Ich habe diese Ordner und Datenpunkte vorher händisch erstellt.

                        --------------------------------------------

                        Edit 30.05.2024: oder über importieren hinzufügen

                        Datenpunkte aus Json importieren:

                        Unbenannt.JPG

                        0_userdata.0.Enphase-Werte_durch_1000.json

                        0_userdata.0.Enphase-Batteriestatus.json

                        ------------------------------------------

                        1000.JPG

                        Bei diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                        1714082850972-einspeisung-durch-1000-minimum-0w.jpg

                        Auch diesen Datenpunkt erstellen und hier wieder diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                        Netzbezug ohne Einspeisung.JPG
                        ...................................................................
                        3. Skript

                        Die LiveDaten werden in MilliWatt ausgegeben. Dieses Skript rechnet die Daten im Watt um.

                        Enphase durch 1000 inkl. Netzbezug ohne Einspeisung.JPG

                        aktualisiert am 19.05.2024

                        DAS SKRIPT FUNKTIONIERT NUR MIT DEN DATENPUNKTEN AUS "PUNKT 2.2 DATENPUNKTE ERSTELLEN"!!!

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <block type="comment" id="b34XJZy@p3[tYg9~i77(" x="-438" y="-687">
                            <field name="COMMENT">Netzbezug / Netzeinspeisung</field>
                            <next>
                              <block type="on" id="R=TcB:Y;oW+@!R21r;.c">
                                <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                <field name="CONDITION">ne</field>
                                <field name="ACK_CONDITION"></field>
                                <statement name="STATEMENT">
                                  <block type="update" id=",Smtm*YKzeEoxCw%Y$$}">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_round" id="`:SgM1(S!e7wO$x#rdA7">
                                        <field name="OP">ROUNDUP</field>
                                        <value name="NUM">
                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                            <field name="NUM">3.1</field>
                                          </shadow>
                                          <block type="math_arithmetic" id="fGHNrBIh0Rb4C1Y1a[rY">
                                            <field name="OP">DIVIDE</field>
                                            <value name="A">
                                              <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="on_source" id=",b5/]n=AWf?^Ow=8yf^?">
                                                <field name="ATTR">state.val</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="math_number" id="QP84}[6.N0:{p**V+VhE">
                                                <field name="NUM">1000</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="update" id=":Am_Gm[7mE|w]#]*i_(*">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Netzbezug_ohne_Einspeisung</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_round" id="1WQ]FtxW*Rr[{i/vpEr~">
                                            <field name="OP">ROUNDUP</field>
                                            <value name="NUM">
                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                <field name="NUM">3.1</field>
                                              </shadow>
                                              <block type="math_arithmetic" id="V6]7*W;hmF]Fh=H]ov$D">
                                                <field name="OP">DIVIDE</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="on_source" id="iVlAXB/ie7[Z+4P$#g(A">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_number" id="F^B_8!nAS[2AWfxJ}[t7">
                                                    <field name="NUM">1000</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="(oz0QsPxo%1,Hcawpks.">
                                    <field name="COMMENT">Netzeinspeisung negiert</field>
                                    <next>
                                      <block type="on" id="o!/9@gfrBge5q!FXL_aq">
                                        <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                        <field name="CONDITION">any</field>
                                        <field name="ACK_CONDITION"></field>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="R!lRI5?P:IpDL/YpJ6mc">
                                            <mutation else="1"></mutation>
                                            <value name="IF0">
                                              <block type="logic_compare" id="92KNC^=Hu_c4o!15yeJ*">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="H*HRgODY9:4F_H2?s]2*">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="A**xn9B,cbBzS6eq1Xa0">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="update" id="/]@j_??kR~lK`?GljvLk">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_arithmetic" id=",wij]CcH[K|9{zF.($Ne">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="get_value" id="R92$P`uocO;{95ac+S^E">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="math_number" id="@K{D^A]w8mzwrK*~dh7|">
                                                        <field name="NUM">-1</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <statement name="ELSE">
                                              <block type="update" id="{^EgD^wDw$p*s%uAVi+B">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="-0gPy-bv:cv@giTA}fr:">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="comment" id="z.XJ|8h6gD-i^Dk255KS">
                                            <field name="COMMENT">Hausverbrauch</field>
                                            <next>
                                              <block type="on" id="F4|LHxJ-9e3}FbqgM*%0">
                                                <field name="OID">0_userdata.0.enphase.livedata.meters.load.agg_p_mw</field>
                                                <field name="CONDITION">any</field>
                                                <field name="ACK_CONDITION"></field>
                                                <statement name="STATEMENT">
                                                  <block type="update" id="sX/%.U3(d@0FH;[c-7Z$">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Hausverbrauch</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_round" id=":i2J#BlN1uy4Jye~K!IR">
                                                        <field name="OP">ROUNDUP</field>
                                                        <value name="NUM">
                                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                            <field name="NUM">3.1</field>
                                                          </shadow>
                                                          <block type="math_arithmetic" id="*e~+quHSP.z$azvq~}F0">
                                                            <field name="OP">DIVIDE</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="M`Yh{e~{r5:_-:9P^:JW">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="on_source" id="phJx!7L#U!a.]5=76AZf">
                                                                <field name="ATTR">state.val</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id="MQBq|1jXHJ#%,1..gxvY">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="math_number" id="3:i,RAn2:9TkS3H_=-J#">
                                                                <field name="NUM">1000</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="comment" id="`*;dUWj=!LDNpbkLc))M">
                                                    <field name="COMMENT">PV Erzeugnung</field>
                                                    <next>
                                                      <block type="on" id="iT)3o|gf6HB.%eCN$@zP">
                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.pv.agg_p_mw</field>
                                                        <field name="CONDITION">any</field>
                                                        <field name="ACK_CONDITION"></field>
                                                        <statement name="STATEMENT">
                                                          <block type="controls_if" id="l^zE[P~R)a!2t|:jiM(|">
                                                            <mutation else="1"></mutation>
                                                            <value name="IF0">
                                                              <block type="logic_compare" id="nh3/v4+,91w5I[3IadS$">
                                                                <field name="OP">GT</field>
                                                                <value name="A">
                                                                  <block type="on_source" id="8T=N6GJN8KUjykUuNW?P">
                                                                    <field name="ATTR">state.val</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="x)}j2:d+Is%sN@z_6g,~">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <statement name="DO0">
                                                              <block type="update" id="$5xwgaIa3ULu9MP@`DUx">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_round" id="{:U/C2)dpiqCyXsRX%2}">
                                                                    <field name="OP">ROUNDUP</field>
                                                                    <value name="NUM">
                                                                      <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                        <field name="NUM">3.1</field>
                                                                      </shadow>
                                                                      <block type="math_arithmetic" id="KdjcX,q(-3l`vCx2(o~l">
                                                                        <field name="OP">DIVIDE</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="Z;YmcS)C![ri*hWck9-#">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="on_source" id="ydT%+`wmTw+}+t/sF=C~">
                                                                            <field name="ATTR">state.val</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="BGWnp9qn*ZZM4o|#M[tX">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="math_number" id="LrV1n3ml@ZTfS0C$j9@b">
                                                                            <field name="NUM">1000</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </statement>
                                                            <statement name="ELSE">
                                                              <block type="update" id="w_ky5IC/WO/2W,dnzB5A">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="math_number" id="m;ZDZySI%b2~}UZEDIso">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </statement>
                                                          </block>
                                                        </statement>
                                                        <next>
                                                          <block type="comment" id="4]s2;oO[A.DKS^feZs*l">
                                                            <field name="COMMENT">Batterieladung über PV</field>
                                                            <next>
                                                              <block type="on" id="}*xtxiY-j7g,_jBEDV?^">
                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                <field name="CONDITION">any</field>
                                                                <field name="ACK_CONDITION"></field>
                                                                <statement name="STATEMENT">
                                                                  <block type="controls_if" id="Z+Le9t!]wro?Aiyjq9yT">
                                                                    <mutation else="1"></mutation>
                                                                    <value name="IF0">
                                                                      <block type="logic_compare" id="ye0=tBqFC3,,.^@ywMv3">
                                                                        <field name="OP">GT</field>
                                                                        <value name="A">
                                                                          <block type="get_value" id="U#-I`pnZzIDQ/1JJ|4I{">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <block type="math_number" id="b;}lR*{qn8YNnYK5(,$m">
                                                                            <field name="NUM">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <statement name="DO0">
                                                                      <block type="update" id="moZ7/vz`Ex*wXp+S%OxU">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_round" id="/eg]`f){,*d1F*!nHB7k">
                                                                            <field name="OP">ROUNDUP</field>
                                                                            <value name="NUM">
                                                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                <field name="NUM">3.1</field>
                                                                              </shadow>
                                                                              <block type="math_arithmetic" id="6t5]{-=r?*[|^C_yl8U]">
                                                                                <field name="OP">DIVIDE</field>
                                                                                <value name="A">
                                                                                  <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="on_source" id="r/fj8*GRX+DEAB?kB.I*">
                                                                                    <field name="ATTR">state.val</field>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="B">
                                                                                  <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                    <field name="NUM">1</field>
                                                                                  </shadow>
                                                                                  <block type="math_number" id="-.qb;4Y|6v05uZ$5@o$0">
                                                                                    <field name="NUM">1000</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </statement>
                                                                    <statement name="ELSE">
                                                                      <block type="update" id="Wczg}72@veb-mhG7s*!b">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_number" id="l),T@!ne5;zU)D:=@gxm">
                                                                            <field name="NUM">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </statement>
                                                                  </block>
                                                                </statement>
                                                                <next>
                                                                  <block type="comment" id="Ci}(~uQL=y.a5k~;ZJRC">
                                                                    <field name="COMMENT">Batterie Eigenverbrauch</field>
                                                                    <next>
                                                                      <block type="on" id=".ftf(ks:n?jlQW7{QbfI">
                                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                        <field name="CONDITION">any</field>
                                                                        <field name="ACK_CONDITION"></field>
                                                                        <statement name="STATEMENT">
                                                                          <block type="update" id="1Ek@Ld0k%0Mz#x#9LC({">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                            <value name="VALUE">
                                                                              <block type="math_round" id="eeH:@M.MP@((T[C^O{qP">
                                                                                <field name="OP">ROUNDUP</field>
                                                                                <value name="NUM">
                                                                                  <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                    <field name="NUM">3.1</field>
                                                                                  </shadow>
                                                                                  <block type="math_arithmetic" id="DrW_.;3ED~7qV?5zl#Sr">
                                                                                    <field name="OP">DIVIDE</field>
                                                                                    <value name="A">
                                                                                      <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="on_source" id="BL1JGJ:+%L=I;4NL?zsV">
                                                                                        <field name="ATTR">state.val</field>
                                                                                      </block>
                                                                                    </value>
                                                                                    <value name="B">
                                                                                      <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="math_number" id="..lWof[ekOiU~KQ$b@_z">
                                                                                        <field name="NUM">1000</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="update" id="R0.]Ji-I)USF_IdoA+AM">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_nur_Entladung</field>
                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                <value name="VALUE">
                                                                                  <block type="math_round" id="K[hTID9Zd?9b~HXXU2c)">
                                                                                    <field name="OP">ROUNDUP</field>
                                                                                    <value name="NUM">
                                                                                      <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                        <field name="NUM">3.1</field>
                                                                                      </shadow>
                                                                                      <block type="math_arithmetic" id="i)mZ;NsE4%KMcWNRe-qA">
                                                                                        <field name="OP">DIVIDE</field>
                                                                                        <value name="A">
                                                                                          <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="on_source" id="rog!@vu:BUw@Vg][g_s-">
                                                                                            <field name="ATTR">state.val</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="B">
                                                                                          <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="math_number" id="=B6I[z+GTuc%s9HjeCp.">
                                                                                            <field name="NUM">1000</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </statement>
                                                                        <next>
                                                                          <block type="comment" id="vRvyUxzeAknF8-y?1y0B">
                                                                            <field name="COMMENT">Batterieladung über Netz</field>
                                                                            <next>
                                                                              <block type="on" id="=*hn}Nh%cbF,,8MeTD]^">
                                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                <field name="CONDITION">any</field>
                                                                                <field name="ACK_CONDITION"></field>
                                                                                <statement name="STATEMENT">
                                                                                  <block type="controls_if" id="EH:,]-n4sq!W5GWX,m|m">
                                                                                    <mutation else="1"></mutation>
                                                                                    <value name="IF0">
                                                                                      <block type="logic_multi_and" id="lW?R`+GrZ@=NB^1N/Cen">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                        <value name="AND0">
                                                                                          <block type="logic_compare" id="=Lvy-Uh?XG6D@v1[fH7J">
                                                                                            <field name="OP">LT</field>
                                                                                            <value name="A">
                                                                                              <block type="get_value" id="w+;2Z=7!oi:C[|b+pAO!">
                                                                                                <field name="ATTR">val</field>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <block type="math_number" id="hvg[h3Ahp62?asD)A62y">
                                                                                                <field name="NUM">1</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="AND1">
                                                                                          <block type="logic_compare" id="BRtu[S[p!ssG=2nXo8c)">
                                                                                            <field name="OP">LT</field>
                                                                                            <value name="A">
                                                                                              <block type="get_value" id="`l13.Y11VCD%BgA^a${y">
                                                                                                <field name="ATTR">val</field>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <block type="math_number" id="T#B_8-Whfw2/@Pax@HSO">
                                                                                                <field name="NUM">0</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                    <statement name="DO0">
                                                                                      <block type="update" id="E}[(Oer7{z~U99E]}Yg8">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                        <value name="VALUE">
                                                                                          <block type="math_round" id="MuU[;fK/1Y9aLyNVtU75">
                                                                                            <field name="OP">ROUNDUP</field>
                                                                                            <value name="NUM">
                                                                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                                <field name="NUM">3.1</field>
                                                                                              </shadow>
                                                                                              <block type="math_arithmetic" id="f`t{sxRGwz0].eAhs^Lp">
                                                                                                <field name="OP">DIVIDE</field>
                                                                                                <value name="A">
                                                                                                  <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                                    <field name="NUM">1</field>
                                                                                                  </shadow>
                                                                                                  <block type="on_source" id="8SG6UKL:;PK9pJmzo!#+">
                                                                                                    <field name="ATTR">state.val</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="B">
                                                                                                  <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                                    <field name="NUM">1</field>
                                                                                                  </shadow>
                                                                                                  <block type="math_number" id="08aprkxhJ(S+Epf:((;j">
                                                                                                    <field name="NUM">1000</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </statement>
                                                                                    <statement name="ELSE">
                                                                                      <block type="update" id="GC}I02Vvv]W2Qwz(Q1Q4">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                        <value name="VALUE">
                                                                                          <block type="math_number" id="5,,H-17)2^Z0MDN^r=6-">
                                                                                            <field name="NUM">0</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </statement>
                                                                                  </block>
                                                                                </statement>
                                                                                <next>
                                                                                  <block type="comment" id=")+j/rdrw_?8@eq8v9ZCJ">
                                                                                    <field name="COMMENT">Batterie Netzeinspeisung</field>
                                                                                    <next>
                                                                                      <block type="on" id="@^J}E`J,eF[p88x3@)R~">
                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                                                        <field name="CONDITION">any</field>
                                                                                        <field name="ACK_CONDITION"></field>
                                                                                        <statement name="STATEMENT">
                                                                                          <block type="controls_if" id="V|c1tWUOT+8:QuZ`!,H)">
                                                                                            <mutation else="1"></mutation>
                                                                                            <value name="IF0">
                                                                                              <block type="logic_multi_and" id="=KcG/8jovF.B~aDV%-f^">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                <value name="AND0">
                                                                                                  <block type="logic_compare" id="2zioA7V=.):tLA{d)@7q">
                                                                                                    <field name="OP">LT</field>
                                                                                                    <value name="A">
                                                                                                      <block type="get_value" id="{@Dh.,9$-ffuh-7*/WX:">
                                                                                                        <field name="ATTR">val</field>
                                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <block type="math_number" id="q%}PR8,Zz/J*--zC0B78">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="AND1">
                                                                                                  <block type="logic_compare" id="tZWZgq#FLQRb]]3+EF0U">
                                                                                                    <field name="OP">LT</field>
                                                                                                    <value name="A">
                                                                                                      <block type="on_source" id=";!|_5s7C[dW2G9YK=p|:">
                                                                                                        <field name="ATTR">state.val</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <block type="math_number" id="~eL=-y4L+Zu/+qNUr#no">
                                                                                                        <field name="NUM">0</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                            <statement name="DO0">
                                                                                              <block type="update" id="haTT(QWr_$U!5x^QJi[,">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="math_arithmetic" id="5b/^SFE,,N~i#R`?hRms">
                                                                                                    <field name="OP">MULTIPLY</field>
                                                                                                    <value name="A">
                                                                                                      <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="on_source" id="4!IyP4Ha`A#jlkbA5lBZ">
                                                                                                        <field name="ATTR">state.val</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="math_number" id="/y44l`eJ3ReZcj;kPXZ?">
                                                                                                        <field name="NUM">-1</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </statement>
                                                                                            <statement name="ELSE">
                                                                                              <block type="update" id="Xm7@K;6NKB@3Cp##D5;h">
                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="math_number" id="SqR.*8V`hJIugw[Ry?+O">
                                                                                                    <field name="NUM">0</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </statement>
                                                                                          </block>
                                                                                        </statement>
                                                                                        <next>
                                                                                          <block type="comment" id="K6+js$fu%A[`-=y!bKU4">
                                                                                            <field name="COMMENT">Batterie Netzbezug / Einspeisung</field>
                                                                                            <next>
                                                                                              <block type="on" id="Odpmlsk?AOC(xp@rs,-,">
                                                                                                <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                                <field name="CONDITION">any</field>
                                                                                                <field name="ACK_CONDITION"></field>
                                                                                                <statement name="STATEMENT">
                                                                                                  <block type="update" id="%{Kfj,`XYX|AJV(m5}@=">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Netz_gesamt</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="logic_multi_or" id="D*oB1RnVhQ{(L)~iarPr">
                                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                        <value name="OR0">
                                                                                                          <block type="get_value" id="E6aezjYKj2#^|Z*+S|]j">
                                                                                                            <field name="ATTR">val</field>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="OR1">
                                                                                                          <block type="get_value" id=")@FRm9dq5(rIKc6d,V6n">
                                                                                                            <field name="ATTR">val</field>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </statement>
                                                                                                <next>
                                                                                                  <block type="comment" id="1rPj2U$Mym_}FRlbfjbj">
                                                                                                    <field name="COMMENT">Batteriekapazität</field>
                                                                                                    <next>
                                                                                                      <block type="on" id="^#q+~or)i4nq{7LEc_[!">
                                                                                                        <field name="OID">0_userdata.0.enphase.livedata.meters.soc</field>
                                                                                                        <field name="CONDITION">any</field>
                                                                                                        <field name="ACK_CONDITION"></field>
                                                                                                        <statement name="STATEMENT">
                                                                                                          <block type="update" id="/PV#v$$.`*2*H1L#C?Pb">
                                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batteriekapazität</field>
                                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                                            <value name="VALUE">
                                                                                                              <block type="on_source" id="goZCXBnXJKbY.Rz{AdtQ">
                                                                                                                <field name="ATTR">state.val</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                          </block>
                                                                                                        </statement>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </xml>
                        

                        ...............................................................

                        @syntetic

                        hast Du das hier alles gemacht???

                        1. Skript 1 Datenbafrage
                        2. Skript 2 sc-stream für die Aktualisierung
                        3. Datenpunkte importieren
                        4. Skript 3 Daten durch 1000 (Ausgabe in Watt)
                        S 2 Replies Last reply
                        0
                        • Steffe.S.S Steffe.S.

                          @steffe-s sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                          BITTE MACHT VORHER EIN BACKUP VOM AKTUELLEN IOBROKERSYSTEM, BEVOR IHR DAS SKRIPT TESTET!!!

                          Hier die 4 Skripte:

                          .1. Skript

                          Abholen aller Daten einmal pro Minute ( erweitert um Punkt 6 und Punkt 7). Unter 1 Minute gibt es Fehler.

                          *edit 19.09.2024: Aktualisierung unter 1 Minute gelöst...

                          *edit 10.04.2024:

                          wenn man sich auf LiveDaten und Microwechselrichterdaten beschränkt geht auch eine Aktualisierungszeit von 15 Sekunden. Einfach die Zeit im Trigger auf 15 sec stellen.*

                          LiveDaten.JPG

                          Enphase_Envoy_Datenabfrage.txt

                          Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                          ....................................................................
                          2.Skript

                          Das envoy bleibt mit den LiveDaten max 15 Minuten online, diese Skript aktualisiert sich alle 10 Minunten und hält das envoy im Onlinemodus.

                          sc_stream enable.JPG

                          sc-stream.txt

                          Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                          ...................................................................
                          2.2. Datenpunkte erstellen

                          Ich habe diese Ordner und Datenpunkte vorher händisch erstellt.

                          --------------------------------------------

                          Edit 30.05.2024: oder über importieren hinzufügen

                          Datenpunkte aus Json importieren:

                          Unbenannt.JPG

                          0_userdata.0.Enphase-Werte_durch_1000.json

                          0_userdata.0.Enphase-Batteriestatus.json

                          ------------------------------------------

                          1000.JPG

                          Bei diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                          1714082850972-einspeisung-durch-1000-minimum-0w.jpg

                          Auch diesen Datenpunkt erstellen und hier wieder diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                          Netzbezug ohne Einspeisung.JPG
                          ...................................................................
                          3. Skript

                          Die LiveDaten werden in MilliWatt ausgegeben. Dieses Skript rechnet die Daten im Watt um.

                          Enphase durch 1000 inkl. Netzbezug ohne Einspeisung.JPG

                          aktualisiert am 19.05.2024

                          DAS SKRIPT FUNKTIONIERT NUR MIT DEN DATENPUNKTEN AUS "PUNKT 2.2 DATENPUNKTE ERSTELLEN"!!!

                          <xml xmlns="https://developers.google.com/blockly/xml">
                            <block type="comment" id="b34XJZy@p3[tYg9~i77(" x="-438" y="-687">
                              <field name="COMMENT">Netzbezug / Netzeinspeisung</field>
                              <next>
                                <block type="on" id="R=TcB:Y;oW+@!R21r;.c">
                                  <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                  <field name="CONDITION">ne</field>
                                  <field name="ACK_CONDITION"></field>
                                  <statement name="STATEMENT">
                                    <block type="update" id=",Smtm*YKzeEoxCw%Y$$}">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="math_round" id="`:SgM1(S!e7wO$x#rdA7">
                                          <field name="OP">ROUNDUP</field>
                                          <value name="NUM">
                                            <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                              <field name="NUM">3.1</field>
                                            </shadow>
                                            <block type="math_arithmetic" id="fGHNrBIh0Rb4C1Y1a[rY">
                                              <field name="OP">DIVIDE</field>
                                              <value name="A">
                                                <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                                <block type="on_source" id=",b5/]n=AWf?^Ow=8yf^?">
                                                  <field name="ATTR">state.val</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                                <block type="math_number" id="QP84}[6.N0:{p**V+VhE">
                                                  <field name="NUM">1000</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="update" id=":Am_Gm[7mE|w]#]*i_(*">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Netzbezug_ohne_Einspeisung</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="math_round" id="1WQ]FtxW*Rr[{i/vpEr~">
                                              <field name="OP">ROUNDUP</field>
                                              <value name="NUM">
                                                <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                  <field name="NUM">3.1</field>
                                                </shadow>
                                                <block type="math_arithmetic" id="V6]7*W;hmF]Fh=H]ov$D">
                                                  <field name="OP">DIVIDE</field>
                                                  <value name="A">
                                                    <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                    <block type="on_source" id="iVlAXB/ie7[Z+4P$#g(A">
                                                      <field name="ATTR">state.val</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                      <field name="NUM">1</field>
                                                    </shadow>
                                                    <block type="math_number" id="F^B_8!nAS[2AWfxJ}[t7">
                                                      <field name="NUM">1000</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="comment" id="(oz0QsPxo%1,Hcawpks.">
                                      <field name="COMMENT">Netzeinspeisung negiert</field>
                                      <next>
                                        <block type="on" id="o!/9@gfrBge5q!FXL_aq">
                                          <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                          <field name="CONDITION">any</field>
                                          <field name="ACK_CONDITION"></field>
                                          <statement name="STATEMENT">
                                            <block type="controls_if" id="R!lRI5?P:IpDL/YpJ6mc">
                                              <mutation else="1"></mutation>
                                              <value name="IF0">
                                                <block type="logic_compare" id="92KNC^=Hu_c4o!15yeJ*">
                                                  <field name="OP">GT</field>
                                                  <value name="A">
                                                    <block type="get_value" id="H*HRgODY9:4F_H2?s]2*">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="A**xn9B,cbBzS6eq1Xa0">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="update" id="/]@j_??kR~lK`?GljvLk">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_arithmetic" id=",wij]CcH[K|9{zF.($Ne">
                                                      <field name="OP">MULTIPLY</field>
                                                      <value name="A">
                                                        <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="get_value" id="R92$P`uocO;{95ac+S^E">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="math_number" id="@K{D^A]w8mzwrK*~dh7|">
                                                          <field name="NUM">-1</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </statement>
                                              <statement name="ELSE">
                                                <block type="update" id="{^EgD^wDw$p*s%uAVi+B">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="-0gPy-bv:cv@giTA}fr:">
                                                      <field name="NUM">0</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="comment" id="z.XJ|8h6gD-i^Dk255KS">
                                              <field name="COMMENT">Hausverbrauch</field>
                                              <next>
                                                <block type="on" id="F4|LHxJ-9e3}FbqgM*%0">
                                                  <field name="OID">0_userdata.0.enphase.livedata.meters.load.agg_p_mw</field>
                                                  <field name="CONDITION">any</field>
                                                  <field name="ACK_CONDITION"></field>
                                                  <statement name="STATEMENT">
                                                    <block type="update" id="sX/%.U3(d@0FH;[c-7Z$">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                      <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Hausverbrauch</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="math_round" id=":i2J#BlN1uy4Jye~K!IR">
                                                          <field name="OP">ROUNDUP</field>
                                                          <value name="NUM">
                                                            <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                              <field name="NUM">3.1</field>
                                                            </shadow>
                                                            <block type="math_arithmetic" id="*e~+quHSP.z$azvq~}F0">
                                                              <field name="OP">DIVIDE</field>
                                                              <value name="A">
                                                                <shadow type="math_number" id="M`Yh{e~{r5:_-:9P^:JW">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="on_source" id="phJx!7L#U!a.]5=76AZf">
                                                                  <field name="ATTR">state.val</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <shadow type="math_number" id="MQBq|1jXHJ#%,1..gxvY">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="math_number" id="3:i,RAn2:9TkS3H_=-J#">
                                                                  <field name="NUM">1000</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                  <next>
                                                    <block type="comment" id="`*;dUWj=!LDNpbkLc))M">
                                                      <field name="COMMENT">PV Erzeugnung</field>
                                                      <next>
                                                        <block type="on" id="iT)3o|gf6HB.%eCN$@zP">
                                                          <field name="OID">0_userdata.0.enphase.livedata.meters.pv.agg_p_mw</field>
                                                          <field name="CONDITION">any</field>
                                                          <field name="ACK_CONDITION"></field>
                                                          <statement name="STATEMENT">
                                                            <block type="controls_if" id="l^zE[P~R)a!2t|:jiM(|">
                                                              <mutation else="1"></mutation>
                                                              <value name="IF0">
                                                                <block type="logic_compare" id="nh3/v4+,91w5I[3IadS$">
                                                                  <field name="OP">GT</field>
                                                                  <value name="A">
                                                                    <block type="on_source" id="8T=N6GJN8KUjykUuNW?P">
                                                                      <field name="ATTR">state.val</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <block type="math_number" id="x)}j2:d+Is%sN@z_6g,~">
                                                                      <field name="NUM">0</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <statement name="DO0">
                                                                <block type="update" id="$5xwgaIa3ULu9MP@`DUx">
                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                  <value name="VALUE">
                                                                    <block type="math_round" id="{:U/C2)dpiqCyXsRX%2}">
                                                                      <field name="OP">ROUNDUP</field>
                                                                      <value name="NUM">
                                                                        <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                          <field name="NUM">3.1</field>
                                                                        </shadow>
                                                                        <block type="math_arithmetic" id="KdjcX,q(-3l`vCx2(o~l">
                                                                          <field name="OP">DIVIDE</field>
                                                                          <value name="A">
                                                                            <shadow type="math_number" id="Z;YmcS)C![ri*hWck9-#">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="on_source" id="ydT%+`wmTw+}+t/sF=C~">
                                                                              <field name="ATTR">state.val</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="B">
                                                                            <shadow type="math_number" id="BGWnp9qn*ZZM4o|#M[tX">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="math_number" id="LrV1n3ml@ZTfS0C$j9@b">
                                                                              <field name="NUM">1000</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </statement>
                                                              <statement name="ELSE">
                                                                <block type="update" id="w_ky5IC/WO/2W,dnzB5A">
                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                  <value name="VALUE">
                                                                    <block type="math_number" id="m;ZDZySI%b2~}UZEDIso">
                                                                      <field name="NUM">0</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </statement>
                                                            </block>
                                                          </statement>
                                                          <next>
                                                            <block type="comment" id="4]s2;oO[A.DKS^feZs*l">
                                                              <field name="COMMENT">Batterieladung über PV</field>
                                                              <next>
                                                                <block type="on" id="}*xtxiY-j7g,_jBEDV?^">
                                                                  <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                  <field name="CONDITION">any</field>
                                                                  <field name="ACK_CONDITION"></field>
                                                                  <statement name="STATEMENT">
                                                                    <block type="controls_if" id="Z+Le9t!]wro?Aiyjq9yT">
                                                                      <mutation else="1"></mutation>
                                                                      <value name="IF0">
                                                                        <block type="logic_compare" id="ye0=tBqFC3,,.^@ywMv3">
                                                                          <field name="OP">GT</field>
                                                                          <value name="A">
                                                                            <block type="get_value" id="U#-I`pnZzIDQ/1JJ|4I{">
                                                                              <field name="ATTR">val</field>
                                                                              <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="B">
                                                                            <block type="math_number" id="b;}lR*{qn8YNnYK5(,$m">
                                                                              <field name="NUM">0</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <statement name="DO0">
                                                                        <block type="update" id="moZ7/vz`Ex*wXp+S%OxU">
                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE">
                                                                            <block type="math_round" id="/eg]`f){,*d1F*!nHB7k">
                                                                              <field name="OP">ROUNDUP</field>
                                                                              <value name="NUM">
                                                                                <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                  <field name="NUM">3.1</field>
                                                                                </shadow>
                                                                                <block type="math_arithmetic" id="6t5]{-=r?*[|^C_yl8U]">
                                                                                  <field name="OP">DIVIDE</field>
                                                                                  <value name="A">
                                                                                    <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                      <field name="NUM">1</field>
                                                                                    </shadow>
                                                                                    <block type="on_source" id="r/fj8*GRX+DEAB?kB.I*">
                                                                                      <field name="ATTR">state.val</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="B">
                                                                                    <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                      <field name="NUM">1</field>
                                                                                    </shadow>
                                                                                    <block type="math_number" id="-.qb;4Y|6v05uZ$5@o$0">
                                                                                      <field name="NUM">1000</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </statement>
                                                                      <statement name="ELSE">
                                                                        <block type="update" id="Wczg}72@veb-mhG7s*!b">
                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE">
                                                                            <block type="math_number" id="l),T@!ne5;zU)D:=@gxm">
                                                                              <field name="NUM">0</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </statement>
                                                                    </block>
                                                                  </statement>
                                                                  <next>
                                                                    <block type="comment" id="Ci}(~uQL=y.a5k~;ZJRC">
                                                                      <field name="COMMENT">Batterie Eigenverbrauch</field>
                                                                      <next>
                                                                        <block type="on" id=".ftf(ks:n?jlQW7{QbfI">
                                                                          <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                          <field name="CONDITION">any</field>
                                                                          <field name="ACK_CONDITION"></field>
                                                                          <statement name="STATEMENT">
                                                                            <block type="update" id="1Ek@Ld0k%0Mz#x#9LC({">
                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                              <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                              <field name="WITH_DELAY">FALSE</field>
                                                                              <value name="VALUE">
                                                                                <block type="math_round" id="eeH:@M.MP@((T[C^O{qP">
                                                                                  <field name="OP">ROUNDUP</field>
                                                                                  <value name="NUM">
                                                                                    <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                      <field name="NUM">3.1</field>
                                                                                    </shadow>
                                                                                    <block type="math_arithmetic" id="DrW_.;3ED~7qV?5zl#Sr">
                                                                                      <field name="OP">DIVIDE</field>
                                                                                      <value name="A">
                                                                                        <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                          <field name="NUM">1</field>
                                                                                        </shadow>
                                                                                        <block type="on_source" id="BL1JGJ:+%L=I;4NL?zsV">
                                                                                          <field name="ATTR">state.val</field>
                                                                                        </block>
                                                                                      </value>
                                                                                      <value name="B">
                                                                                        <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                          <field name="NUM">1</field>
                                                                                        </shadow>
                                                                                        <block type="math_number" id="..lWof[ekOiU~KQ$b@_z">
                                                                                          <field name="NUM">1000</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="update" id="R0.]Ji-I)USF_IdoA+AM">
                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_nur_Entladung</field>
                                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                                  <value name="VALUE">
                                                                                    <block type="math_round" id="K[hTID9Zd?9b~HXXU2c)">
                                                                                      <field name="OP">ROUNDUP</field>
                                                                                      <value name="NUM">
                                                                                        <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                          <field name="NUM">3.1</field>
                                                                                        </shadow>
                                                                                        <block type="math_arithmetic" id="i)mZ;NsE4%KMcWNRe-qA">
                                                                                          <field name="OP">DIVIDE</field>
                                                                                          <value name="A">
                                                                                            <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="on_source" id="rog!@vu:BUw@Vg][g_s-">
                                                                                              <field name="ATTR">state.val</field>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="math_number" id="=B6I[z+GTuc%s9HjeCp.">
                                                                                              <field name="NUM">1000</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </statement>
                                                                          <next>
                                                                            <block type="comment" id="vRvyUxzeAknF8-y?1y0B">
                                                                              <field name="COMMENT">Batterieladung über Netz</field>
                                                                              <next>
                                                                                <block type="on" id="=*hn}Nh%cbF,,8MeTD]^">
                                                                                  <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                  <field name="CONDITION">any</field>
                                                                                  <field name="ACK_CONDITION"></field>
                                                                                  <statement name="STATEMENT">
                                                                                    <block type="controls_if" id="EH:,]-n4sq!W5GWX,m|m">
                                                                                      <mutation else="1"></mutation>
                                                                                      <value name="IF0">
                                                                                        <block type="logic_multi_and" id="lW?R`+GrZ@=NB^1N/Cen">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                          <value name="AND0">
                                                                                            <block type="logic_compare" id="=Lvy-Uh?XG6D@v1[fH7J">
                                                                                              <field name="OP">LT</field>
                                                                                              <value name="A">
                                                                                                <block type="get_value" id="w+;2Z=7!oi:C[|b+pAO!">
                                                                                                  <field name="ATTR">val</field>
                                                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="hvg[h3Ahp62?asD)A62y">
                                                                                                  <field name="NUM">1</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="AND1">
                                                                                            <block type="logic_compare" id="BRtu[S[p!ssG=2nXo8c)">
                                                                                              <field name="OP">LT</field>
                                                                                              <value name="A">
                                                                                                <block type="get_value" id="`l13.Y11VCD%BgA^a${y">
                                                                                                  <field name="ATTR">val</field>
                                                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="T#B_8-Whfw2/@Pax@HSO">
                                                                                                  <field name="NUM">0</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO0">
                                                                                        <block type="update" id="E}[(Oer7{z~U99E]}Yg8">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="math_round" id="MuU[;fK/1Y9aLyNVtU75">
                                                                                              <field name="OP">ROUNDUP</field>
                                                                                              <value name="NUM">
                                                                                                <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                                  <field name="NUM">3.1</field>
                                                                                                </shadow>
                                                                                                <block type="math_arithmetic" id="f`t{sxRGwz0].eAhs^Lp">
                                                                                                  <field name="OP">DIVIDE</field>
                                                                                                  <value name="A">
                                                                                                    <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                                      <field name="NUM">1</field>
                                                                                                    </shadow>
                                                                                                    <block type="on_source" id="8SG6UKL:;PK9pJmzo!#+">
                                                                                                      <field name="ATTR">state.val</field>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                  <value name="B">
                                                                                                    <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                                      <field name="NUM">1</field>
                                                                                                    </shadow>
                                                                                                    <block type="math_number" id="08aprkxhJ(S+Epf:((;j">
                                                                                                      <field name="NUM">1000</field>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <statement name="ELSE">
                                                                                        <block type="update" id="GC}I02Vvv]W2Qwz(Q1Q4">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="math_number" id="5,,H-17)2^Z0MDN^r=6-">
                                                                                              <field name="NUM">0</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                    </block>
                                                                                  </statement>
                                                                                  <next>
                                                                                    <block type="comment" id=")+j/rdrw_?8@eq8v9ZCJ">
                                                                                      <field name="COMMENT">Batterie Netzeinspeisung</field>
                                                                                      <next>
                                                                                        <block type="on" id="@^J}E`J,eF[p88x3@)R~">
                                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                                                          <field name="CONDITION">any</field>
                                                                                          <field name="ACK_CONDITION"></field>
                                                                                          <statement name="STATEMENT">
                                                                                            <block type="controls_if" id="V|c1tWUOT+8:QuZ`!,H)">
                                                                                              <mutation else="1"></mutation>
                                                                                              <value name="IF0">
                                                                                                <block type="logic_multi_and" id="=KcG/8jovF.B~aDV%-f^">
                                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                  <value name="AND0">
                                                                                                    <block type="logic_compare" id="2zioA7V=.):tLA{d)@7q">
                                                                                                      <field name="OP">LT</field>
                                                                                                      <value name="A">
                                                                                                        <block type="get_value" id="{@Dh.,9$-ffuh-7*/WX:">
                                                                                                          <field name="ATTR">val</field>
                                                                                                          <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                      <value name="B">
                                                                                                        <block type="math_number" id="q%}PR8,Zz/J*--zC0B78">
                                                                                                          <field name="NUM">1</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                  <value name="AND1">
                                                                                                    <block type="logic_compare" id="tZWZgq#FLQRb]]3+EF0U">
                                                                                                      <field name="OP">LT</field>
                                                                                                      <value name="A">
                                                                                                        <block type="on_source" id=";!|_5s7C[dW2G9YK=p|:">
                                                                                                          <field name="ATTR">state.val</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                      <value name="B">
                                                                                                        <block type="math_number" id="~eL=-y4L+Zu/+qNUr#no">
                                                                                                          <field name="NUM">0</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                </block>
                                                                                              </value>
                                                                                              <statement name="DO0">
                                                                                                <block type="update" id="haTT(QWr_$U!5x^QJi[,">
                                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                                                  <value name="VALUE">
                                                                                                    <block type="math_arithmetic" id="5b/^SFE,,N~i#R`?hRms">
                                                                                                      <field name="OP">MULTIPLY</field>
                                                                                                      <value name="A">
                                                                                                        <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                                                                          <field name="NUM">1</field>
                                                                                                        </shadow>
                                                                                                        <block type="on_source" id="4!IyP4Ha`A#jlkbA5lBZ">
                                                                                                          <field name="ATTR">state.val</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                      <value name="B">
                                                                                                        <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                                                                          <field name="NUM">1</field>
                                                                                                        </shadow>
                                                                                                        <block type="math_number" id="/y44l`eJ3ReZcj;kPXZ?">
                                                                                                          <field name="NUM">-1</field>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                </block>
                                                                                              </statement>
                                                                                              <statement name="ELSE">
                                                                                                <block type="update" id="Xm7@K;6NKB@3Cp##D5;h">
                                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                  <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                                                  <value name="VALUE">
                                                                                                    <block type="math_number" id="SqR.*8V`hJIugw[Ry?+O">
                                                                                                      <field name="NUM">0</field>
                                                                                                    </block>
                                                                                                  </value>
                                                                                                </block>
                                                                                              </statement>
                                                                                            </block>
                                                                                          </statement>
                                                                                          <next>
                                                                                            <block type="comment" id="K6+js$fu%A[`-=y!bKU4">
                                                                                              <field name="COMMENT">Batterie Netzbezug / Einspeisung</field>
                                                                                              <next>
                                                                                                <block type="on" id="Odpmlsk?AOC(xp@rs,-,">
                                                                                                  <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                                  <field name="CONDITION">any</field>
                                                                                                  <field name="ACK_CONDITION"></field>
                                                                                                  <statement name="STATEMENT">
                                                                                                    <block type="update" id="%{Kfj,`XYX|AJV(m5}@=">
                                                                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                      <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Netz_gesamt</field>
                                                                                                      <field name="WITH_DELAY">FALSE</field>
                                                                                                      <value name="VALUE">
                                                                                                        <block type="logic_multi_or" id="D*oB1RnVhQ{(L)~iarPr">
                                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                          <value name="OR0">
                                                                                                            <block type="get_value" id="E6aezjYKj2#^|Z*+S|]j">
                                                                                                              <field name="ATTR">val</field>
                                                                                                              <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                          <value name="OR1">
                                                                                                            <block type="get_value" id=")@FRm9dq5(rIKc6d,V6n">
                                                                                                              <field name="ATTR">val</field>
                                                                                                              <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                                            </block>
                                                                                                          </value>
                                                                                                        </block>
                                                                                                      </value>
                                                                                                    </block>
                                                                                                  </statement>
                                                                                                  <next>
                                                                                                    <block type="comment" id="1rPj2U$Mym_}FRlbfjbj">
                                                                                                      <field name="COMMENT">Batteriekapazität</field>
                                                                                                      <next>
                                                                                                        <block type="on" id="^#q+~or)i4nq{7LEc_[!">
                                                                                                          <field name="OID">0_userdata.0.enphase.livedata.meters.soc</field>
                                                                                                          <field name="CONDITION">any</field>
                                                                                                          <field name="ACK_CONDITION"></field>
                                                                                                          <statement name="STATEMENT">
                                                                                                            <block type="update" id="/PV#v$$.`*2*H1L#C?Pb">
                                                                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                              <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batteriekapazität</field>
                                                                                                              <field name="WITH_DELAY">FALSE</field>
                                                                                                              <value name="VALUE">
                                                                                                                <block type="on_source" id="goZCXBnXJKbY.Rz{AdtQ">
                                                                                                                  <field name="ATTR">state.val</field>
                                                                                                                </block>
                                                                                                              </value>
                                                                                                            </block>
                                                                                                          </statement>
                                                                                                        </block>
                                                                                                      </next>
                                                                                                    </block>
                                                                                                  </next>
                                                                                                </block>
                                                                                              </next>
                                                                                            </block>
                                                                                          </next>
                                                                                        </block>
                                                                                      </next>
                                                                                    </block>
                                                                                  </next>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </xml>
                          

                          ...............................................................

                          @syntetic

                          hast Du das hier alles gemacht???

                          1. Skript 1 Datenbafrage
                          2. Skript 2 sc-stream für die Aktualisierung
                          3. Datenpunkte importieren
                          4. Skript 3 Daten durch 1000 (Ausgabe in Watt)
                          S Offline
                          S Offline
                          syntetic
                          wrote on last edited by
                          #192

                          @steffe-s Nein, ich hab das Skript aus dem 1. Post genommen. Ich versuch es mal mit deinen und melde mich wieder.

                          1 Reply Last reply
                          1
                          • Steffe.S.S Steffe.S.

                            @steffe-s sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                            BITTE MACHT VORHER EIN BACKUP VOM AKTUELLEN IOBROKERSYSTEM, BEVOR IHR DAS SKRIPT TESTET!!!

                            Hier die 4 Skripte:

                            .1. Skript

                            Abholen aller Daten einmal pro Minute ( erweitert um Punkt 6 und Punkt 7). Unter 1 Minute gibt es Fehler.

                            *edit 19.09.2024: Aktualisierung unter 1 Minute gelöst...

                            *edit 10.04.2024:

                            wenn man sich auf LiveDaten und Microwechselrichterdaten beschränkt geht auch eine Aktualisierungszeit von 15 Sekunden. Einfach die Zeit im Trigger auf 15 sec stellen.*

                            LiveDaten.JPG

                            Enphase_Envoy_Datenabfrage.txt

                            Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                            ....................................................................
                            2.Skript

                            Das envoy bleibt mit den LiveDaten max 15 Minuten online, diese Skript aktualisiert sich alle 10 Minunten und hält das envoy im Onlinemodus.

                            sc_stream enable.JPG

                            sc-stream.txt

                            Hier im Blockly den username / password / envoy_serialnummer / envoy_ip eintragen.
                            ...................................................................
                            2.2. Datenpunkte erstellen

                            Ich habe diese Ordner und Datenpunkte vorher händisch erstellt.

                            --------------------------------------------

                            Edit 30.05.2024: oder über importieren hinzufügen

                            Datenpunkte aus Json importieren:

                            Unbenannt.JPG

                            0_userdata.0.Enphase-Werte_durch_1000.json

                            0_userdata.0.Enphase-Batteriestatus.json

                            ------------------------------------------

                            1000.JPG

                            Bei diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                            1714082850972-einspeisung-durch-1000-minimum-0w.jpg

                            Auch diesen Datenpunkt erstellen und hier wieder diesem Datenpunkt den Wert "Min" auf 0 Stellen:

                            Netzbezug ohne Einspeisung.JPG
                            ...................................................................
                            3. Skript

                            Die LiveDaten werden in MilliWatt ausgegeben. Dieses Skript rechnet die Daten im Watt um.

                            Enphase durch 1000 inkl. Netzbezug ohne Einspeisung.JPG

                            aktualisiert am 19.05.2024

                            DAS SKRIPT FUNKTIONIERT NUR MIT DEN DATENPUNKTEN AUS "PUNKT 2.2 DATENPUNKTE ERSTELLEN"!!!

                            <xml xmlns="https://developers.google.com/blockly/xml">
                              <block type="comment" id="b34XJZy@p3[tYg9~i77(" x="-438" y="-687">
                                <field name="COMMENT">Netzbezug / Netzeinspeisung</field>
                                <next>
                                  <block type="on" id="R=TcB:Y;oW+@!R21r;.c">
                                    <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                    <field name="CONDITION">ne</field>
                                    <field name="ACK_CONDITION"></field>
                                    <statement name="STATEMENT">
                                      <block type="update" id=",Smtm*YKzeEoxCw%Y$$}">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_round" id="`:SgM1(S!e7wO$x#rdA7">
                                            <field name="OP">ROUNDUP</field>
                                            <value name="NUM">
                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                <field name="NUM">3.1</field>
                                              </shadow>
                                              <block type="math_arithmetic" id="fGHNrBIh0Rb4C1Y1a[rY">
                                                <field name="OP">DIVIDE</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="on_source" id=",b5/]n=AWf?^Ow=8yf^?">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_number" id="QP84}[6.N0:{p**V+VhE">
                                                    <field name="NUM">1000</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="update" id=":Am_Gm[7mE|w]#]*i_(*">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Netzbezug_ohne_Einspeisung</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_round" id="1WQ]FtxW*Rr[{i/vpEr~">
                                                <field name="OP">ROUNDUP</field>
                                                <value name="NUM">
                                                  <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                    <field name="NUM">3.1</field>
                                                  </shadow>
                                                  <block type="math_arithmetic" id="V6]7*W;hmF]Fh=H]ov$D">
                                                    <field name="OP">DIVIDE</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="%dB3b}^r!H:LX7[0PytL">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="on_source" id="iVlAXB/ie7[Z+4P$#g(A">
                                                        <field name="ATTR">state.val</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="3O3;3qa}(|{)h0Z+?8B?">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="math_number" id="F^B_8!nAS[2AWfxJ}[t7">
                                                        <field name="NUM">1000</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="comment" id="(oz0QsPxo%1,Hcawpks.">
                                        <field name="COMMENT">Netzeinspeisung negiert</field>
                                        <next>
                                          <block type="on" id="o!/9@gfrBge5q!FXL_aq">
                                            <field name="OID">0_userdata.0.enphase.livedata.meters.grid.agg_p_mw</field>
                                            <field name="CONDITION">any</field>
                                            <field name="ACK_CONDITION"></field>
                                            <statement name="STATEMENT">
                                              <block type="controls_if" id="R!lRI5?P:IpDL/YpJ6mc">
                                                <mutation else="1"></mutation>
                                                <value name="IF0">
                                                  <block type="logic_compare" id="92KNC^=Hu_c4o!15yeJ*">
                                                    <field name="OP">GT</field>
                                                    <value name="A">
                                                      <block type="get_value" id="H*HRgODY9:4F_H2?s]2*">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="math_number" id="A**xn9B,cbBzS6eq1Xa0">
                                                        <field name="NUM">0</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="update" id="/]@j_??kR~lK`?GljvLk">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_arithmetic" id=",wij]CcH[K|9{zF.($Ne">
                                                        <field name="OP">MULTIPLY</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="get_value" id="R92$P`uocO;{95ac+S^E">
                                                            <field name="ATTR">val</field>
                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="math_number" id="@K{D^A]w8mzwrK*~dh7|">
                                                            <field name="NUM">-1</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <statement name="ELSE">
                                                  <block type="update" id="{^EgD^wDw$p*s%uAVi+B">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Einspeisung</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="-0gPy-bv:cv@giTA}fr:">
                                                        <field name="NUM">0</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                              </block>
                                            </statement>
                                            <next>
                                              <block type="comment" id="z.XJ|8h6gD-i^Dk255KS">
                                                <field name="COMMENT">Hausverbrauch</field>
                                                <next>
                                                  <block type="on" id="F4|LHxJ-9e3}FbqgM*%0">
                                                    <field name="OID">0_userdata.0.enphase.livedata.meters.load.agg_p_mw</field>
                                                    <field name="CONDITION">any</field>
                                                    <field name="ACK_CONDITION"></field>
                                                    <statement name="STATEMENT">
                                                      <block type="update" id="sX/%.U3(d@0FH;[c-7Z$">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Hausverbrauch</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_round" id=":i2J#BlN1uy4Jye~K!IR">
                                                            <field name="OP">ROUNDUP</field>
                                                            <value name="NUM">
                                                              <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                <field name="NUM">3.1</field>
                                                              </shadow>
                                                              <block type="math_arithmetic" id="*e~+quHSP.z$azvq~}F0">
                                                                <field name="OP">DIVIDE</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="M`Yh{e~{r5:_-:9P^:JW">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="on_source" id="phJx!7L#U!a.]5=76AZf">
                                                                    <field name="ATTR">state.val</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="MQBq|1jXHJ#%,1..gxvY">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="math_number" id="3:i,RAn2:9TkS3H_=-J#">
                                                                    <field name="NUM">1000</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </statement>
                                                    <next>
                                                      <block type="comment" id="`*;dUWj=!LDNpbkLc))M">
                                                        <field name="COMMENT">PV Erzeugnung</field>
                                                        <next>
                                                          <block type="on" id="iT)3o|gf6HB.%eCN$@zP">
                                                            <field name="OID">0_userdata.0.enphase.livedata.meters.pv.agg_p_mw</field>
                                                            <field name="CONDITION">any</field>
                                                            <field name="ACK_CONDITION"></field>
                                                            <statement name="STATEMENT">
                                                              <block type="controls_if" id="l^zE[P~R)a!2t|:jiM(|">
                                                                <mutation else="1"></mutation>
                                                                <value name="IF0">
                                                                  <block type="logic_compare" id="nh3/v4+,91w5I[3IadS$">
                                                                    <field name="OP">GT</field>
                                                                    <value name="A">
                                                                      <block type="on_source" id="8T=N6GJN8KUjykUuNW?P">
                                                                        <field name="ATTR">state.val</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="math_number" id="x)}j2:d+Is%sN@z_6g,~">
                                                                        <field name="NUM">0</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO0">
                                                                  <block type="update" id="$5xwgaIa3ULu9MP@`DUx">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_round" id="{:U/C2)dpiqCyXsRX%2}">
                                                                        <field name="OP">ROUNDUP</field>
                                                                        <value name="NUM">
                                                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                            <field name="NUM">3.1</field>
                                                                          </shadow>
                                                                          <block type="math_arithmetic" id="KdjcX,q(-3l`vCx2(o~l">
                                                                            <field name="OP">DIVIDE</field>
                                                                            <value name="A">
                                                                              <shadow type="math_number" id="Z;YmcS)C![ri*hWck9-#">
                                                                                <field name="NUM">1</field>
                                                                              </shadow>
                                                                              <block type="on_source" id="ydT%+`wmTw+}+t/sF=C~">
                                                                                <field name="ATTR">state.val</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <shadow type="math_number" id="BGWnp9qn*ZZM4o|#M[tX">
                                                                                <field name="NUM">1</field>
                                                                              </shadow>
                                                                              <block type="math_number" id="LrV1n3ml@ZTfS0C$j9@b">
                                                                                <field name="NUM">1000</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </statement>
                                                                <statement name="ELSE">
                                                                  <block type="update" id="w_ky5IC/WO/2W,dnzB5A">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_number" id="m;ZDZySI%b2~}UZEDIso">
                                                                        <field name="NUM">0</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </statement>
                                                              </block>
                                                            </statement>
                                                            <next>
                                                              <block type="comment" id="4]s2;oO[A.DKS^feZs*l">
                                                                <field name="COMMENT">Batterieladung über PV</field>
                                                                <next>
                                                                  <block type="on" id="}*xtxiY-j7g,_jBEDV?^">
                                                                    <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                    <field name="CONDITION">any</field>
                                                                    <field name="ACK_CONDITION"></field>
                                                                    <statement name="STATEMENT">
                                                                      <block type="controls_if" id="Z+Le9t!]wro?Aiyjq9yT">
                                                                        <mutation else="1"></mutation>
                                                                        <value name="IF0">
                                                                          <block type="logic_compare" id="ye0=tBqFC3,,.^@ywMv3">
                                                                            <field name="OP">GT</field>
                                                                            <value name="A">
                                                                              <block type="get_value" id="U#-I`pnZzIDQ/1JJ|4I{">
                                                                                <field name="ATTR">val</field>
                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <block type="math_number" id="b;}lR*{qn8YNnYK5(,$m">
                                                                                <field name="NUM">0</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <statement name="DO0">
                                                                          <block type="update" id="moZ7/vz`Ex*wXp+S%OxU">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                            <value name="VALUE">
                                                                              <block type="math_round" id="/eg]`f){,*d1F*!nHB7k">
                                                                                <field name="OP">ROUNDUP</field>
                                                                                <value name="NUM">
                                                                                  <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                    <field name="NUM">3.1</field>
                                                                                  </shadow>
                                                                                  <block type="math_arithmetic" id="6t5]{-=r?*[|^C_yl8U]">
                                                                                    <field name="OP">DIVIDE</field>
                                                                                    <value name="A">
                                                                                      <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="on_source" id="r/fj8*GRX+DEAB?kB.I*">
                                                                                        <field name="ATTR">state.val</field>
                                                                                      </block>
                                                                                    </value>
                                                                                    <value name="B">
                                                                                      <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                        <field name="NUM">1</field>
                                                                                      </shadow>
                                                                                      <block type="math_number" id="-.qb;4Y|6v05uZ$5@o$0">
                                                                                        <field name="NUM">1000</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </statement>
                                                                        <statement name="ELSE">
                                                                          <block type="update" id="Wczg}72@veb-mhG7s*!b">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_PV</field>
                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                            <value name="VALUE">
                                                                              <block type="math_number" id="l),T@!ne5;zU)D:=@gxm">
                                                                                <field name="NUM">0</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </statement>
                                                                      </block>
                                                                    </statement>
                                                                    <next>
                                                                      <block type="comment" id="Ci}(~uQL=y.a5k~;ZJRC">
                                                                        <field name="COMMENT">Batterie Eigenverbrauch</field>
                                                                        <next>
                                                                          <block type="on" id=".ftf(ks:n?jlQW7{QbfI">
                                                                            <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                            <field name="CONDITION">any</field>
                                                                            <field name="ACK_CONDITION"></field>
                                                                            <statement name="STATEMENT">
                                                                              <block type="update" id="1Ek@Ld0k%0Mz#x#9LC({">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                <value name="VALUE">
                                                                                  <block type="math_round" id="eeH:@M.MP@((T[C^O{qP">
                                                                                    <field name="OP">ROUNDUP</field>
                                                                                    <value name="NUM">
                                                                                      <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                        <field name="NUM">3.1</field>
                                                                                      </shadow>
                                                                                      <block type="math_arithmetic" id="DrW_.;3ED~7qV?5zl#Sr">
                                                                                        <field name="OP">DIVIDE</field>
                                                                                        <value name="A">
                                                                                          <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="on_source" id="BL1JGJ:+%L=I;4NL?zsV">
                                                                                            <field name="ATTR">state.val</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="B">
                                                                                          <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                          <block type="math_number" id="..lWof[ekOiU~KQ$b@_z">
                                                                                            <field name="NUM">1000</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="update" id="R0.]Ji-I)USF_IdoA+AM">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_nur_Entladung</field>
                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="math_round" id="K[hTID9Zd?9b~HXXU2c)">
                                                                                        <field name="OP">ROUNDUP</field>
                                                                                        <value name="NUM">
                                                                                          <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                            <field name="NUM">3.1</field>
                                                                                          </shadow>
                                                                                          <block type="math_arithmetic" id="i)mZ;NsE4%KMcWNRe-qA">
                                                                                            <field name="OP">DIVIDE</field>
                                                                                            <value name="A">
                                                                                              <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                                <field name="NUM">1</field>
                                                                                              </shadow>
                                                                                              <block type="on_source" id="rog!@vu:BUw@Vg][g_s-">
                                                                                                <field name="ATTR">state.val</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="B">
                                                                                              <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                                <field name="NUM">1</field>
                                                                                              </shadow>
                                                                                              <block type="math_number" id="=B6I[z+GTuc%s9HjeCp.">
                                                                                                <field name="NUM">1000</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </statement>
                                                                            <next>
                                                                              <block type="comment" id="vRvyUxzeAknF8-y?1y0B">
                                                                                <field name="COMMENT">Batterieladung über Netz</field>
                                                                                <next>
                                                                                  <block type="on" id="=*hn}Nh%cbF,,8MeTD]^">
                                                                                    <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                    <field name="CONDITION">any</field>
                                                                                    <field name="ACK_CONDITION"></field>
                                                                                    <statement name="STATEMENT">
                                                                                      <block type="controls_if" id="EH:,]-n4sq!W5GWX,m|m">
                                                                                        <mutation else="1"></mutation>
                                                                                        <value name="IF0">
                                                                                          <block type="logic_multi_and" id="lW?R`+GrZ@=NB^1N/Cen">
                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                            <value name="AND0">
                                                                                              <block type="logic_compare" id="=Lvy-Uh?XG6D@v1[fH7J">
                                                                                                <field name="OP">LT</field>
                                                                                                <value name="A">
                                                                                                  <block type="get_value" id="w+;2Z=7!oi:C[|b+pAO!">
                                                                                                    <field name="ATTR">val</field>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="B">
                                                                                                  <block type="math_number" id="hvg[h3Ahp62?asD)A62y">
                                                                                                    <field name="NUM">1</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="AND1">
                                                                                              <block type="logic_compare" id="BRtu[S[p!ssG=2nXo8c)">
                                                                                                <field name="OP">LT</field>
                                                                                                <value name="A">
                                                                                                  <block type="get_value" id="`l13.Y11VCD%BgA^a${y">
                                                                                                    <field name="ATTR">val</field>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Eigenverbrauch</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="B">
                                                                                                  <block type="math_number" id="T#B_8-Whfw2/@Pax@HSO">
                                                                                                    <field name="NUM">0</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                        <statement name="DO0">
                                                                                          <block type="update" id="E}[(Oer7{z~U99E]}Yg8">
                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                            <value name="VALUE">
                                                                                              <block type="math_round" id="MuU[;fK/1Y9aLyNVtU75">
                                                                                                <field name="OP">ROUNDUP</field>
                                                                                                <value name="NUM">
                                                                                                  <shadow type="math_number" id="XpeV6CfDLHT^!F~E[=!7">
                                                                                                    <field name="NUM">3.1</field>
                                                                                                  </shadow>
                                                                                                  <block type="math_arithmetic" id="f`t{sxRGwz0].eAhs^Lp">
                                                                                                    <field name="OP">DIVIDE</field>
                                                                                                    <value name="A">
                                                                                                      <shadow type="math_number" id="zz2:K;m)qi6{]K#~fG2M">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="on_source" id="8SG6UKL:;PK9pJmzo!#+">
                                                                                                        <field name="ATTR">state.val</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="B">
                                                                                                      <shadow type="math_number" id="*FZQBwEx0/OxA1k=g+eS">
                                                                                                        <field name="NUM">1</field>
                                                                                                      </shadow>
                                                                                                      <block type="math_number" id="08aprkxhJ(S+Epf:((;j">
                                                                                                        <field name="NUM">1000</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </statement>
                                                                                        <statement name="ELSE">
                                                                                          <block type="update" id="GC}I02Vvv]W2Qwz(Q1Q4">
                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                            <value name="VALUE">
                                                                                              <block type="math_number" id="5,,H-17)2^Z0MDN^r=6-">
                                                                                                <field name="NUM">0</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </statement>
                                                                                      </block>
                                                                                    </statement>
                                                                                    <next>
                                                                                      <block type="comment" id=")+j/rdrw_?8@eq8v9ZCJ">
                                                                                        <field name="COMMENT">Batterie Netzeinspeisung</field>
                                                                                        <next>
                                                                                          <block type="on" id="@^J}E`J,eF[p88x3@)R~">
                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Energienetz</field>
                                                                                            <field name="CONDITION">any</field>
                                                                                            <field name="ACK_CONDITION"></field>
                                                                                            <statement name="STATEMENT">
                                                                                              <block type="controls_if" id="V|c1tWUOT+8:QuZ`!,H)">
                                                                                                <mutation else="1"></mutation>
                                                                                                <value name="IF0">
                                                                                                  <block type="logic_multi_and" id="=KcG/8jovF.B~aDV%-f^">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                    <value name="AND0">
                                                                                                      <block type="logic_compare" id="2zioA7V=.):tLA{d)@7q">
                                                                                                        <field name="OP">LT</field>
                                                                                                        <value name="A">
                                                                                                          <block type="get_value" id="{@Dh.,9$-ffuh-7*/WX:">
                                                                                                            <field name="ATTR">val</field>
                                                                                                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="B">
                                                                                                          <block type="math_number" id="q%}PR8,Zz/J*--zC0B78">
                                                                                                            <field name="NUM">1</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="AND1">
                                                                                                      <block type="logic_compare" id="tZWZgq#FLQRb]]3+EF0U">
                                                                                                        <field name="OP">LT</field>
                                                                                                        <value name="A">
                                                                                                          <block type="on_source" id=";!|_5s7C[dW2G9YK=p|:">
                                                                                                            <field name="ATTR">state.val</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="B">
                                                                                                          <block type="math_number" id="~eL=-y4L+Zu/+qNUr#no">
                                                                                                            <field name="NUM">0</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <statement name="DO0">
                                                                                                  <block type="update" id="haTT(QWr_$U!5x^QJi[,">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="math_arithmetic" id="5b/^SFE,,N~i#R`?hRms">
                                                                                                        <field name="OP">MULTIPLY</field>
                                                                                                        <value name="A">
                                                                                                          <shadow type="math_number" id="t|.]8o6qOD#zZXUS{tmn">
                                                                                                            <field name="NUM">1</field>
                                                                                                          </shadow>
                                                                                                          <block type="on_source" id="4!IyP4Ha`A#jlkbA5lBZ">
                                                                                                            <field name="ATTR">state.val</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="B">
                                                                                                          <shadow type="math_number" id="iwr9hg2mr@d9YW-Gz_TZ">
                                                                                                            <field name="NUM">1</field>
                                                                                                          </shadow>
                                                                                                          <block type="math_number" id="/y44l`eJ3ReZcj;kPXZ?">
                                                                                                            <field name="NUM">-1</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </statement>
                                                                                                <statement name="ELSE">
                                                                                                  <block type="update" id="Xm7@K;6NKB@3Cp##D5;h">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="math_number" id="SqR.*8V`hJIugw[Ry?+O">
                                                                                                        <field name="NUM">0</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </statement>
                                                                                              </block>
                                                                                            </statement>
                                                                                            <next>
                                                                                              <block type="comment" id="K6+js$fu%A[`-=y!bKU4">
                                                                                                <field name="COMMENT">Batterie Netzbezug / Einspeisung</field>
                                                                                                <next>
                                                                                                  <block type="on" id="Odpmlsk?AOC(xp@rs,-,">
                                                                                                    <field name="OID">0_userdata.0.enphase.livedata.meters.storage.agg_p_mw</field>
                                                                                                    <field name="CONDITION">any</field>
                                                                                                    <field name="ACK_CONDITION"></field>
                                                                                                    <statement name="STATEMENT">
                                                                                                      <block type="update" id="%{Kfj,`XYX|AJV(m5}@=">
                                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                        <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Netz_gesamt</field>
                                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                                        <value name="VALUE">
                                                                                                          <block type="logic_multi_or" id="D*oB1RnVhQ{(L)~iarPr">
                                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                                                                                                            <value name="OR0">
                                                                                                              <block type="get_value" id="E6aezjYKj2#^|Z*+S|]j">
                                                                                                                <field name="ATTR">val</field>
                                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterie_Einspeisung</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                            <value name="OR1">
                                                                                                              <block type="get_value" id=")@FRm9dq5(rIKc6d,V6n">
                                                                                                                <field name="ATTR">val</field>
                                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batterieladung_über_Netz</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </statement>
                                                                                                    <next>
                                                                                                      <block type="comment" id="1rPj2U$Mym_}FRlbfjbj">
                                                                                                        <field name="COMMENT">Batteriekapazität</field>
                                                                                                        <next>
                                                                                                          <block type="on" id="^#q+~or)i4nq{7LEc_[!">
                                                                                                            <field name="OID">0_userdata.0.enphase.livedata.meters.soc</field>
                                                                                                            <field name="CONDITION">any</field>
                                                                                                            <field name="ACK_CONDITION"></field>
                                                                                                            <statement name="STATEMENT">
                                                                                                              <block type="update" id="/PV#v$$.`*2*H1L#C?Pb">
                                                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                                <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batteriekapazität</field>
                                                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                                                <value name="VALUE">
                                                                                                                  <block type="on_source" id="goZCXBnXJKbY.Rz{AdtQ">
                                                                                                                    <field name="ATTR">state.val</field>
                                                                                                                  </block>
                                                                                                                </value>
                                                                                                              </block>
                                                                                                            </statement>
                                                                                                          </block>
                                                                                                        </next>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </xml>
                            

                            ...............................................................

                            @syntetic

                            hast Du das hier alles gemacht???

                            1. Skript 1 Datenbafrage
                            2. Skript 2 sc-stream für die Aktualisierung
                            3. Datenpunkte importieren
                            4. Skript 3 Daten durch 1000 (Ausgabe in Watt)
                            S Offline
                            S Offline
                            syntetic
                            wrote on last edited by
                            #193

                            @steffe-s Leider auch wieder Fehler. Keine Ahnung, wo da der Fehler liegt.

                            Bildschirmfoto 2025-06-16 um 09.08.38.png

                            HomoranH 1 Reply Last reply
                            0
                            • S syntetic

                              @steffe-s Leider auch wieder Fehler. Keine Ahnung, wo da der Fehler liegt.

                              Bildschirmfoto 2025-06-16 um 09.08.38.png

                              HomoranH Do not disturb
                              HomoranH Do not disturb
                              Homoran
                              Global Moderator Administrators
                              wrote on last edited by Homoran
                              #194

                              @syntetic Bitte logs nie als Screenshot, immer als Text in code-tags posten.

                              welche js Adapter Version?

                              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                              S 1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                dexic
                                wrote on last edited by dexic
                                #195

                                Ich habe übrigens im Log auf Stufe "warn" folgende Fehlermeldung beim Datensammeln:

                                Used invalid characters: 0_userdata.0.enphase.livedata.dry_contacts.h.dry_contact_status changed to 0_userdata.0.enphase.livedata.dry_contacts.h_.dry_contact_status
                                

                                Wie kann ich das beheben?

                                Ähm - ich habe 8 ähnlichlautende Meldungen.

                                1 Reply Last reply
                                0
                                • Steffe.S.S Steffe.S.

                                  @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                  @Steffe-S.

                                  Hast du eine Idee, wie ich mit dieser Fehlermeldung umgehen soll?

                                  Used invalid characters: 0_userdata.0.enphase.livedata.dry_contacts.h.dry_contact_load_name changed to 0_userdata.0.enphase.livedata.dry_contacts.h_.dry_contact_load_name
                                  

                                  3ac08daf-58db-41a0-9b39-890c923fc39f-grafik.png

                                  mit der Hilfe von @haus-automatisierung konnte die Fehlermeldung beseitigt werden. Hierzu muss das Skript "Enphase_Envoy_Datenabfrage" im Bereich (siehe Bild) bearbeitet werden. Hier auf die 3 Punkte klicken, den gesamten Inhalt herauslöschen und dann das geänderte Skript einfügen.

                                  Screenshot 2024-08-15 225012.png

                                  Skript:

                                  for (const i in obj) {
                                      const value = obj[i];
                                      const attr = i.replace(/[^a-zA-Z0-9._-]+/g, '');
                                   
                                      if (typeof value == 'object') {
                                          IObSetState(id + '.' + attr, value);
                                      } else {
                                          if (existsState(id + '.' + attr)) { // Existing object/ Update
                                              if (typeof value === 'string' || value instanceof String) { // String
                                                  setState(id + '.' + attr, value, true);
                                              } else { // It is a number or date
                                                  if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                     setState(id + '.' + attr, value, true);
                                                     setState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), true);
                                                  } else { // Number
                                                     setState(id + '.' + attr, Number(value), true);
                                                  }
                                              }
                                          } else { // New object / Create
                                              if (typeof value === 'string' || value instanceof String) { // String
                                                  createState(id + '.' + attr, value, false, { type: 'string', read: true, write: true });
                                              } else { // It is a number or date
                                                  if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                     createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true });
                                                     createState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), false, { type: 'string', read: true, write: true }); 
                                                  } else { // Number
                                                     createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true }); // or type: "mixed"?
                                                  }
                                              }
                                          }
                                      }
                                  }
                                  
                                  

                                  nachzulesen hier: https://forum.iobroker.net/topic/76381/gelöst-used-invalid-characters-über-blockly/22?_=1723791171518

                                  Edit 16.06.2025: diese Änderung habe ich in das Skript Enphase_Envoy_Datenabfrage schon hinzugefügt.

                                  Steffe.S.S Offline
                                  Steffe.S.S Offline
                                  Steffe.S.
                                  wrote on last edited by
                                  #196

                                  @steffe-s sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                  @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                  @Steffe-S.

                                  Hast du eine Idee, wie ich mit dieser Fehlermeldung umgehen soll?

                                  Used invalid characters: 0_userdata.0.enphase.livedata.dry_contacts.h.dry_contact_load_name changed to 0_userdata.0.enphase.livedata.dry_contacts.h_.dry_contact_load_name
                                  

                                  3ac08daf-58db-41a0-9b39-890c923fc39f-grafik.png

                                  mit der Hilfe von @haus-automatisierung konnte die Fehlermeldung beseitigt werden. Hierzu muss das Skript "Enphase_Envoy_Datenabfrage" im Bereich (siehe Bild) bearbeitet werden. Hier auf die 3 Punkte klicken, den gesamten Inhalt herauslöschen und dann das geänderte Skript einfügen.

                                  Screenshot 2024-08-15 225012.png

                                  Skript:

                                  for (const i in obj) {
                                      const value = obj[i];
                                      const attr = i.replace(/[^a-zA-Z0-9._-]+/g, '');
                                   
                                      if (typeof value == 'object') {
                                          IObSetState(id + '.' + attr, value);
                                      } else {
                                          if (existsState(id + '.' + attr)) { // Existing object/ Update
                                              if (typeof value === 'string' || value instanceof String) { // String
                                                  setState(id + '.' + attr, value, true);
                                              } else { // It is a number or date
                                                  if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                     setState(id + '.' + attr, value, true);
                                                     setState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), true);
                                                  } else { // Number
                                                     setState(id + '.' + attr, Number(value), true);
                                                  }
                                              }
                                          } else { // New object / Create
                                              if (typeof value === 'string' || value instanceof String) { // String
                                                  createState(id + '.' + attr, value, false, { type: 'string', read: true, write: true });
                                              } else { // It is a number or date
                                                  if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                     createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true });
                                                     createState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), false, { type: 'string', read: true, write: true }); 
                                                  } else { // Number
                                                     createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true }); // or type: "mixed"?
                                                  }
                                              }
                                          }
                                      }
                                  }
                                  
                                  

                                  nachzulesen hier: https://forum.iobroker.net/topic/76381/gelöst-used-invalid-characters-über-blockly/22?_=1723791171518

                                  @dexic

                                  hier war doch die Lösung beschrieben

                                  D 1 Reply Last reply
                                  0
                                  • Steffe.S.S Steffe.S.

                                    @steffe-s sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                    @dexic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                    @Steffe-S.

                                    Hast du eine Idee, wie ich mit dieser Fehlermeldung umgehen soll?

                                    Used invalid characters: 0_userdata.0.enphase.livedata.dry_contacts.h.dry_contact_load_name changed to 0_userdata.0.enphase.livedata.dry_contacts.h_.dry_contact_load_name
                                    

                                    3ac08daf-58db-41a0-9b39-890c923fc39f-grafik.png

                                    mit der Hilfe von @haus-automatisierung konnte die Fehlermeldung beseitigt werden. Hierzu muss das Skript "Enphase_Envoy_Datenabfrage" im Bereich (siehe Bild) bearbeitet werden. Hier auf die 3 Punkte klicken, den gesamten Inhalt herauslöschen und dann das geänderte Skript einfügen.

                                    Screenshot 2024-08-15 225012.png

                                    Skript:

                                    for (const i in obj) {
                                        const value = obj[i];
                                        const attr = i.replace(/[^a-zA-Z0-9._-]+/g, '');
                                     
                                        if (typeof value == 'object') {
                                            IObSetState(id + '.' + attr, value);
                                        } else {
                                            if (existsState(id + '.' + attr)) { // Existing object/ Update
                                                if (typeof value === 'string' || value instanceof String) { // String
                                                    setState(id + '.' + attr, value, true);
                                                } else { // It is a number or date
                                                    if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                       setState(id + '.' + attr, value, true);
                                                       setState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), true);
                                                    } else { // Number
                                                       setState(id + '.' + attr, Number(value), true);
                                                    }
                                                }
                                            } else { // New object / Create
                                                if (typeof value === 'string' || value instanceof String) { // String
                                                    createState(id + '.' + attr, value, false, { type: 'string', read: true, write: true });
                                                } else { // It is a number or date
                                                    if ((new Date(value)).getTime() > 0 && Number(value) > 1685000000 && Number(value) < 4100000000) { // Date
                                                       createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true });
                                                       createState(id + '.' + attr + '_str', formatDate(value, 'TT.MM.JJJJ SS:mm:ss'), false, { type: 'string', read: true, write: true }); 
                                                    } else { // Number
                                                       createState(id + '.' + attr, value, false, { type: 'number', read: true, write: true }); // or type: "mixed"?
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    
                                    

                                    nachzulesen hier: https://forum.iobroker.net/topic/76381/gelöst-used-invalid-characters-über-blockly/22?_=1723791171518

                                    @dexic

                                    hier war doch die Lösung beschrieben

                                    D Offline
                                    D Offline
                                    dexic
                                    wrote on last edited by dexic
                                    #197

                                    @steffe-s Damals war mir das als blutigem Anfänger zu kompliziert und ich habe die Lösung verdrängt. ;-) Ich hab's jetzt implementiert und warte zu, ob es hilft. Ggfs. frage ich noch einmal nach.

                                    EDIT: Es hat geholfen. Danke!

                                    1 Reply Last reply
                                    1
                                    • HomoranH Homoran

                                      @syntetic Bitte logs nie als Screenshot, immer als Text in code-tags posten.

                                      welche js Adapter Version?

                                      S Offline
                                      S Offline
                                      syntetic
                                      wrote on last edited by
                                      #198

                                      @homoran said in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                      @syntetic Bitte logs nie als Screenshot, immer als Text in code-tags posten.

                                      welche js Adapter Version?

                                      Sorry, hier nochmal das log

                                      2025-06-16 13:48:27.758 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                      2025-06-16 13:48:27.759 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                      2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                      2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                      2025-06-16 13:48:27.761 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:8:19)
                                      2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                      2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                      2025-06-16 13:48:27.761 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                      2025-06-16 13:48:27.763 - info: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                      2025-06-16 13:48:27.771 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: TypeError: fetch is not a function
                                      2025-06-16 13:48:27.772 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:19:5)
                                      2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                      2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                      2025-06-16 13:48:27.772 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                      2025-06-16 13:48:35.881 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Script_refresh (Blockly)
                                      2025-06-16 13:48:35.896 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                      2025-06-16 13:48:35.897 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                      2025-06-16 13:48:35.898 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                      2025-06-16 13:48:35.899 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                      2025-06-16 13:48:35.901 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:64:19)
                                      2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                      2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                      2025-06-16 13:48:35.905 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                      2025-06-16 13:48:35.906 - info: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                      2025-06-16 13:48:35.909 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: TypeError: fetch is not a function
                                      2025-06-16 13:48:35.910 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:75:5)
                                      2025-06-16 13:48:35.910 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                      2025-06-16 13:48:35.911 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                      2025-06-16 13:48:35.911 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                      2025-06-16 13:48:38.454 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Werte_durch_1000 (Blockly)
                                      2025-06-16 13:48:38.462 - info: javascript.0 (1512) script.js.Überwachung.PV_Werte_durch_1000: registered 12 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                                      

                                      JS Version 8.8.3

                                      Auch bei den Skripten von @Steffe-S ist der Fehler der gleiche. Ich mach mal Updates und versuchs dann nochmal.

                                      HomoranH Steffe.S.S 2 Replies Last reply
                                      0
                                      • S syntetic

                                        @homoran said in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                        @syntetic Bitte logs nie als Screenshot, immer als Text in code-tags posten.

                                        welche js Adapter Version?

                                        Sorry, hier nochmal das log

                                        2025-06-16 13:48:27.758 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                        2025-06-16 13:48:27.759 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                        2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                        2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                        2025-06-16 13:48:27.761 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:8:19)
                                        2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                        2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                        2025-06-16 13:48:27.761 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                        2025-06-16 13:48:27.763 - info: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                        2025-06-16 13:48:27.771 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: TypeError: fetch is not a function
                                        2025-06-16 13:48:27.772 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:19:5)
                                        2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                        2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                        2025-06-16 13:48:27.772 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                        2025-06-16 13:48:35.881 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Script_refresh (Blockly)
                                        2025-06-16 13:48:35.896 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                        2025-06-16 13:48:35.897 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                        2025-06-16 13:48:35.898 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                        2025-06-16 13:48:35.899 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                        2025-06-16 13:48:35.901 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:64:19)
                                        2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                        2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                        2025-06-16 13:48:35.905 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                        2025-06-16 13:48:35.906 - info: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                        2025-06-16 13:48:35.909 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: TypeError: fetch is not a function
                                        2025-06-16 13:48:35.910 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:75:5)
                                        2025-06-16 13:48:35.910 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                        2025-06-16 13:48:35.911 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                        2025-06-16 13:48:35.911 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                        2025-06-16 13:48:38.454 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Werte_durch_1000 (Blockly)
                                        2025-06-16 13:48:38.462 - info: javascript.0 (1512) script.js.Überwachung.PV_Werte_durch_1000: registered 12 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                                        

                                        JS Version 8.8.3

                                        Auch bei den Skripten von @Steffe-S ist der Fehler der gleiche. Ich mach mal Updates und versuchs dann nochmal.

                                        HomoranH Do not disturb
                                        HomoranH Do not disturb
                                        Homoran
                                        Global Moderator Administrators
                                        wrote on last edited by
                                        #199

                                        @syntetic sagte in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                        Cannot find module '@iobroker-javascript.0/node-fetch'

                                        braucht das Skript dieses Modul?
                                        Wenn ja, hast du das in der Konfiguration der Instanz?

                                        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                                        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                                        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                                        1 Reply Last reply
                                        1
                                        • S syntetic

                                          @homoran said in Enphase / Envoy / IQ-Gateway Solar Blockly Skript:

                                          @syntetic Bitte logs nie als Screenshot, immer als Text in code-tags posten.

                                          welche js Adapter Version?

                                          Sorry, hier nochmal das log

                                          2025-06-16 13:48:27.758 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                          2025-06-16 13:48:27.759 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                          2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                          2025-06-16 13:48:27.760 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                          2025-06-16 13:48:27.761 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:8:19)
                                          2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                          2025-06-16 13:48:27.761 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                          2025-06-16 13:48:27.761 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                          2025-06-16 13:48:27.763 - info: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                          2025-06-16 13:48:27.771 - error: javascript.0 (1512) script.js.Überwachung.PV_Anlage_Datenabfrage: TypeError: fetch is not a function
                                          2025-06-16 13:48:27.772 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Anlage_Datenabfrage:19:5)
                                          2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:195:18
                                          2025-06-16 13:48:27.772 - error: javascript.0 (1512) at script.js.Überwachung.PV_Anlage_Datenabfrage:253:3
                                          2025-06-16 13:48:27.772 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                          2025-06-16 13:48:35.881 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Script_refresh (Blockly)
                                          2025-06-16 13:48:35.896 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Error: Cannot find module '@iobroker-javascript.0/node-fetch'
                                          2025-06-16 13:48:35.897 - error: javascript.0 (1512) at Module.require (node:internal/modules/cjs/loader:1225:19)
                                          2025-06-16 13:48:35.898 - error: javascript.0 (1512) at require (node:internal/modules/helpers:177:18)
                                          2025-06-16 13:48:35.899 - error: javascript.0 (1512) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:552:28)
                                          2025-06-16 13:48:35.901 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:64:19)
                                          2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                          2025-06-16 13:48:35.902 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                          2025-06-16 13:48:35.905 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                          2025-06-16 13:48:35.906 - info: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: Renew token. 1. Login to enlighten.enphaseenergy.com to get session_id...
                                          2025-06-16 13:48:35.909 - error: javascript.0 (1512) script.js.Überwachung.PV_Script_refresh: TypeError: fetch is not a function
                                          2025-06-16 13:48:35.910 - error: javascript.0 (1512) at renew_EnvoyToken (script.js.Überwachung.PV_Script_refresh:75:5)
                                          2025-06-16 13:48:35.910 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:197:18
                                          2025-06-16 13:48:35.911 - error: javascript.0 (1512) at script.js.Überwachung.PV_Script_refresh:231:3
                                          2025-06-16 13:48:35.911 - error: javascript.0 (1512) at Script.runInContext (node:vm:134:12)
                                          2025-06-16 13:48:38.454 - info: javascript.0 (1512) Start JavaScript script.js.Überwachung.PV_Werte_durch_1000 (Blockly)
                                          2025-06-16 13:48:38.462 - info: javascript.0 (1512) script.js.Überwachung.PV_Werte_durch_1000: registered 12 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                                          

                                          JS Version 8.8.3

                                          Auch bei den Skripten von @Steffe-S ist der Fehler der gleiche. Ich mach mal Updates und versuchs dann nochmal.

                                          Steffe.S.S Offline
                                          Steffe.S.S Offline
                                          Steffe.S.
                                          wrote on last edited by
                                          #200

                                          @syntetic

                                          Ich habe von ca 2 Wochen bei einem Bekannten iobroker komplett neu aufgesetzt und dann auch die Skripte eingefügt. Alles hat auf Anhieb funktioniert. Ich vermute auch, dass Dein System nicht up to date ist.

                                          Ich werde aber die Skripte gleich noch einmal auf einem frischen System testen.

                                          HomoranH Steffe.S.S 2 Replies Last reply
                                          2
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          557

                                          Online

                                          32.6k

                                          Users

                                          82.2k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe