Navigation

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

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    PV Strom Aufteilung

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

      @marco-willi sagte: Läuft dein skript?

      Ich habe es nicht getestet. Sollte aber funktionieren. Habe noch die Alias-Datenpunkte zugewiesen.

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="4!.QWl^o3C^:xOUsncDM">leistungen</variable>
         <variable id="Z/yy2t[:@n/yCnE{;JD2">arr</variable>
         <variable id="/cK}~OC31xnguYr]V1Ug">attr</variable>
         <variable id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</variable>
         <variable id="MEu~m0ap=YGi@;I{l)R*">i</variable>
         <variable id="8IG{1^[y#F?[OcT$kfU^">obj</variable>
         <variable id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</variable>
         <variable id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</variable>
         <variable id="|~:77.d*!:FG7?xwvy=+">leistung</variable>
         <variable id="ZS.uZvVkXP{+B`D%[jGd">id</variable>
       </variables>
       <block type="variables_set" id="XHOw[jb!GnH%uw/EkkSR" x="-1637" y="-1137">
         <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
         <value name="VALUE">
           <block type="lists_create_with" id="w0g@e!P0GRHlcL_JocR3">
             <mutation items="5"></mutation>
             <value name="ADD0">
               <block type="object_new" id="Pz+z.0=fN{G#s2[vn_k$" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml">
                   <attribute id="ATTR_0" name="id"></attribute>
                   <attribute id="ATTR_1" name="power"></attribute>
                 </mutation>
                 <value name="ATTR_0">
                   <shadow type="text" id="/n#q.h{2u%%6]:5x%sdL">
                     <field name="TEXT">idZähler1</field>
                   </shadow>
                   <block type="field_oid" id="8f)e;qM~D5ZszgF6nvGK">
                     <field name="oid">alias.0.SolarWEG.Zaehler01.Leistung</field>
                   </block>
                 </value>
                 <value name="ATTR_1">
                   <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                     <field name="TEXT"></field>
                   </shadow>
                   <block type="math_number" id="ZIhR[uYM@@_$9Dd*Kji#">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </value>
             <value name="ADD1">
               <block type="object_new" id="mI,~-6{f0omisH]1$!aH" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml">
                   <attribute id="ATTR_0" name="id"></attribute>
                   <attribute id="ATTR_1" name="power"></attribute>
                 </mutation>
                 <value name="ATTR_0">
                   <shadow type="text" id="iYqVUWwruFtgC1SX4E,]">
                     <field name="TEXT">idZähler2</field>
                   </shadow>
                   <block type="field_oid" id="SpP3^U3pb}QIyl,0*,+e">
                     <field name="oid">alias.0.SolarWEG.Zaehler02.Leistung</field>
                   </block>
                 </value>
                 <value name="ATTR_1">
                   <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                     <field name="TEXT"></field>
                   </shadow>
                   <block type="math_number" id="?EX-s%XS3b=]taH?;~qS">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </value>
             <value name="ADD2">
               <block type="object_new" id="4sx|V!a=GAi:aHYor=#c" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml">
                   <attribute id="ATTR_0" name="id"></attribute>
                   <attribute id="ATTR_1" name="power"></attribute>
                 </mutation>
                 <value name="ATTR_0">
                   <shadow type="text" id=",C(EXVwXVsw~kn*:;Ew@">
                     <field name="TEXT">idZähler3</field>
                   </shadow>
                   <block type="field_oid" id="P`F3K2c6RP:P2w/Lt8gR">
                     <field name="oid">alias.0.SolarWEG.Zaehler03.Leistung</field>
                   </block>
                 </value>
                 <value name="ATTR_1">
                   <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                     <field name="TEXT"></field>
                   </shadow>
                   <block type="math_number" id="5.Z8gqu6t|d6Nn*B2+W3">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </value>
             <value name="ADD3">
               <block type="object_new" id="fr=y-vg*3~;hHyMzL@Xd" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml">
                   <attribute id="ATTR_0" name="id"></attribute>
                   <attribute id="ATTR_1" name="power"></attribute>
                 </mutation>
                 <value name="ATTR_0">
                   <shadow type="text" id="Tez`^.U4nL3Qr#PFhlNX">
                     <field name="TEXT">idZähler4</field>
                   </shadow>
                   <block type="field_oid" id="+#X!oSy[%]r}IJ|Q}.gb">
                     <field name="oid">alias.0.SolarWEG.Zaehler04.Leistung</field>
                   </block>
                 </value>
                 <value name="ATTR_1">
                   <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                     <field name="TEXT"></field>
                   </shadow>
                   <block type="math_number" id="lh7sliQ,!$R:T+=kd^I=">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </value>
             <value name="ADD4">
               <block type="object_new" id="6v=SH@?A8sCwSrzlg1Ur" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml">
                   <attribute id="ATTR_0" name="id"></attribute>
                   <attribute id="ATTR_1" name="power"></attribute>
                 </mutation>
                 <value name="ATTR_0">
                   <shadow type="text" id="u=0=rm1ozyMf}[9iM2;,">
                     <field name="TEXT">idZähler5</field>
                   </shadow>
                   <block type="field_oid" id="Hs2kCxcsz;#x*Iy`yyaa">
                     <field name="oid">alias.0.SolarWEG.Zaehler05.Leistung</field>
                   </block>
                 </value>
                 <value name="ATTR_1">
                   <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                     <field name="TEXT"></field>
                   </shadow>
                   <block type="math_number" id="YFDPREY!DyIOXg{CS37?">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </value>
           </block>
         </value>
         <next>
           <block type="on" id="~GBxWGx#,niJ$@tGOk.C">
             <field name="OID">0_userdata.0.SolarWEG.ZaehlerPV.Eigenbedarf</field>
             <field name="CONDITION">any</field>
             <field name="ACK_CONDITION"></field>
             <statement name="STATEMENT">
               <block type="variables_set" id="nG;I777OKpG+qk3:*X_]">
                 <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                 <value name="VALUE">
                   <block type="on_source" id="!J[Br_=d_0yA?arw+vL*">
                     <field name="ATTR">state.val</field>
                   </block>
                 </value>
                 <next>
                   <block type="controls_for" id="jz%?P9H/lHwD^J6bh-Lq">
                     <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                     <value name="FROM">
                       <shadow type="math_number" id="p/r%~#^;:kGAh2@vkL+c">
                         <field name="NUM">1</field>
                       </shadow>
                     </value>
                     <value name="TO">
                       <shadow type="math_number" id="e)%X6NXh[(3!v_6NP}S*">
                         <field name="NUM">5</field>
                       </shadow>
                     </value>
                     <value name="BY">
                       <shadow type="math_number" id="q;,9T5So)m`!BLV9L*8?">
                         <field name="NUM">1</field>
                       </shadow>
                     </value>
                     <statement name="DO">
                       <block type="variables_set" id="k?{`ELn=nM{JEdI!fiXb">
                         <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                         <value name="VALUE">
                           <block type="lists_getIndex" id="L5QxUxlJihTlVVIHW;_4">
                             <mutation statement="false" at="true"></mutation>
                             <field name="MODE">GET</field>
                             <field name="WHERE">FROM_START</field>
                             <value name="VALUE">
                               <block type="variables_get" id="LoL.9{E)}57X]?Nq/~RW">
                                 <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                               </block>
                             </value>
                             <value name="AT">
                               <block type="variables_get" id="cfPi2Y^N7wKK~K}1J2od">
                                 <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="object_set_attr" id="i=ahLy029.U05]UGy]l]">
                             <field name="ATTR">power</field>
                             <value name="OBJECT">
                               <block type="variables_get" id="1-1cXoe+]f2s}ui#E]3k">
                                 <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                               </block>
                             </value>
                             <value name="VALUE">
                               <shadow type="text" id="$(l%#9%IrZe(j9J:nS$9">
                                 <field name="TEXT">value</field>
                               </shadow>
                               <block type="get_value_var" id="i^*U/KS(R]IXQWs0WeFm">
                                 <field name="ATTR">val</field>
                                 <value name="OID">
                                   <shadow type="field_oid" id="pA}7xDu_zarp3IH1O8^G">
                                     <field name="oid">Object ID</field>
                                   </shadow>
                                   <block type="get_attr" id="MakZviRK#!y5O$FSUQDj">
                                     <value name="PATH">
                                       <shadow type="text" id="GYLIns737hBM(rTgwbq+">
                                         <field name="TEXT">id</field>
                                       </shadow>
                                     </value>
                                     <value name="OBJECT">
                                       <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                         <field name="OID">Object ID</field>
                                       </shadow>
                                       <block type="variables_get" id="J8[FT1(B2qCK|jVC)jr/">
                                         <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="lists_setIndex" id="2FK;uc+f#R0I,%71V}Rm">
                                 <mutation at="true"></mutation>
                                 <field name="MODE">SET</field>
                                 <field name="WHERE">FROM_START</field>
                                 <value name="LIST">
                                   <block type="variables_get" id="|d#dX!1f9W:a_jS+=9LT">
                                     <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                   </block>
                                 </value>
                                 <value name="AT">
                                   <block type="variables_get" id="%,{F(;olX~.mC-4buL_#">
                                     <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                   </block>
                                 </value>
                                 <value name="TO">
                                   <block type="variables_get" id="pgAS[{dD}[ukC}c{L_gb">
                                     <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                   </block>
                                 </value>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                     <next>
                       <block type="procedures_callcustomnoreturn" id="=;B`Gy;(6,m{q-?G$=8Q" inline="true">
                         <mutation name="sortObjectNum">
                           <arg name="arr"></arg>
                           <arg name="attr"></arg>
                         </mutation>
                         <value name="ARG0">
                           <block type="variables_get" id="3}QIG$EVa~0;!{+JyzGn">
                             <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                           </block>
                         </value>
                         <value name="ARG1">
                           <block type="text" id="tarlJ1Fw+E{_Suhu7=aL">
                             <field name="TEXT">power</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="XX~d^%fLF^+zp9f8%YZX">
                             <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                             <value name="VALUE">
                               <block type="math_number" id="dfF)Kl1Hz4U;POr.tyWR">
                                 <field name="NUM">5</field>
                               </block>
                             </value>
                             <next>
                               <block type="controls_for" id="Z,T{!KsbeCX[m#]m%*j6">
                                 <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                 <value name="FROM">
                                   <shadow type="math_number" id="3Cy.u$.p{1P.QoX5#;16">
                                     <field name="NUM">1</field>
                                   </shadow>
                                 </value>
                                 <value name="TO">
                                   <shadow type="math_number" id="Sf/oUpwKuB;=4PasT;@x">
                                     <field name="NUM">5</field>
                                   </shadow>
                                 </value>
                                 <value name="BY">
                                   <shadow type="math_number" id="ZcjkV2mkj+s-kn~QClH9">
                                     <field name="NUM">1</field>
                                   </shadow>
                                 </value>
                                 <statement name="DO">
                                   <block type="variables_set" id="z^9^*h9Ncs1`kX{}PS4#">
                                     <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                     <value name="VALUE">
                                       <block type="math_round" id="!MB7J]7%bNAf=X;h^QCK">
                                         <field name="OP">ROUND</field>
                                         <value name="NUM">
                                           <shadow type="math_number" id="E_zGQC$Y64TM3ClizW[Y">
                                             <field name="NUM">3.1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="M*HjmCiocLGHz=ilHr2o">
                                             <field name="OP">DIVIDE</field>
                                             <value name="A">
                                               <shadow type="math_number" id="r{CTeOH+-fp_sqwC0EKC">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="/RyBmFXVq)A_70ySFg_}">
                                                 <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="w=e.DF{)iVv`WxUkBq9s">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="1E`Xnfl7s3EgPCfTlwFE">
                                                 <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="k,W.9746]lV?c~40,4Rl">
                                         <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                         <value name="VALUE">
                                           <block type="lists_getIndex" id="l.wv[;!F/J9WPq4THM?^">
                                             <mutation statement="false" at="true"></mutation>
                                             <field name="MODE">GET</field>
                                             <field name="WHERE">FROM_START</field>
                                             <value name="VALUE">
                                               <block type="variables_get" id="eiU/42-|vX4Q8#8_jdb5">
                                                 <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                               </block>
                                             </value>
                                             <value name="AT">
                                               <block type="variables_get" id="b^_u@ZD/Psy}F5Z9GOpZ">
                                                 <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="{!y5o:n9_:=2K+RTk2!`">
                                             <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                             <value name="VALUE">
                                               <block type="get_attr" id="l_[5ihlEj=inX{5l*^o!">
                                                 <value name="PATH">
                                                   <shadow type="text" id="vg#iQ)P.`6$GP(m!ER$e">
                                                     <field name="TEXT">power</field>
                                                   </shadow>
                                                 </value>
                                                 <value name="OBJECT">
                                                   <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                                     <field name="OID">Object ID</field>
                                                   </shadow>
                                                   <block type="variables_get" id="TPdV*Rueb@x70p_XBRTZ">
                                                     <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="controls_if" id="(nDus,^!Ey661rY)dyN0">
                                                 <value name="IF0">
                                                   <block type="logic_compare" id="~#GYM1T$E$jp+PhS)ZRL">
                                                     <field name="OP">GT</field>
                                                     <value name="A">
                                                       <block type="variables_get" id="ZmdhoHu)*.[iabl*-W.S">
                                                         <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <block type="variables_get" id="I=Q0StB]NA/HB{7TsQkO">
                                                         <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="variables_set" id="I1UtP{U8HI#?YfN%VcVz">
                                                     <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                     <value name="VALUE">
                                                       <block type="variables_get" id="L`trdMC{7RZxCvt@(nVy">
                                                         <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </statement>
                                                 <next>
                                                   <block type="variables_set" id="bKDOcaltB*/iMvcHoEU$">
                                                     <field name="VAR" id="ZS.uZvVkXP{+B`D%[jGd">id</field>
                                                     <value name="VALUE">
                                                       <block type="text_replace" id="8_aTm%Ib#,GHT2,Fi[u{">
                                                         <value name="FROM">
                                                           <shadow type="text" id="`1FmYkQgRVTX0gSmw3L/">
                                                             <field name="TEXT">alias.0</field>
                                                           </shadow>
                                                         </value>
                                                         <value name="TO">
                                                           <shadow type="text" id="kWL:nij.yb90O.,~4d`4">
                                                             <field name="TEXT">0_userdata.0</field>
                                                           </shadow>
                                                         </value>
                                                         <value name="TEXT">
                                                           <shadow type="text" id="CFe,-9!u[l|#/TvI~B@y">
                                                             <field name="TEXT">id</field>
                                                           </shadow>
                                                           <block type="get_attr" id="wOaK48e6v,Is-%XL#0EE">
                                                             <value name="PATH">
                                                               <shadow type="text" id="_TN-H-upTjupq8hyx1hX">
                                                                 <field name="TEXT">id</field>
                                                               </shadow>
                                                             </value>
                                                             <value name="OBJECT">
                                                               <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                                                 <field name="OID">Object ID</field>
                                                               </shadow>
                                                               <block type="variables_get" id="sjlB|$?V5P0!Z+`Aj0OT">
                                                                 <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="control_ex" id="Hws.qi!hVm#%OwNI!W1w" inline="true">
                                                         <field name="TYPE">true</field>
                                                         <field name="CLEAR_RUNNING">FALSE</field>
                                                         <value name="OID">
                                                           <shadow type="field_oid" id="B,Z~E~138Rbd68r/zZa8">
                                                             <field name="oid">Object ID</field>
                                                           </shadow>
                                                           <block type="variables_get" id="5MbG/Anwd!JphfxyM|`9">
                                                             <field name="VAR" id="ZS.uZvVkXP{+B`D%[jGd">id</field>
                                                           </block>
                                                         </value>
                                                         <value name="VALUE">
                                                           <shadow type="logic_boolean" id="9w%jp}sct=[1gZW}^)i:">
                                                             <field name="BOOL">TRUE</field>
                                                           </shadow>
                                                           <block type="variables_get" id=":E9@lFe_u{%PbMVch]]P">
                                                             <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                           </block>
                                                         </value>
                                                         <value name="DELAY_MS">
                                                           <shadow type="math_number" id="B@Xu~_M:+UP}XRyn8e-K">
                                                             <field name="NUM">0</field>
                                                           </shadow>
                                                         </value>
                                                         <value name="EXPIRE">
                                                           <shadow type="math_number" id="-*7!Pt_j|1@%D2LLoC`!">
                                                             <field name="NUM">0</field>
                                                           </shadow>
                                                         </value>
                                                         <next>
                                                           <block type="math_change" id="Kl;wUCg]EscMZMPkL6q_">
                                                             <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                                                             <value name="DELTA">
                                                               <shadow type="math_number" id="HVu2@iYtQCXE?$l_R0;u">
                                                                 <field name="NUM">-1</field>
                                                               </shadow>
                                                             </value>
                                                             <next>
                                                               <block type="math_change" id="yjGl@0%,T^b|p8)$R^k#">
                                                                 <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                                                                 <value name="DELTA">
                                                                   <shadow type="math_number" id="C)z-_5P;}E+2nSj?7lA%">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="math_single" id="N=Ygb:T9LY-]]oySV~-w">
                                                                     <field name="OP">NEG</field>
                                                                     <value name="NUM">
                                                                       <shadow type="math_number" id="vRpBXlSDwGMb3h#Ho^?b">
                                                                         <field name="NUM">9</field>
                                                                       </shadow>
                                                                       <block type="variables_get" id="LVM=mCV=RkXAd#tELl,~">
                                                                         <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                                 <next>
                                                                   <block type="debug" id="/FsC=bv8q6#^]wlol./}">
                                                                     <field name="Severity">info</field>
                                                                     <value name="TEXT">
                                                                       <shadow type="text" id="XZ}]x`H__:zD5ZE5ZCy8">
                                                                         <field name="TEXT">test</field>
                                                                       </shadow>
                                                                       <block type="variables_get" id="J^}K8Z(-rGT^P4l9%M0|">
                                                                         <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </next>
       </block>
       <block type="procedures_defcustomnoreturn" id="CxdOO.WCDAjV:Z{(+ME[" x="-1413" y="-912">
         <mutation statements="false">
           <arg name="arr" varid="Z/yy2t[:@n/yCnE{;JD2"></arg>
           <arg name="attr" varid="/cK}~OC31xnguYr]V1Ug"></arg>
         </mutation>
         <field name="NAME">sortObjectNum</field>
         <field name="SCRIPT">ZnVuY3Rpb24gc29ydEF0dHIoYSwgYikgew0KICAgIHJldHVybiBwYXJzZUZsb2F0KGFbYXR0cl0pIC0gcGFyc2VGbG9hdChiW2F0dHJdKTsNCn0NCmFyci5zb3J0KHNvcnRBdHRyKTs=</field>
         <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
       </block>
      </xml>
      

      Blockly_temp.JPG

      EDIT: Habe das Setzen von Restleistung nach oben verschoben (wegen obj).

      Marco Willi 2 Replies Last reply Reply Quote 0
      • Marco Willi
        Marco Willi @paul53 last edited by

        @paul53 falls du noch zeit hast, machste mir ein Export daraus oder soll ich die einzeln importieren? Und du hast jetzt auch den momentanen Wert genommen und nicht ein Zählerstand oder?

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

          @marco-willi sagte: machste mir ein Export daraus oder soll ich die einzeln importieren?

          Unter dem Spoiler ist der Export.

          @marco-willi sagte in PV Strom Aufteilung:

          du hast jetzt auch den momentanen Wert genommen

          Leistungen sind momentane Werte.

          Alles andere solltest du in separaten Skripten machen (je ein Skript pro Zähler).

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

            @paul53 habe das richtig verstanden. Das skript importiere ich, kopiere es 5x und passe die Datenpunkte alias und userdata an. Müsste alles enthalten sein?

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

              @marco-willi sagte: Das skript importiere ich

              Nein. Das exportierte Skript (unter dem Spoiler) enthält nur die Zuweisung der PV-Leistung zu den 5 Zählern und wird genau einmal gebraucht.
              Andere notwendige Berechnungen - wie PV-Verbrauch aus PV-Leistung ermitteln - macht man mit einem Skript pro Zähler, da die Berechnungen gleich sind, aber verschiedene Datenpunkte nutzen.

              Marco Willi paul53 2 Replies Last reply Reply Quote 0
              • Marco Willi
                Marco Willi @paul53 last edited by

                @paul53
                Sorry, werd noch immer nicht ganz schlau. Wenn die PV aufteilung in Watt pro Zähler statt findet, reicht mir das aber völlig.
                Die anderen Daten also die Energie, werden geloggt und mit anderen skripts berechnet. Das liegt bereit.
                Werde das aber erst im Verlauf der Woche oder Wochende testen können.
                Ich denke aber ich kann mich jetzt schon herzlich bei dir bedanken.

                1 Reply Last reply Reply Quote 0
                • H
                  hans_999 @Marco Willi last edited by

                  @marco-willi said in PV Strom Aufteilung:

                  Es wird ein ZEV

                  @marco-willi said in PV Strom Aufteilung:

                  Hierzu muss ich vielleicht noch sagen. Dass ich ein Shelly 3EM dafür benutzen werde und somit 2 Datenpunkte habe für Verbrauch und Rückspeisung.

                  Ich gehe davon aus, dass wir hier über ein Objekt in der Schweiz reden. Wenn ich die bisherigen Infos zu einem ZEV richtig verstanden habe, sind auf jeden Fall die allgemeinen Anforderungen aus der Messgesetzgebung zu beachten.
                  Sind dort ungeeichte/unkalibrierte Zählern wie ein Shelly-3M zulässig, um auf Basis der damit erfassten Daten eine Verbrauchs-Abrechnung zu erstellen?
                  Bei uns in DE wäre das auf jeden Fall ein No-Go.

                  Marco Willi 1 Reply Last reply Reply Quote 0
                  • Marco Willi
                    Marco Willi @hans_999 last edited by

                    @hans_999 hätte mich überrascht, wenn die Frage nicht kommen würde.

                    1. Schweiz ist korrekt

                    2. nein, Shelly sind hier in solch einem Anwendungsfall auch nicht erlaubt. Die können resetet werden. Daher arbeite ich auch mit den momentanen Werten. Falls einer abraucht kann ich ihn schnell ersetzen und es geht kein Zählerstand verloren und wenn dann nicht viel und nur die PV Aufteilung.
                      Im ZEV wird intern abgerechnet und daher müsste ich gar keine Zähler verbauen, dann wäre aber ein Aufteilungsschlüssel nötig, der richtig gut ist, um die Gemeinschaft zu überzeugen. Und um mich zu schützen werde ich geeichte Zähler verbauen und die Shelly nur für die Aufteilung nutzen.
                      Es gäbe auch Zähler die das direkt können. Offeriert wurden uns ein Mehraufwand von 10‘000.-. Das konnte ich nicht auf mir sitzen lassen. Wenn ich es selber gemacht hätte mit den offerierten Zähler komme ich auf über 3000.-. Das Problem, die Zähler müssen nach 10 Jahren geeicht werden und so ein Zähler kostet 3.50.-.Ein dummer geeichter Zähler der nur in eine Richtung mist ohne Hoch und Niedertarif kostet im Moment 42.-. Der kann auch für die Abrechnung genutzt werden und nach 10 Jahren werf ich die Dinger einfach weg, da das eichen auch 250.- kostet. Die Shellys können ja bleiben.
                      Die PV Aufteilung wird vorerst nur für eine Visualisierung genutzt. EVU und PV Strom wird bis zur Amortisation gleich verrechnet.
                      Trotzdem logge ich die Daten mal und das wird dann in der internen Verrechnung auch aufgezeigt.

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

                      @paul53 ok danke für die info, habe die neue version mal runter kopiert. Angedacht ist die alias werte zu nehmen und in die Datenpunkte zu schreiben oder umgekehrt?

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

                        @marco-willi sagte: Angedacht ist die alias werte zu nehmen und in die Datenpunkte zu schreiben oder umgekehrt?

                        Die Original-Zählerwerte (Leistungen) werden über Alias abgebildet.

                        SolarWEG.JPG

                        Die Ergebnisse des Skriptes werden in eigene Datenpunkte unter "0_userdata.0" geschrieben.

                        SolarWEG.JPG

                        Dass die Werte rot sind, liegt am fehlerhaften Block "schreiben" in der Javascript-Version 8.4.x.

                        Marco Willi 1 Reply Last reply Reply Quote 0
                        • Marco Willi
                          Marco Willi @paul53 last edited by Homoran

                          @paul53

                          
                          6.6.2024, 18:36:35.009	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          6.6.2024, 18:36:35.009	[info ]: javascript.0 (3879) script.js.Testskripte.Berechnung_Eigenbedarf_test: 200
                          6.6.2024, 18:36:35.028	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          6.6.2024, 18:36:35.028	[info ]: javascript.0 (3879) script.js.Testskripte.Berechnung_Eigenbedarf_test: 200
                          6.6.2024, 18:36:35.035	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          6.6.2024, 18:36:35.035	[info ]: javascript.0 (3879) script.js.Testskripte.Berechnung_Eigenbedarf_test: 200
                          6.6.2024, 18:36:35.048	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          6.6.2024, 18:36:35.048	[info ]: javascript.0 (3879) script.js.Testskripte.Berechnung_Eigenbedarf_test: 200
                          6.6.2024, 18:36:35.049	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          6.6.2024, 18:36:35.049	[info ]: javascript.0 (3879) script.js.Testskripte.Berechnung_Eigenbedarf_test: 200
                          6.6.2024, 18:36:40.004	[warn ]: javascript.0 (3879)     at Object.<anonymous> (script.js.Testskripte.Berechnung_Eigenbedarf_test:39:5)
                          

                          MOD-EDIT: Code in code-tags gesetzt!

                          Es wird leider nichts in die dafür angelegten Datenpunkte geschrieben, musst ich da was anpassen?

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

                            @marco-willi sagte: musst ich da was anpassen?

                            Zeige bitte die ID-Strukturen unter "alias.0.SolarWEG" und unter "0_userdata.0.SolarWEG".

                            EDIT: Poste bitte auch den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

                            Marco Willi 2 Replies Last reply Reply Quote 0
                            • Marco Willi
                              Marco Willi @paul53 last edited by Homoran

                              @paul53

                              <xml xmlns="https://developers.google.com/blockly/xml">
                                <variables>
                                  <variable id="4!.QWl^o3C^:xOUsncDM">leistungen</variable>
                                  <variable id="VhkAFchoAH~jm8|sY/#g">arr</variable>
                                  <variable id="`y:ZU0#7H|QneBeDn#WR">attr</variable>
                                  <variable id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</variable>
                                  <variable id="MEu~m0ap=YGi@;I{l)R*">i</variable>
                                  <variable id="8IG{1^[y#F?[OcT$kfU^">obj</variable>
                                  <variable id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</variable>
                                  <variable id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</variable>
                                  <variable id="|~:77.d*!:FG7?xwvy=+">leistung</variable>
                                  <variable id="ZS.uZvVkXP{+B`D%[jGd">id</variable>
                                </variables>
                                <block type="variables_set" id="XHOw[jb!GnH%uw/EkkSR" x="-1637" y="-1137">
                                  <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                  <value name="VALUE">
                                    <block type="lists_create_with" id="w0g@e!P0GRHlcL_JocR3">
                                      <mutation items="5"></mutation>
                                      <value name="ADD0">
                                        <block type="object_new" id="Pz+z.0=fN{G#s2[vn_k$" inline="true">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml">
                                            <attribute id="ATTR_0" name="id"></attribute>
                                            <attribute id="ATTR_1" name="power"></attribute>
                                          </mutation>
                                          <value name="ATTR_0">
                                            <shadow type="text" id="/n#q.h{2u%%6]:5x%sdL">
                                              <field name="TEXT">idZähler1</field>
                                            </shadow>
                                            <block type="field_oid" id="8f)e;qM~D5ZszgF6nvGK">
                                              <field name="oid">alias.0.Allgemein.Zähler_1</field>
                                            </block>
                                          </value>
                                          <value name="ATTR_1">
                                            <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                                              <field name="TEXT"></field>
                                            </shadow>
                                            <block type="math_number" id="ZIhR[uYM@@_$9Dd*Kji#">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="ADD1">
                                        <block type="object_new" id="mI,~-6{f0omisH]1$!aH" inline="true">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml">
                                            <attribute id="ATTR_0" name="id"></attribute>
                                            <attribute id="ATTR_1" name="power"></attribute>
                                          </mutation>
                                          <value name="ATTR_0">
                                            <shadow type="text" id="iYqVUWwruFtgC1SX4E,]">
                                              <field name="TEXT">idZähler2</field>
                                            </shadow>
                                            <block type="field_oid" id="SpP3^U3pb}QIyl,0*,+e">
                                              <field name="oid">alias.0.Willi.TotalActivePower</field>
                                            </block>
                                          </value>
                                          <value name="ATTR_1">
                                            <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                                              <field name="TEXT"></field>
                                            </shadow>
                                            <block type="math_number" id="?EX-s%XS3b=]taH?;~qS">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="ADD2">
                                        <block type="object_new" id="4sx|V!a=GAi:aHYor=#c" inline="true">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml">
                                            <attribute id="ATTR_0" name="id"></attribute>
                                            <attribute id="ATTR_1" name="power"></attribute>
                                          </mutation>
                                          <value name="ATTR_0">
                                            <shadow type="text" id=",C(EXVwXVsw~kn*:;Ew@">
                                              <field name="TEXT">idZähler3</field>
                                            </shadow>
                                            <block type="field_oid" id="P`F3K2c6RP:P2w/Lt8gR">
                                              <field name="oid">alias.0.Gubser.Zähler_3</field>
                                            </block>
                                          </value>
                                          <value name="ATTR_1">
                                            <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                                              <field name="TEXT"></field>
                                            </shadow>
                                            <block type="math_number" id="5.Z8gqu6t|d6Nn*B2+W3">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="ADD3">
                                        <block type="object_new" id="fr=y-vg*3~;hHyMzL@Xd" inline="true">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml">
                                            <attribute id="ATTR_0" name="id"></attribute>
                                            <attribute id="ATTR_1" name="power"></attribute>
                                          </mutation>
                                          <value name="ATTR_0">
                                            <shadow type="text" id="Tez`^.U4nL3Qr#PFhlNX">
                                              <field name="TEXT">idZähler4</field>
                                            </shadow>
                                            <block type="field_oid" id="+#X!oSy[%]r}IJ|Q}.gb">
                                              <field name="oid">alias.0.Lang.Zähler_4</field>
                                            </block>
                                          </value>
                                          <value name="ATTR_1">
                                            <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                                              <field name="TEXT"></field>
                                            </shadow>
                                            <block type="math_number" id="lh7sliQ,!$R:T+=kd^I=">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="ADD4">
                                        <block type="object_new" id="6v=SH@?A8sCwSrzlg1Ur" inline="true">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml">
                                            <attribute id="ATTR_0" name="id"></attribute>
                                            <attribute id="ATTR_1" name="power"></attribute>
                                          </mutation>
                                          <value name="ATTR_0">
                                            <shadow type="text" id="u=0=rm1ozyMf}[9iM2;,">
                                              <field name="TEXT">idZähler5</field>
                                            </shadow>
                                            <block type="field_oid" id="Hs2kCxcsz;#x*Iy`yyaa">
                                              <field name="oid">alias.0.Giger.Zähler_5</field>
                                            </block>
                                          </value>
                                          <value name="ATTR_1">
                                            <shadow type="text" id="5!nWL7pP`UDJEF2Iytm+">
                                              <field name="TEXT"></field>
                                            </shadow>
                                            <block type="math_number" id="YFDPREY!DyIOXg{CS37?">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="on" id="~GBxWGx#,niJ$@tGOk.C">
                                      <field name="OID">0_userdata.0.SolarWEG.Eigenbedarf</field>
                                      <field name="CONDITION">any</field>
                                      <field name="ACK_CONDITION"></field>
                                      <statement name="STATEMENT">
                                        <block type="variables_set" id="nG;I777OKpG+qk3:*X_]">
                                          <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                                          <value name="VALUE">
                                            <block type="on_source" id="!J[Br_=d_0yA?arw+vL*">
                                              <field name="ATTR">state.val</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="controls_for" id="jz%?P9H/lHwD^J6bh-Lq">
                                              <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                              <value name="FROM">
                                                <shadow type="math_number" id="p/r%~#^;:kGAh2@vkL+c">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                              </value>
                                              <value name="TO">
                                                <shadow type="math_number" id="e)%X6NXh[(3!v_6NP}S*">
                                                  <field name="NUM">5</field>
                                                </shadow>
                                              </value>
                                              <value name="BY">
                                                <shadow type="math_number" id="q;,9T5So)m`!BLV9L*8?">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                              </value>
                                              <statement name="DO">
                                                <block type="variables_set" id="k?{`ELn=nM{JEdI!fiXb">
                                                  <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                  <value name="VALUE">
                                                    <block type="lists_getIndex" id="L5QxUxlJihTlVVIHW;_4">
                                                      <mutation statement="false" at="true"></mutation>
                                                      <field name="MODE">GET</field>
                                                      <field name="WHERE">FROM_START</field>
                                                      <value name="VALUE">
                                                        <block type="variables_get" id="LoL.9{E)}57X]?Nq/~RW">
                                                          <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                                        </block>
                                                      </value>
                                                      <value name="AT">
                                                        <block type="variables_get" id="cfPi2Y^N7wKK~K}1J2od">
                                                          <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="object_set_attr" id="i=ahLy029.U05]UGy]l]">
                                                      <field name="ATTR">power</field>
                                                      <value name="OBJECT">
                                                        <block type="variables_get" id="1-1cXoe+]f2s}ui#E]3k">
                                                          <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                        </block>
                                                      </value>
                                                      <value name="VALUE">
                                                        <shadow type="text" id="$(l%#9%IrZe(j9J:nS$9">
                                                          <field name="TEXT">value</field>
                                                        </shadow>
                                                        <block type="get_value_var" id="i^*U/KS(R]IXQWs0WeFm">
                                                          <field name="ATTR">val</field>
                                                          <value name="OID">
                                                            <shadow type="field_oid" id="pA}7xDu_zarp3IH1O8^G">
                                                              <field name="oid">Object ID</field>
                                                            </shadow>
                                                            <block type="get_attr" id="MakZviRK#!y5O$FSUQDj">
                                                              <value name="PATH">
                                                                <shadow type="text" id="GYLIns737hBM(rTgwbq+">
                                                                  <field name="TEXT">id</field>
                                                                </shadow>
                                                              </value>
                                                              <value name="OBJECT">
                                                                <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                                                  <field name="OID">Object ID</field>
                                                                </shadow>
                                                                <block type="variables_get" id="J8[FT1(B2qCK|jVC)jr/">
                                                                  <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="lists_setIndex" id="2FK;uc+f#R0I,%71V}Rm">
                                                          <mutation at="true"></mutation>
                                                          <field name="MODE">SET</field>
                                                          <field name="WHERE">FROM_START</field>
                                                          <value name="LIST">
                                                            <block type="variables_get" id="|d#dX!1f9W:a_jS+=9LT">
                                                              <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                                            </block>
                                                          </value>
                                                          <value name="AT">
                                                            <block type="variables_get" id="%,{F(;olX~.mC-4buL_#">
                                                              <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                                            </block>
                                                          </value>
                                                          <value name="TO">
                                                            <block type="variables_get" id="pgAS[{dD}[ukC}c{L_gb">
                                                              <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="procedures_callcustomnoreturn" id="=;B`Gy;(6,m{q-?G$=8Q" inline="true">
                                                  <mutation name="sortObjectNum">
                                                    <arg name="arr"></arg>
                                                    <arg name="attr"></arg>
                                                  </mutation>
                                                  <value name="ARG0">
                                                    <block type="variables_get" id="3}QIG$EVa~0;!{+JyzGn">
                                                      <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                                    </block>
                                                  </value>
                                                  <value name="ARG1">
                                                    <block type="text" id="tarlJ1Fw+E{_Suhu7=aL">
                                                      <field name="TEXT">power</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="variables_set" id="XX~d^%fLF^+zp9f8%YZX">
                                                      <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                                                      <value name="VALUE">
                                                        <block type="math_number" id="dfF)Kl1Hz4U;POr.tyWR">
                                                          <field name="NUM">5</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="controls_for" id="Z,T{!KsbeCX[m#]m%*j6">
                                                          <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                                          <value name="FROM">
                                                            <shadow type="math_number" id="3Cy.u$.p{1P.QoX5#;16">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                          </value>
                                                          <value name="TO">
                                                            <shadow type="math_number" id="Sf/oUpwKuB;=4PasT;@x">
                                                              <field name="NUM">5</field>
                                                            </shadow>
                                                          </value>
                                                          <value name="BY">
                                                            <shadow type="math_number" id="ZcjkV2mkj+s-kn~QClH9">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                          </value>
                                                          <statement name="DO">
                                                            <block type="variables_set" id="z^9^*h9Ncs1`kX{}PS4#">
                                                              <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                                              <value name="VALUE">
                                                                <block type="math_round" id="!MB7J]7%bNAf=X;h^QCK">
                                                                  <field name="OP">ROUND</field>
                                                                  <value name="NUM">
                                                                    <shadow type="math_number" id="E_zGQC$Y64TM3ClizW[Y">
                                                                      <field name="NUM">3.1</field>
                                                                    </shadow>
                                                                    <block type="math_arithmetic" id="M*HjmCiocLGHz=ilHr2o">
                                                                      <field name="OP">DIVIDE</field>
                                                                      <value name="A">
                                                                        <shadow type="math_number" id="r{CTeOH+-fp_sqwC0EKC">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="/RyBmFXVq)A_70ySFg_}">
                                                                          <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <shadow type="math_number" id="w=e.DF{)iVv`WxUkBq9s">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="1E`Xnfl7s3EgPCfTlwFE">
                                                                          <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="variables_set" id="k,W.9746]lV?c~40,4Rl">
                                                                  <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                                  <value name="VALUE">
                                                                    <block type="lists_getIndex" id="l.wv[;!F/J9WPq4THM?^">
                                                                      <mutation statement="false" at="true"></mutation>
                                                                      <field name="MODE">GET</field>
                                                                      <field name="WHERE">FROM_START</field>
                                                                      <value name="VALUE">
                                                                        <block type="variables_get" id="eiU/42-|vX4Q8#8_jdb5">
                                                                          <field name="VAR" id="4!.QWl^o3C^:xOUsncDM">leistungen</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="AT">
                                                                        <block type="variables_get" id="b^_u@ZD/Psy}F5Z9GOpZ">
                                                                          <field name="VAR" id="MEu~m0ap=YGi@;I{l)R*">i</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="variables_set" id="{!y5o:n9_:=2K+RTk2!`">
                                                                      <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                      <value name="VALUE">
                                                                        <block type="get_attr" id="l_[5ihlEj=inX{5l*^o!">
                                                                          <value name="PATH">
                                                                            <shadow type="text" id="vg#iQ)P.`6$GP(m!ER$e">
                                                                              <field name="TEXT">power</field>
                                                                            </shadow>
                                                                          </value>
                                                                          <value name="OBJECT">
                                                                            <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                                                              <field name="OID">Object ID</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="TPdV*Rueb@x70p_XBRTZ">
                                                                              <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="controls_if" id="(nDus,^!Ey661rY)dyN0">
                                                                          <value name="IF0">
                                                                            <block type="logic_compare" id="~#GYM1T$E$jp+PhS)ZRL">
                                                                              <field name="OP">GT</field>
                                                                              <value name="A">
                                                                                <block type="variables_get" id="ZmdhoHu)*.[iabl*-W.S">
                                                                                  <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="B">
                                                                                <block type="variables_get" id="I=Q0StB]NA/HB{7TsQkO">
                                                                                  <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <statement name="DO0">
                                                                            <block type="variables_set" id="I1UtP{U8HI#?YfN%VcVz">
                                                                              <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                              <value name="VALUE">
                                                                                <block type="variables_get" id="L`trdMC{7RZxCvt@(nVy">
                                                                                  <field name="VAR" id="%KbqcvOJ4#JoV?4(u1!T">Restmittel</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </statement>
                                                                          <next>
                                                                            <block type="variables_set" id="bKDOcaltB*/iMvcHoEU$">
                                                                              <field name="VAR" id="ZS.uZvVkXP{+B`D%[jGd">id</field>
                                                                              <value name="VALUE">
                                                                                <block type="text_replace" id="8_aTm%Ib#,GHT2,Fi[u{">
                                                                                  <value name="FROM">
                                                                                    <shadow type="text" id="`1FmYkQgRVTX0gSmw3L/">
                                                                                      <field name="TEXT">alias.0</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <value name="TO">
                                                                                    <shadow type="text" id="kWL:nij.yb90O.,~4d`4">
                                                                                      <field name="TEXT">0_userdata.0</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <value name="TEXT">
                                                                                    <shadow type="text" id="CFe,-9!u[l|#/TvI~B@y">
                                                                                      <field name="TEXT">id</field>
                                                                                    </shadow>
                                                                                    <block type="get_attr" id="wOaK48e6v,Is-%XL#0EE">
                                                                                      <value name="PATH">
                                                                                        <shadow type="text" id="_TN-H-upTjupq8hyx1hX">
                                                                                          <field name="TEXT">id</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                      <value name="OBJECT">
                                                                                        <shadow type="get_object" id="vqVwCRtdz;4;|09)cUoG">
                                                                                          <field name="OID">Object ID</field>
                                                                                        </shadow>
                                                                                        <block type="variables_get" id="sjlB|$?V5P0!Z+`Aj0OT">
                                                                                          <field name="VAR" id="8IG{1^[y#F?[OcT$kfU^">obj</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="control_ex" id="Hws.qi!hVm#%OwNI!W1w" inline="true">
                                                                                  <field name="TYPE">true</field>
                                                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                                                  <value name="OID">
                                                                                    <shadow type="field_oid" id="B,Z~E~138Rbd68r/zZa8">
                                                                                      <field name="oid">Object ID</field>
                                                                                    </shadow>
                                                                                    <block type="variables_get" id="5MbG/Anwd!JphfxyM|`9">
                                                                                      <field name="VAR" id="ZS.uZvVkXP{+B`D%[jGd">id</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="VALUE">
                                                                                    <shadow type="logic_boolean" id="9w%jp}sct=[1gZW}^)i:">
                                                                                      <field name="BOOL">TRUE</field>
                                                                                    </shadow>
                                                                                    <block type="variables_get" id=":E9@lFe_u{%PbMVch]]P">
                                                                                      <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="DELAY_MS">
                                                                                    <shadow type="math_number" id="B@Xu~_M:+UP}XRyn8e-K">
                                                                                      <field name="NUM">0</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                  <next>
                                                                                    <block type="math_change" id="Kl;wUCg]EscMZMPkL6q_">
                                                                                      <field name="VAR" id="q6h7`B[$+ZsH#a^bNB*f">Restanzahl</field>
                                                                                      <value name="DELTA">
                                                                                        <shadow type="math_number" id="HVu2@iYtQCXE?$l_R0;u">
                                                                                          <field name="NUM">-1</field>
                                                                                        </shadow>
                                                                                      </value>
                                                                                      <next>
                                                                                        <block type="math_change" id="yjGl@0%,T^b|p8)$R^k#">
                                                                                          <field name="VAR" id="j(Ay`U4*K?f`uxBMT=~B">Restleistung</field>
                                                                                          <value name="DELTA">
                                                                                            <shadow type="math_number" id="C)z-_5P;}E+2nSj?7lA%">
                                                                                              <field name="NUM">1</field>
                                                                                            </shadow>
                                                                                            <block type="math_single" id="N=Ygb:T9LY-]]oySV~-w">
                                                                                              <field name="OP">NEG</field>
                                                                                              <value name="NUM">
                                                                                                <shadow type="math_number" id="vRpBXlSDwGMb3h#Ho^?b">
                                                                                                  <field name="NUM">9</field>
                                                                                                </shadow>
                                                                                                <block type="variables_get" id="LVM=mCV=RkXAd#tELl,~">
                                                                                                  <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <next>
                                                                                            <block type="debug" id="/FsC=bv8q6#^]wlol./}">
                                                                                              <field name="Severity">info</field>
                                                                                              <value name="TEXT">
                                                                                                <shadow type="text" id="XZ}]x`H__:zD5ZE5ZCy8">
                                                                                                  <field name="TEXT">test</field>
                                                                                                </shadow>
                                                                                                <block type="variables_get" id="J^}K8Z(-rGT^P4l9%M0|">
                                                                                                  <field name="VAR" id="|~:77.d*!:FG7?xwvy=+">leistung</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </next>
                                                                                        </block>
                                                                                      </next>
                                                                                    </block>
                                                                                  </next>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                                <block type="procedures_defcustomnoreturn" id="CxdOO.WCDAjV:Z{(+ME[" x="-1237" y="-912">
                                  <mutation statements="false">
                                    <arg name="arr" varid="VhkAFchoAH~jm8|sY/#g"></arg>
                                    <arg name="attr" varid="`y:ZU0#7H|QneBeDn#WR"></arg>
                                  </mutation>
                                  <field name="NAME">sortObjectNum</field>
                                  <field name="SCRIPT">ZnVuY3Rpb24gc29ydEF0dHIoYSwgYikgew0KICAgIHJldHVybiBwYXJzZUZsb2F0KGFbYXR0cl0pIC0gcGFyc2VGbG9hdChiW2F0dHJdKTsNCn0NCmFyci5zb3J0KHNvcnRBdHRyKTs=</field>
                                  <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                </block>
                              </xml>
                              
                              paul53 1 Reply Last reply Reply Quote 0
                              • Marco Willi
                                Marco Willi @paul53 last edited by

                                @paul53 IMG_8701.png IMG_8702.png

                                Ich habe es rausgenoman aus dem Unterordner

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

                                  @marco-willi sagte: Ich habe es rausgenoman aus dem Unterordner

                                  Die Strukturen sind unterschiedlich. Damit funktioniert das einfache Ersetzen in der ID nicht:

                                  Blockly_temp.JPG

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

                                    @marco-willi
                                    Das ist nicht der erzeugte Javascript-Code.

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

                                      @paul53

                                      Kann ich das Blockly anpassen oder nicht?

                                      Homoran paul53 3 Replies Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @Marco Willi last edited by

                                        @marco-willi sagte in PV Strom Aufteilung:

                                        @paul53

                                        Kann ich das Blockly anpassen oder nicht?

                                        dann zeig doch

                                        @paul53 sagte in PV Strom Aufteilung:

                                        den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

                                        dann kann man das sagen.

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

                                          @marco-willi sagte: Kann ich das Blockly anpassen oder nicht?

                                          Man kann das Blockly so anpassen, dass man auch chaotische ID-Strukturen verwenden kann. Ich empfehle aber, identische Strukturen unter "alias.0" und "0_userdata.0" zu verwenden. Wie so eine Struktur aussehen kann, habe ich bereits gezeigt.
                                          Außerdem sollte man in der ID keine Umlaute und keine Namen von Personen verwenden, denn die können sich im Laufe der Zeit ändern. Der Objekt-Name lässt sich hingegen leicht anpassen.

                                          Hier noch einmal der Vorschlag für die per Skript errechneten Werte:

                                          Blockly_temp.JPG

                                          Identische Struktur unter "alias.0":

                                          SolarWEG.JPG

                                          Zur Tiefe der Struktur: Da ioBroker sicherlich noch für andere Aufgaben verwendet werden soll, ist der Ordner "SolarWEG" sinnvoll, um von den anderen Verwendungen abzugrenzen.

                                          1 Reply Last reply Reply Quote 1
                                          • paul53
                                            paul53 @Marco Willi last edited by paul53

                                            @marco-willi sagte: Kann ich das Blockly anpassen oder nicht?

                                            Eine "chaotische" ID-Struktur kann man mit zwei IDs in den Objekten berücksichtigen:

                                            Blockly_temp.JPG

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            958
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            63
                                            3059
                                            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