Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. Enphase / Envoy / IQ-Gateway Solar Blockly Skript

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Enphase / Envoy / IQ-Gateway Solar Blockly Skript

    This topic has been deleted. Only users with topic management privileges can see it.
    • Steffe.S.
      Steffe.S. @greoj last edited by Steffe.S.

      @greoj , vielen vielen Danke danach habe ich schon lange gesucht

      Ich habe mir noch:

      INVENTORY (/ivp/ensemble/inventory) hinzufügen, da sieht man die Temperatur und den Ladezustand der Batterie

      über LED Status kann man sehen, ob die Batterie Lädt, entlädt oder im Ruhezustand ist.

      12 Akku lädt
      13 Akku entlädt
      14 Akku vollgeladen idle
      16 Ladezustand zwischen 25 und 50% idle
      17 Akku leer 5% idle

      und :

      https://envoy/ivp/livedata/status hinzugefügt. Da kann man alle Daten (Netzbezug / Netzeeinspeisung, Batterieladung /-entladung und Hausverbrauch) einsehen.

      Nach 15min muss mit der App oder Webseite der LiveStatus einmal neugestartet werden, da sonst der Status von "sc_stream": "enabled" auf "sc_stream": "disabled" geht.

      Man muss an https://envoy/ivp/livedata/stream ein "POST, json to pass: {“enable”: 1}" schicken. Das kann man gut mit Postman testen (der Token ist hier auch wichtig)

      Im Enphase Forum (Community nach "/ivp/livedata/" suchen, da steht das auch nochmal beschrieben.
      ...............................

      API ivp/livedata/stream needs to be used in POST, json to pass: {“enable”: 1}

      Field ‘mains_admin_state’ is not a required field

      Response should be,

      {

      "sc_stream": "enabled"

      }

      Gruss Steffen

      M 1 Reply Last reply Reply Quote 0
      • M
        MK70 @Steffe.S. last edited by

        @steffe-s Du hast das Script um die entsprechende Einträge selbst erweitert?
        Wenn ja könntest Du bitte das veränderte Script hier posten?
        Besten Dank

        Steffe.S. 1 Reply Last reply Reply Quote 0
        • Steffe.S.
          Steffe.S. @MK70 last edited by

          @mk70 , mach ich dann.

          Ich schreibe auch gleich noch was dazu. Bis denne...

          1 Reply Last reply Reply Quote 0
          • Steffe.S.
            Steffe.S. last edited by 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

            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>
            

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

            M Steffe.S. 2 Replies Last reply Reply Quote 0
            • M
              MK70 @Steffe.S. last edited by

              @steffe-s Vielen Dank!!
              Wenn die Anlage bei mir läuft werd ich das ganze testen.

              1 Reply Last reply Reply Quote 0
              • Steffe.S.
                Steffe.S. last edited by Steffe.S.

                4.Skript für dynamische Batterieanzeige:

                Batterie.JPG

                <xml xmlns="https://developers.google.com/blockly/xml">
                  <variables>
                    <variable id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</variable>
                  </variables>
                  <block type="schedule" id="Y_|AYVwx0P,g7Kt_N}^Q" x="-1037" y="-463">
                    <field name="SCHEDULE">*/15 * * * * *</field>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="|hD{Em1FP1E47q-HCUHy">
                        <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                        <value name="VALUE">
                          <block type="get_value" id="R2bTm+_wg*+%A4kT{OdY">
                            <field name="ATTR">val</field>
                            <field name="OID">0_userdata.0.Enphase-Werte_durch_1000.Batteriekapazität</field>
                          </block>
                        </value>
                        <next>
                          <block type="comment" id="J6ok*;%;N[bI%`|dS-6A">
                            <field name="COMMENT">6 % - 26 %</field>
                            <next>
                              <block type="controls_if" id="!Ew.cs/*W)t]^e9l6aF0">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_operation" id="Qd6C^/j5^s/CB2QXxh%f" inline="false">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="logic_compare" id="ePre[mRnd.YK,C}YNC;^">
                                        <field name="OP">GTE</field>
                                        <value name="A">
                                          <block type="variables_get" id="XL`;m=ZHi}|U#To$4|CG">
                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="math_number" id="`{=vDt4/pFzX`vXM06}1">
                                            <field name="NUM">6</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_compare" id=")R;Q-K}5GjbHnOWzB-dC">
                                        <field name="OP">LTE</field>
                                        <value name="A">
                                          <block type="variables_get" id="5p[d*(Y^A!:5OdY3t8^*">
                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="math_number" id="]pV/Q@z9XplB%pp|8W7R">
                                            <field name="NUM">26</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="update" id="CuCG1$^b7|%X0J@p)`kj">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.06-26</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_arithmetic" id="$D4#HX.c;H)G?TMevR8N">
                                        <field name="OP">ADD</field>
                                        <value name="A">
                                          <shadow type="math_number" id="Ol5l|=4(ZC=J/Mshm?{F">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="`HQ8yM/r)+.0]+CwJ*E~">
                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="AwUZC]Z}}C!U~~%1{nLm">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="math_number" id="(@+njm1lQx7}$Sq3D3}d">
                                            <field name="NUM">111000</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="update" id="(|l?307^Q^SRnci)I}BL">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.06-26</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_arithmetic" id="7(cqtyXo;SMFYWRicSal">
                                        <field name="OP">MULTIPLY</field>
                                        <value name="A">
                                          <shadow type="math_number" id="1?cQ,98kAv;UG$vr#UKU">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id=",[EiFW79iSjHUkdAkxSK">
                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="9I(c!ews}?+|R/=S^3Vn">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="math_number" id="^p*{kq9us5H69BA!!QPZ">
                                            <field name="NUM">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="nLE]+#3*tUJ3*p[CrQU;">
                                    <field name="COMMENT">27 % - 47 %</field>
                                    <next>
                                      <block type="controls_if" id="M9I}QZSc8v14t.z0,Nf}">
                                        <mutation else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_operation" id="U~.:0CsmrZ3s__9tSuHd" inline="false">
                                            <field name="OP">AND</field>
                                            <value name="A">
                                              <block type="logic_compare" id="Q^k#Yj4xd:+OkxC.Hwi3">
                                                <field name="OP">GTE</field>
                                                <value name="A">
                                                  <block type="variables_get" id="6M~T0ZEiIq4C0b:@hH6^">
                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="h=^l,cE^#$;Z$1?(/zr[">
                                                    <field name="NUM">27</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="^_;J[!AeU@:u#Sr?)^Ru">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="variables_get" id="+j/$#4vTYbuWU,7_?mp{">
                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="fdQM8?eA2I3be[QD$S!i">
                                                    <field name="NUM">47</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="update" id="E,,icY!tW~haO~0OABvB">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Enphase-Batteriestatus.27-47</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_arithmetic" id="nJm5q!xAIN[YDQ!)];{|">
                                                <field name="OP">ADD</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="V4U=K1.94(0N`,me:S~+">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="variables_get" id="|TNP1EC1=j9f4l5ap=oe">
                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="@SU@J9w{CSuwDpg9`e}h">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_number" id="5`ybTQl~KbfkDzpg.QiU">
                                                    <field name="NUM">222000</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="update" id="LQPcbeq[:=O!n5?I^Pmm">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Enphase-Batteriestatus.27-47</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_arithmetic" id="CU*J)!H_DD){cueN$MjH">
                                                <field name="OP">MULTIPLY</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="D%L^s8}ZTL+f*_:rL1b.">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="variables_get" id="{y{D4V|s0#O`Juk:Ar($">
                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="T)Om_*snd+,zHbG{A7]U">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_number" id="NSep3J:)v[p%xjf$Fxti">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="comment" id="Os+I1J/WxOsgbWFwW!`+">
                                            <field name="COMMENT">48 % - 68 %</field>
                                            <next>
                                              <block type="controls_if" id="o=$W}M1^z]GFamH$wwJu">
                                                <mutation else="1"></mutation>
                                                <value name="IF0">
                                                  <block type="logic_operation" id="jL[+:ruO0OG]^/F*hMFp" inline="false">
                                                    <field name="OP">AND</field>
                                                    <value name="A">
                                                      <block type="logic_compare" id=".!2S5!Jg^Q5F2jA)Z5zB">
                                                        <field name="OP">GTE</field>
                                                        <value name="A">
                                                          <block type="variables_get" id="=bK5}D:CbT,VI*1Z%r;Y">
                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="math_number" id="FByTq)_8ABh$.,fS%,P7">
                                                            <field name="NUM">48</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_compare" id="s=[Ua1).}+_zCsm^8(k2">
                                                        <field name="OP">LTE</field>
                                                        <value name="A">
                                                          <block type="variables_get" id="5](2l0+7IC1W~=icHtc[">
                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="math_number" id="n%xg=A]6:wmX|3`o-d?D">
                                                            <field name="NUM">68</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="update" id="Q8`n?GH|n7rwgxryUvn@">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.48-68</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_arithmetic" id="mKR7^D3#zk-wy3IkbUBU">
                                                        <field name="OP">ADD</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id="}^Dt*!xJQVp8T~trhqQM">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="variables_get" id="0c*,g-KjbPS,8%%(s9?X">
                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="a#fIFaUcAdh_X3xi?6RA">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="math_number" id="Q+x1RA2TCbP4||^fDY*B">
                                                            <field name="NUM">333000</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <statement name="ELSE">
                                                  <block type="update" id="Hv9t-vKsT%9I8?rNd//6">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.48-68</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_arithmetic" id="QXU[yi5l3xg^^T3OJ8-s">
                                                        <field name="OP">MULTIPLY</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id="-_U~*e:?HC2`k[d#gP_I">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="variables_get" id="~h*sJNBS{z9lG1B{$k?/">
                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="XH)rg12OOUy.5sy#9oT;">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="math_number" id="(FDkiTLw}Y`)LvII-ZE[">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="comment" id="K}8|};O,b?T|*XWZ}noM">
                                                    <field name="COMMENT">69 % - 89 %</field>
                                                    <next>
                                                      <block type="controls_if" id="VsrT%4b7`1~2bY7gQHbv">
                                                        <mutation else="1"></mutation>
                                                        <value name="IF0">
                                                          <block type="logic_operation" id="T}g501zh|n4*7DJ9czTA" inline="false">
                                                            <field name="OP">AND</field>
                                                            <value name="A">
                                                              <block type="logic_compare" id="/UHO~h#hg|+lqN+pWu*^">
                                                                <field name="OP">GTE</field>
                                                                <value name="A">
                                                                  <block type="variables_get" id=",m`N.o1d.1kO_J6MFx)S">
                                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="Nt,D-(@p!w=g3YEJjd+]">
                                                                    <field name="NUM">69</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <block type="logic_compare" id="!9CV~6Tz1dQh`_7PiZ:a">
                                                                <field name="OP">LTE</field>
                                                                <value name="A">
                                                                  <block type="variables_get" id="Mg*V,VW@%t(j7M%)R%uI">
                                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="@jSFliUH@D|1)Rc3A3Lv">
                                                                    <field name="NUM">89</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <statement name="DO0">
                                                          <block type="update" id=";/1]Dpi0sDC`{dcO=FJX">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">0_userdata.0.Enphase-Batteriestatus.69-89</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_arithmetic" id="Ml]Q~L|+}h0%la/[GOR$">
                                                                <field name="OP">ADD</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id=":`z?,I|]~{DEXu0ZQN#R">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="l1O},[e-wiCRDId3nFuN">
                                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="5+MMY.|`FOtGCF=IvUwq">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="math_number" id="qo`x61Ik?ET9o-I;UPbz">
                                                                    <field name="NUM">444000</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </statement>
                                                        <statement name="ELSE">
                                                          <block type="update" id="s]W)38W`kjfvwn_-j7xk">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">0_userdata.0.Enphase-Batteriestatus.69-89</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_arithmetic" id="`w$6A@O!WeFId,9Zg7@l">
                                                                <field name="OP">MULTIPLY</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="8**ukPTNh4Gko4-d!_l^">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="=5ZMXG`wUk6OtM55Rl[a">
                                                                    <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="2nLPY@Dc=T{nUs_%T@Sl">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="math_number" id="TQ0L3JOPl,veqxrw@|81">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </statement>
                                                        <next>
                                                          <block type="comment" id="~:2yK$zfEYq-QcSyxZ_K">
                                                            <field name="COMMENT">90 % - 100 %</field>
                                                            <next>
                                                              <block type="controls_if" id="dq]h9iq)OjgiyIeCDA%8">
                                                                <mutation else="1"></mutation>
                                                                <value name="IF0">
                                                                  <block type="logic_compare" id="d(me1p~:5GkXfE%@t}LR">
                                                                    <field name="OP">GTE</field>
                                                                    <value name="A">
                                                                      <block type="variables_get" id="[j7qy9D|)o7SBir2iyks">
                                                                        <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="math_number" id="3};WVMT$|YJ?.4{@YrvT">
                                                                        <field name="NUM">90</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO0">
                                                                  <block type="update" id="EF0G~HW)oUP_Np%yTo5j">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.90-100</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_arithmetic" id="_g4|;KV;5oB_/3|JDVM_">
                                                                        <field name="OP">ADD</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="0?dfGlxUQy$Wet4+WOgC">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="$DnSkF,_Z*`rDCsNLM9v">
                                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="p;+PyC4%Kz(0*+t3)2[-">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="math_number" id="%+jz#tp+1n-j50P1z)P5">
                                                                            <field name="NUM">555000</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </statement>
                                                                <statement name="ELSE">
                                                                  <block type="update" id="zb~8hjZA@B=VKLN^WnPl">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Enphase-Batteriestatus.90-100</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_arithmetic" id="(apEP0f5uO9I~$YfFXf%">
                                                                        <field name="OP">MULTIPLY</field>
                                                                        <value name="A">
                                                                          <shadow type="math_number" id="+{MklyanX^$0#!oE.{,x">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="+P)ehW;0`VY]iy;XU25%">
                                                                            <field name="VAR" id="(|+`+Jbg|8:LyX@R9If*">SOC Batterie</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <shadow type="math_number" id="_s).*R,P4#Z#152$+,U5">
                                                                            <field name="NUM">1</field>
                                                                          </shadow>
                                                                          <block type="math_number" id="Dvr{xcrc1hKg~A]efFg1">
                                                                            <field name="NUM">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </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>
                    </statement>
                  </block>
                </xml>
                

                Status BAtterie.JPG

                Der kleine Blitz neben der Batterie wechselt beim Laden und Entladen (recht unten daneben) in "+" und "-". Die Batterie ändert die Ladezustandsanzeige nach 26%, 47%, 68%, 89%.

                .......................................................
                Die Vis Anzeige kann sich dann ja auch jeder selber bauen.


                Als Icons in der VIS habe ich diese Adapter installiert:

                icons.JPG

                PV-Statistik.JPG

                Der kleine grüne Haken im Haus zeigt an, ob sich das envoy im Onlinemodus befindet. Es Verschwindet, wenn sc_stream_disable ist.

                VIS.txt

                Gruss Steffen

                edit 03.09.23: Die Modulanzeigt hängt etwas hinterher (keine Live Daten verfügbar)

                Edit:18.11.2023: VIS.txt wurde hinzugefügt

                VIS.JPG

                VIS.txt

                Hier mal noch meine aktuelles VIS .... (wenn sich der Mond in eine Sonne ändern soll, müsst Ihr definieren wann tag und wann Nacht ist und dies dann dem Bild zuweisen) dazu noch 2 Datenpunkte (Sonne und Mond) anlegen / Skript siehe unten....

                Sonne oder Mond.JPG

                Datenpunkte Sonne und Mond.JPG

                Sonne oder Mond.txt

                OK, das Wetter ist zur Zeit echt mies bei uns

                echart.JPG

                Den Chart habe ich dem echart-adapter gebaut

                Negalein 3 Replies Last reply Reply Quote 1
                • Negalein
                  Negalein Global Moderator @Steffe.S. last edited by

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

                  Hier mal noch meine aktuelles VIS ....

                  Hi Steffe!

                  Würdest du von dieser Seite einen Export bereitstellen?
                  Danke

                  1 Reply Last reply Reply Quote 0
                  • Negalein
                    Negalein Global Moderator @Steffe.S. last edited by

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

                    Hier mal noch meine aktuelles VIS ....

                    Danke dir!!

                    1 Reply Last reply Reply Quote 0
                    • Negalein
                      Negalein Global Moderator last edited by

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

                      Hier die 4 Skripte:

                      bin gerade beim einrichten 🙂

                      sind das alle DP?

                      0_userdata.0.enphase.production
                      0_userdata.0.enphase.meters
                      0_userdata.0.enphase.prod_stat
                      0_userdata.0.enphase.inverter
                      0_userdata.0.enphase.inventory
                      0_userdata.0.enphase.livedata
                      0_userdata.0.Enphase-Werte_durch_1000.Energienetz
                      0_userdata.0.Enphase-Werte_durch_1000.Hausverbrauch
                      0_userdata.0.Enphase-Werte_durch_1000.PV-Erzeugung
                      0_userdata.0.Enphase-Werte_durch_1000.Batterieladung
                      0_userdata.0.enphase.livedata.meters.grid.agg_p_mw
                      0_userdata.0.enphase.livedata.meters.load.agg_p_mw
                      0_userdata.0.enphase.livedata.meters.pv.agg_p_mw
                      0_userdata.0.enphase.livedata.meters.storage.agg_p_mw

                      wird der Token benötigt?

                      und der "http_resp_json"? Wo/wie/was muss ich da in das Feld eintragen?
                      77b3debe-8958-47ef-803e-5e43903762ca-image.png

                      Chriz 1 Reply Last reply Reply Quote 0
                      • Steffe.S.
                        Steffe.S. last edited by Steffe.S.

                        @negalein

                        86b2d9bd-918f-4d15-8f56-669893ee5eff-image.png

                        1ffe6e24-9277-4b15-b4e6-f0e497c03732-image.png

                        hier im Skript 1 und Skript 2 die jeweiligen Daten eintragen,

                        • email- Adresse und Password wie in der Enlighten App
                        • Serialnummer des Envoy gateways
                        • IP - Adresse des Envoy Gateways (am besten festvergeben)

                        der Token wird automatisch gezogen

                        1 Reply Last reply Reply Quote 1
                        • Negalein
                          Negalein Global Moderator @Steffe.S. last edited by

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

                          Edit:18.11.2023: VIS.txt wurde hinzugefügt

                          VIS.JPG

                          kannst du noch die Bildchen hochladen?
                          10ea8a40-0f52-48e6-bae1-76e30fc2edfe-image.png

                          1 Reply Last reply Reply Quote 0
                          • D
                            dexic last edited by

                            Leute, ihr seid der Hammer!

                            Uff, da werde ich sehr viel herumzuprobieren haben. Ich habe hier eine Enphase-Testanlage mit zwei Modulen und will daran eine Encharge 3T hängen, um die Sonnenstrahlen in die Nacht und die Reste an einem sonnigen Tag ins Auto zu schieben. 🙂 Mit eurer Vorarbeit könnte mir das sogar gelingen. 🙂

                            Steffe.S. 1 Reply Last reply Reply Quote 0
                            • Chriz
                              Chriz @Negalein last edited by

                              @negalein

                              Sollten sich die Datenpunkte nicht automatisch erstellen, wenn das Script den ersten Durchlauf macht?

                              Bin nicht so firm bei den Datenpunkten, und hatte gehofft das ich nur das Script importiere, Creds eingebe, starte und es läuft.

                              Zumindest klang das im obigen Post mehr oder weniger so.
                              Nun bin ich ein wenig verunsichert...

                              Steffe.S. 1 Reply Last reply Reply Quote 0
                              • Steffe.S.
                                Steffe.S. @Chriz last edited by

                                @chriz

                                ja, die grundsätzlichen Datenpunkte werden selber erstellt nur der Rest aus meinem Post nicht

                                Chriz 1 Reply Last reply Reply Quote 0
                                • Steffe.S.
                                  Steffe.S. @dexic last edited by

                                  @dexic

                                  ich habe an Enphase eine Anfrage gesendet, ich der ich gefagt habe, ob es einen Web-Postbefehl gibt (ähnlich wie beim Livestaus), der sagt, jetzt Batterieentladung stoppen und dann einen Gegenbefehl Batterieentladung erlauben.

                                  Die Frage wurde an das zuständige Team weitergeleitet

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    s.reihle last edited by Samson71

                                    Hallo,

                                    das Wichtigste zuerst: Die Skripten sind genau das, was ich gesucht habe, also herzlichen Dank dafür.

                                    Eine Frage hätte ich als JS-Ignorant aber dann doch, naämlich zu den folgenden Infos im Log:

                                    javascript.0
                                    	2024-02-27 13:59:00.494	info	script.js.Enphase_komplett: Get Inv. data : : Error local Envoy IP: 172.28.1.99. Error: Unexpected token < in JSON at position 0 | Error cnt: -1
                                    javascript.0
                                    	2024-02-27 13:59:00.425	info	script.js.Enphase_komplett: Get production.json data: : Error local Envoy IP: 172.28.1.99. Error: Unexpected token < in JSON at position 0 | Error cnt: -2
                                    

                                    Sind ja nur Infos, sonst funktioniert ja alles, kann man das aber trotzdem abstellen?

                                    Mod-Edit: Log in Code-Tags

                                    1 Reply Last reply Reply Quote 0
                                    • Chriz
                                      Chriz @Steffe.S. last edited by Chriz

                                      @steffe-s
                                      Hab nun alles mal ausprobiert, die Scripte funktionieren, Danke dafür. 👍 😁

                                      Es wurden allerdings hunderte Datenpunkte erstellt.
                                      Gibt es eine Auflistung was, was ist?
                                      Manches kann ich mir aufgrund der reinkommenden Werte denken, aber anderes widerrum nicht.

                                      Vor Allem die Ordnerstruktur mit Ordner 0 oder 1 unter Meters z.b.
                                      Oder auch die "Lines" unter produktion.

                                      Gibt es eine Erklärung dazu?
                                      Mir reichen die wichtigsten Kennzahlen ja aus.
                                      Wie Erzeugung, Verbrauch, LiveData(da kann ich mir die Daten auch nicht mehr zusammenreimen)
                                      Im Grund die Daten die die enphase App in Zahlen anzeigt.
                                      6fd47fb2-afde-4000-aa20-61ff60ceaf02-image.png

                                      Steffe.S. 1 Reply Last reply Reply Quote 0
                                      • Steffe.S.
                                        Steffe.S. @Chriz last edited by Steffe.S.

                                        @chriz

                                        im zweiten Post gibt es eine PDF Datei, in der einiges beschrieben wird. Du kannst aber auch die Datenpunkte, die Du nicht benötigst einfach im Skript weglassen bzw löschen (ab hier: 1. GET PV ......)

                                        Chriz 1 Reply Last reply Reply Quote 0
                                        • Chriz
                                          Chriz @Steffe.S. last edited by

                                          @steffe-s

                                          Danke, die meisten Infos hab ich mir in der Zwischenzeit zusammenreimen können.

                                          Eine Frage noch zum Schluss, ist aber eher allgemeiner iob-Natur.
                                          Kann ich im Objektbaum irgendwie "Notizen" vergeben ohne den Datenpunkt zu verändern?

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dexic last edited by

                                            Mir würde es jetzt im ersten Schritt mal reichen, wenn ich den jetzigen Stand der Enphase Batterie abrufen könnte. Habt ihr dazu nähere Infos?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            1.1k
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            api enphase envoy iq-gateway pv anlage script solar
                                            14
                                            187
                                            20485
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo