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

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

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.4k

Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.

Scheduled Pinned Locked Moved Blockly
blockly
60 Posts 6 Posters 6.3k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B babl

    @paul53 so hätte ich es jetzt überarbeitet.

    script3c.jpg

    paul53P Offline
    paul53P Offline
    paul53
    wrote on last edited by paul53
    #38

    @babl sagte: so hätte ich es jetzt überarbeitet.

    Das wird wohl so nicht funktionieren?

    Nimm besser das Javascript, das die beiden Startzeitpunkte ermittelt, und das folgende Blockly:

    <xml xmlns="https://developers.google.com/blockly/xml">
     <variables>
       <variable id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</variable>
       <variable id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</variable>
       <variable id="tUKE0PX3K5)VD=YNcLvD">userSoc</variable>
       <variable id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</variable>
       <variable id="7%%2=ua6TF*_3*n=+KFP">ladung</variable>
       <variable id="i!o.-Ha)p18KJmC7sy:z">stunde</variable>
       <variable id="2]{L:*:~P%K~o/VBmsiG">start1h</variable>
       <variable id="W81ft)h|Zh*R-R*?Fb?/">start2h</variable>
       <variable id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</variable>
       <variable id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</variable>
       <variable id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</variable>
       <variable id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</variable>
     </variables>
     <block type="on_ext" id="!:S,u%F%,D|^qI+fx8+7" x="913" y="-62">
       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
       <field name="CONDITION">ne</field>
       <field name="ACK_CONDITION"></field>
       <value name="OID0">
         <shadow type="field_oid" id="`}o+tiQuWh+V$coUrcqd">
           <field name="oid">default</field>
         </shadow>
         <block type="text" id="u6A}Mf}c?SsdQ$-NSY|Q">
           <field name="TEXT">sonnen.0.status.userSoc</field>
         </block>
       </value>
       <statement name="STATEMENT">
         <block type="controls_if" id="2i;.un?=k!HN(E#9_S}{">
           <value name="IF0">
             <block type="get_value" id="_[9Nyawe!,B~3YiY`6B*">
               <field name="ATTR">val</field>
               <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
             </block>
           </value>
           <statement name="DO0">
             <block type="variables_set" id=",ve{v3}#7O$OVB;qf4b3">
               <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
               <value name="VALUE">
                 <block type="on_source" id="=Nyl81_dezLL_9N^QooF">
                   <field name="ATTR">state.val</field>
                 </block>
               </value>
               <next>
                 <block type="controls_if" id="S[wO/T])mRy4l-TM9G~]">
                   <mutation else="1"></mutation>
                   <value name="IF0">
                     <block type="logic_compare" id="2f4p(u=}(=K%7M%4r^T,">
                       <field name="OP">LT</field>
                       <value name="A">
                         <block type="variables_get" id="Q)@yXE3VuEJmeqc!iI]3">
                           <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="variables_get" id="zR1p/~~]}.J]ql^Q9C.j">
                           <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="controls_if" id="qb(ZsyG;/ctpEs%AgIhu">
                       <mutation else="1"></mutation>
                       <value name="IF0">
                         <block type="logic_operation" id="WR,do8bkYb4;$b0d0ZRz" inline="false">
                           <field name="OP">OR</field>
                           <value name="A">
                             <block type="logic_compare" id="+)8PQPUGZ:f^FSo.X8XH">
                               <field name="OP">LT</field>
                               <value name="A">
                                 <block type="variables_get" id="H.`T3QRHnKeW8/r[|Z_X">
                                   <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="]M3DjmiXpy??;HfY3IRA">
                                   <field name="NUM">5</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="B">
                             <block type="logic_compare" id="#hzl#oPN@kR$Vml(Mb=-">
                               <field name="OP">GT</field>
                               <value name="A">
                                 <block type="variables_get" id="`@hXr^ZK`egjbYkULC%E">
                                   <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="CZTTbH4U%.tnZndUo?)-">
                                   <field name="NUM">95</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="variables_set" id="i?5`%cy!H,*)mre5DN,g">
                           <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                           <value name="VALUE">
                             <block type="math_arithmetic" id="0R*gz0*U~M)o$]a@aH3^">
                               <field name="OP">DIVIDE</field>
                               <value name="A">
                                 <shadow type="math_number">
                                   <field name="NUM">1</field>
                                 </shadow>
                                 <block type="variables_get" id="NRSK%SF9*$IrZJK5O+?W">
                                   <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <shadow type="math_number">
                                   <field name="NUM">1</field>
                                 </shadow>
                                 <block type="math_number" id=":Yi=O@m`xRWa=P-q=xW)">
                                   <field name="NUM">2</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </statement>
                       <statement name="ELSE">
                         <block type="variables_set" id="bRNS:q59Ud-z?;Z?q:6|">
                           <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                           <value name="VALUE">
                             <block type="variables_get" id="T79bP^WCXStAdTBj{KVH">
                               <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                   <statement name="ELSE">
                     <block type="update" id="d3zagXK[uKqXL~AVHIl+">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="logic_boolean" id="HqS~dS}s![:3!na`{LE|">
                           <field name="BOOL">FALSE</field>
                         </block>
                       </value>
                       <next>
                         <block type="variables_set" id="$grJ9zwL;,f|c:%(i4iO">
                           <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                           <value name="VALUE">
                             <block type="math_number" id="54W^ln.jYu|z27??![pW">
                               <field name="NUM">0</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </statement>
         </block>
       </statement>
       <next>
         <block type="schedule" id="HswSC2x#x@q*V16btQTB">
           <field name="SCHEDULE">*/8 * * * * *</field>
           <statement name="STATEMENT">
             <block type="control" id="{Vq?}rT:I^wT${3(H3+.">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
               <field name="OID">sonnen.0.control.charge</field>
               <field name="WITH_DELAY">FALSE</field>
               <value name="VALUE">
                 <block type="variables_get" id="n7~aIw=1}rs5#-lK+@V3">
                   <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                 </block>
               </value>
             </block>
           </statement>
         </block>
       </next>
     </block>
     <block type="variables_set" id="MZP??-@GgCQ0uW}:EOVg" x="87" y="194">
       <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
       <value name="VALUE">
         <block type="math_number" id="o8-buWU0G_HoI4}4;evH">
           <field name="NUM">5000</field>
         </block>
       </value>
       <next>
         <block type="variables_set" id="(S#.kljR#zd~`f9RB(yq">
           <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
           <value name="VALUE">
             <block type="math_number" id="Zu?;iFSO1mu1EKv/TXIl">
               <field name="NUM">3000</field>
             </block>
           </value>
           <next>
             <block type="variables_set" id="GKzOcYV_*aI#z-DvQM-l">
               <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
               <value name="VALUE">
                 <block type="math_number" id="~rqaOR`YtTkL*2N]d]Pb">
                   <field name="NUM">100</field>
                 </block>
               </value>
               <next>
                 <block type="schedule" id="PpHw,4;Y%c+B0c_2!yvm">
                   <field name="SCHEDULE">0 0-5,19-23 * * *</field>
                   <statement name="STATEMENT">
                     <block type="variables_set" id="+CObYKOl:duuBTJwO?fN">
                       <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                       <value name="VALUE">
                         <block type="time_get" id="{7CG2P6msM+sg=DI/Ib*">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                           <field name="OPTION">h</field>
                         </block>
                       </value>
                       <next>
                         <block type="variables_set" id=";w9ec0563t3N?#;PR6lg">
                           <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                           <value name="VALUE">
                             <block type="get_value" id="+edqU(uyzR7C!in:@y!m">
                               <field name="ATTR">val</field>
                               <field name="OID">0_userdata.0.Tibber.Bester_Preis.Start1h</field>
                             </block>
                           </value>
                           <next>
                             <block type="variables_set" id="}/(:p1v0{D5D)^a^_7eM">
                               <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                               <value name="VALUE">
                                 <block type="get_value" id="_)S5(r}hvt!234ABX7Lj">
                                   <field name="ATTR">val</field>
                                   <field name="OID">0_userdata.0.Tibber.Bester_Preis.Start2h</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="controls_if" id="V^C-W~Z]9ve.tu:OK[{b">
                                   <value name="IF0">
                                     <block type="logic_operation" id=",s,PDs0@SsAH+2PG[P2^" inline="false">
                                       <field name="OP">AND</field>
                                       <value name="A">
                                         <block type="logic_operation" id="[Em}#@0oLHmA_`E|F34W">
                                           <field name="OP">OR</field>
                                           <value name="A">
                                             <block type="logic_compare" id="4,c|9~-qXY=toW32Ju)#">
                                               <field name="OP">EQ</field>
                                               <value name="A">
                                                 <block type="variables_get" id="b{gm}vW!jZgpF^){AEia">
                                                   <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <block type="variables_get" id="7(h*]j;D}wA9b^Oiq!66">
                                                   <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <block type="logic_compare" id="=NSBA(Vb)IIYp.vkf^;B">
                                               <field name="OP">EQ</field>
                                               <value name="A">
                                                 <block type="variables_get" id="N@`O)}08SBDD7T9fhJWo">
                                                   <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <block type="variables_get" id=":AwViRZ{e7#a8N4Vw=r1">
                                                   <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="logic_negate" id="Q/R*]xz%tp{@9@qvYxJJ">
                                           <value name="BOOL">
                                             <block type="get_value" id="wp[}xVYrx(%|;LlRFs,%">
                                               <field name="ATTR">val</field>
                                               <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <statement name="DO0">
                                     <block type="comment" id="?{,$;?Kz_31x-o=h1qXF">
                                       <field name="COMMENT">Hausspeicher aktueller User Soc Datenpunkt (diese Variable wird leider unten in der Ausführung nicht übernommen, daher muß man sie unten manuell eingeben)</field>
                                       <next>
                                         <block type="variables_set" id="!70`ha%X:wSKw!l4tfT0">
                                           <field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
                                           <value name="VALUE">
                                             <block type="get_value" id="M~|s)d7rGJAty~MxH`GT">
                                               <field name="ATTR">val</field>
                                               <field name="OID">sonnen.0.status.userSoc</field>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="variables_set" id="aT316iyC~O^.QPGm#usj">
                                               <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                               <value name="VALUE">
                                                 <block type="math_arithmetic" id="L,d!WkA(ZTF?rMk*gX|:">
                                                   <field name="OP">DIVIDE</field>
                                                   <value name="A">
                                                     <shadow type="math_number">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="math_arithmetic" id="Y?ptK9X2+dF|Q6oNZfa;">
                                                       <field name="OP">MULTIPLY</field>
                                                       <value name="A">
                                                         <shadow type="math_number">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="variables_get" id="Y[a`=E?0,0EU%,*`|@PL">
                                                           <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <shadow type="math_number" id="D:Q_eDfS0$0eFkE.s~d9">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="variables_get" id="h+AE0hEXUMZzgS/(PqHw">
                                                           <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <shadow type="math_number">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="math_number" id=".q-.W`ppE=W6~U,G[M{G">
                                                       <field name="NUM">100</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="debug" id="}G,+oeAzYOWBp`(;iE/L">
                                                   <field name="Severity">log</field>
                                                   <value name="TEXT">
                                                     <shadow type="text">
                                                       <field name="TEXT">test</field>
                                                     </shadow>
                                                     <block type="variables_get" id="@ylEhTd*p|@Qpf9DO01~">
                                                       <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="variables_set" id="QpSp*L2/obVl#BmPW=Im">
                                                       <field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
                                                       <value name="VALUE">
                                                         <block type="math_arithmetic" id="4yEqQ!XOBu/CM1z55rZ+">
                                                           <field name="OP">DIVIDE</field>
                                                           <value name="A">
                                                             <shadow type="math_number">
                                                               <field name="NUM">1</field>
                                                             </shadow>
                                                             <block type="math_arithmetic" id="NOV4:y,hKM_4WGK+-L5a">
                                                               <field name="OP">MULTIPLY</field>
                                                               <value name="A">
                                                                 <shadow type="math_number">
                                                                   <field name="NUM">1</field>
                                                                 </shadow>
                                                                 <block type="variables_get" id="@@bf!^!!zG3ZazhhDi3N">
                                                                   <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <shadow type="math_number">
                                                                   <field name="NUM">1</field>
                                                                 </shadow>
                                                                 <block type="variables_get" id="r8^7W*S+mf8?Y+^iCEu^">
                                                                   <field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <shadow type="math_number">
                                                               <field name="NUM">1</field>
                                                             </shadow>
                                                             <block type="math_number" id="z=X5B0F%iKCu_{K=nTtz">
                                                               <field name="NUM">100</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="variables_set" id="GcnkwY=Av#fEW9`j_(LA">
                                                           <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                           <value name="VALUE">
                                                             <block type="math_arithmetic" id="BC:,rAc!m7F!HG_H?a`.">
                                                               <field name="OP">MINUS</field>
                                                               <value name="A">
                                                                 <shadow type="math_number" id="ZEU-dcK#.OUwTR%xlpL!">
                                                                   <field name="NUM">1</field>
                                                                 </shadow>
                                                                 <block type="variables_get" id="znl~Q@O?I@#g8i;LBO3F">
                                                                   <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <shadow type="math_number" id="`6.:,gs|}r;|)i=WOM)q">
                                                                   <field name="NUM">1</field>
                                                                 </shadow>
                                                                 <block type="variables_get" id=".aFs`RGDYOQiyNOnEq,s">
                                                                   <field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="debug" id="U-5c]Rj@%|q4-iR)n$GK">
                                                               <field name="Severity">log</field>
                                                               <value name="TEXT">
                                                                 <shadow type="text" id="0/@w@_4bKtO[4-@JL/bx">
                                                                   <field name="TEXT">test</field>
                                                                 </shadow>
                                                                 <block type="variables_get" id="sQjcbO4t8x}*ph/08A42">
                                                                   <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="controls_if" id="Dv{j+@Ao0zX4F,q.:#[=">
                                                                   <mutation elseif="1"></mutation>
                                                                   <value name="IF0">
                                                                     <block type="logic_compare" id="J4doY.kF$c~7WO6$@Zl]">
                                                                       <field name="OP">GTE</field>
                                                                       <value name="A">
                                                                         <block type="variables_get" id="gJz6kkTqUqfp]]%bVxmK">
                                                                           <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="B">
                                                                         <block type="variables_get" id="aigO*jWNOUWw.2d4z`y}">
                                                                           <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <statement name="DO0">
                                                                     <block type="controls_if" id=")`YJ^)aGk6A+l]oCX9@g">
                                                                       <value name="IF0">
                                                                         <block type="logic_compare" id="1kL5O,FD^1AF~Ui^-?N%">
                                                                           <field name="OP">EQ</field>
                                                                           <value name="A">
                                                                             <block type="variables_get" id="YTv05lus(j-!otQ,RA0l">
                                                                               <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                                             </block>
                                                                           </value>
                                                                           <value name="B">
                                                                             <block type="variables_get" id="+nauxomT!BzcChx*43Gu">
                                                                               <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </value>
                                                                       <statement name="DO0">
                                                                         <block type="update" id=")`oTB=*R-ng3gjG-q5ZH">
                                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                           <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                                                           <field name="WITH_DELAY">FALSE</field>
                                                                           <value name="VALUE">
                                                                             <block type="logic_boolean" id=",je=plC@|,)bhNC|FHQk">
                                                                               <field name="BOOL">TRUE</field>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </statement>
                                                                     </block>
                                                                   </statement>
                                                                   <value name="IF1">
                                                                     <block type="logic_compare" id="NS0?wW4pIbx9)fY,Xiqa">
                                                                       <field name="OP">EQ</field>
                                                                       <value name="A">
                                                                         <block type="variables_get" id="U?57`D)MS,~NwrLt[I5u">
                                                                           <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="B">
                                                                         <block type="variables_get" id="JMJ{duW8sv=nwo^:39h3">
                                                                           <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <statement name="DO1">
                                                                     <block type="update" id="~_6S%,WZ][E^nlvlRJXE">
                                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                       <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                                                       <field name="WITH_DELAY">FALSE</field>
                                                                       <value name="VALUE">
                                                                         <block type="logic_boolean" id="CpF%8d:6}p-SqTWpemF4">
                                                                           <field name="BOOL">TRUE</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </statement>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </next>
         </block>
       </next>
     </block>
    </xml>
    

    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

    B 1 Reply Last reply
    1
    • paul53P paul53

      @babl sagte: so hätte ich es jetzt überarbeitet.

      Das wird wohl so nicht funktionieren?

      Nimm besser das Javascript, das die beiden Startzeitpunkte ermittelt, und das folgende Blockly:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</variable>
         <variable id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</variable>
         <variable id="tUKE0PX3K5)VD=YNcLvD">userSoc</variable>
         <variable id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</variable>
         <variable id="7%%2=ua6TF*_3*n=+KFP">ladung</variable>
         <variable id="i!o.-Ha)p18KJmC7sy:z">stunde</variable>
         <variable id="2]{L:*:~P%K~o/VBmsiG">start1h</variable>
         <variable id="W81ft)h|Zh*R-R*?Fb?/">start2h</variable>
         <variable id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</variable>
         <variable id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</variable>
         <variable id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</variable>
         <variable id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</variable>
       </variables>
       <block type="on_ext" id="!:S,u%F%,D|^qI+fx8+7" x="913" y="-62">
         <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
         <field name="CONDITION">ne</field>
         <field name="ACK_CONDITION"></field>
         <value name="OID0">
           <shadow type="field_oid" id="`}o+tiQuWh+V$coUrcqd">
             <field name="oid">default</field>
           </shadow>
           <block type="text" id="u6A}Mf}c?SsdQ$-NSY|Q">
             <field name="TEXT">sonnen.0.status.userSoc</field>
           </block>
         </value>
         <statement name="STATEMENT">
           <block type="controls_if" id="2i;.un?=k!HN(E#9_S}{">
             <value name="IF0">
               <block type="get_value" id="_[9Nyawe!,B~3YiY`6B*">
                 <field name="ATTR">val</field>
                 <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
               </block>
             </value>
             <statement name="DO0">
               <block type="variables_set" id=",ve{v3}#7O$OVB;qf4b3">
                 <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                 <value name="VALUE">
                   <block type="on_source" id="=Nyl81_dezLL_9N^QooF">
                     <field name="ATTR">state.val</field>
                   </block>
                 </value>
                 <next>
                   <block type="controls_if" id="S[wO/T])mRy4l-TM9G~]">
                     <mutation else="1"></mutation>
                     <value name="IF0">
                       <block type="logic_compare" id="2f4p(u=}(=K%7M%4r^T,">
                         <field name="OP">LT</field>
                         <value name="A">
                           <block type="variables_get" id="Q)@yXE3VuEJmeqc!iI]3">
                             <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="variables_get" id="zR1p/~~]}.J]ql^Q9C.j">
                             <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="controls_if" id="qb(ZsyG;/ctpEs%AgIhu">
                         <mutation else="1"></mutation>
                         <value name="IF0">
                           <block type="logic_operation" id="WR,do8bkYb4;$b0d0ZRz" inline="false">
                             <field name="OP">OR</field>
                             <value name="A">
                               <block type="logic_compare" id="+)8PQPUGZ:f^FSo.X8XH">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="variables_get" id="H.`T3QRHnKeW8/r[|Z_X">
                                     <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="]M3DjmiXpy??;HfY3IRA">
                                     <field name="NUM">5</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_compare" id="#hzl#oPN@kR$Vml(Mb=-">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="variables_get" id="`@hXr^ZK`egjbYkULC%E">
                                     <field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="CZTTbH4U%.tnZndUo?)-">
                                     <field name="NUM">95</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="variables_set" id="i?5`%cy!H,*)mre5DN,g">
                             <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                             <value name="VALUE">
                               <block type="math_arithmetic" id="0R*gz0*U~M)o$]a@aH3^">
                                 <field name="OP">DIVIDE</field>
                                 <value name="A">
                                   <shadow type="math_number">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="variables_get" id="NRSK%SF9*$IrZJK5O+?W">
                                     <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="math_number" id=":Yi=O@m`xRWa=P-q=xW)">
                                     <field name="NUM">2</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </statement>
                         <statement name="ELSE">
                           <block type="variables_set" id="bRNS:q59Ud-z?;Z?q:6|">
                             <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                             <value name="VALUE">
                               <block type="variables_get" id="T79bP^WCXStAdTBj{KVH">
                                 <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                               </block>
                             </value>
                           </block>
                         </statement>
                       </block>
                     </statement>
                     <statement name="ELSE">
                       <block type="update" id="d3zagXK[uKqXL~AVHIl+">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="logic_boolean" id="HqS~dS}s![:3!na`{LE|">
                             <field name="BOOL">FALSE</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="$grJ9zwL;,f|c:%(i4iO">
                             <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                             <value name="VALUE">
                               <block type="math_number" id="54W^ln.jYu|z27??![pW">
                                 <field name="NUM">0</field>
                               </block>
                             </value>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </statement>
         <next>
           <block type="schedule" id="HswSC2x#x@q*V16btQTB">
             <field name="SCHEDULE">*/8 * * * * *</field>
             <statement name="STATEMENT">
               <block type="control" id="{Vq?}rT:I^wT${3(H3+.">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">sonnen.0.control.charge</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="variables_get" id="n7~aIw=1}rs5#-lK+@V3">
                     <field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
                   </block>
                 </value>
               </block>
             </statement>
           </block>
         </next>
       </block>
       <block type="variables_set" id="MZP??-@GgCQ0uW}:EOVg" x="87" y="194">
         <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
         <value name="VALUE">
           <block type="math_number" id="o8-buWU0G_HoI4}4;evH">
             <field name="NUM">5000</field>
           </block>
         </value>
         <next>
           <block type="variables_set" id="(S#.kljR#zd~`f9RB(yq">
             <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
             <value name="VALUE">
               <block type="math_number" id="Zu?;iFSO1mu1EKv/TXIl">
                 <field name="NUM">3000</field>
               </block>
             </value>
             <next>
               <block type="variables_set" id="GKzOcYV_*aI#z-DvQM-l">
                 <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
                 <value name="VALUE">
                   <block type="math_number" id="~rqaOR`YtTkL*2N]d]Pb">
                     <field name="NUM">100</field>
                   </block>
                 </value>
                 <next>
                   <block type="schedule" id="PpHw,4;Y%c+B0c_2!yvm">
                     <field name="SCHEDULE">0 0-5,19-23 * * *</field>
                     <statement name="STATEMENT">
                       <block type="variables_set" id="+CObYKOl:duuBTJwO?fN">
                         <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                         <value name="VALUE">
                           <block type="time_get" id="{7CG2P6msM+sg=DI/Ib*">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                             <field name="OPTION">h</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id=";w9ec0563t3N?#;PR6lg">
                             <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                             <value name="VALUE">
                               <block type="get_value" id="+edqU(uyzR7C!in:@y!m">
                                 <field name="ATTR">val</field>
                                 <field name="OID">0_userdata.0.Tibber.Bester_Preis.Start1h</field>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="}/(:p1v0{D5D)^a^_7eM">
                                 <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                                 <value name="VALUE">
                                   <block type="get_value" id="_)S5(r}hvt!234ABX7Lj">
                                     <field name="ATTR">val</field>
                                     <field name="OID">0_userdata.0.Tibber.Bester_Preis.Start2h</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="controls_if" id="V^C-W~Z]9ve.tu:OK[{b">
                                     <value name="IF0">
                                       <block type="logic_operation" id=",s,PDs0@SsAH+2PG[P2^" inline="false">
                                         <field name="OP">AND</field>
                                         <value name="A">
                                           <block type="logic_operation" id="[Em}#@0oLHmA_`E|F34W">
                                             <field name="OP">OR</field>
                                             <value name="A">
                                               <block type="logic_compare" id="4,c|9~-qXY=toW32Ju)#">
                                                 <field name="OP">EQ</field>
                                                 <value name="A">
                                                   <block type="variables_get" id="b{gm}vW!jZgpF^){AEia">
                                                     <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="variables_get" id="7(h*]j;D}wA9b^Oiq!66">
                                                     <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="logic_compare" id="=NSBA(Vb)IIYp.vkf^;B">
                                                 <field name="OP">EQ</field>
                                                 <value name="A">
                                                   <block type="variables_get" id="N@`O)}08SBDD7T9fhJWo">
                                                     <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="variables_get" id=":AwViRZ{e7#a8N4Vw=r1">
                                                     <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="logic_negate" id="Q/R*]xz%tp{@9@qvYxJJ">
                                             <value name="BOOL">
                                               <block type="get_value" id="wp[}xVYrx(%|;LlRFs,%">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="comment" id="?{,$;?Kz_31x-o=h1qXF">
                                         <field name="COMMENT">Hausspeicher aktueller User Soc Datenpunkt (diese Variable wird leider unten in der Ausführung nicht übernommen, daher muß man sie unten manuell eingeben)</field>
                                         <next>
                                           <block type="variables_set" id="!70`ha%X:wSKw!l4tfT0">
                                             <field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
                                             <value name="VALUE">
                                               <block type="get_value" id="M~|s)d7rGJAty~MxH`GT">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">sonnen.0.status.userSoc</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="variables_set" id="aT316iyC~O^.QPGm#usj">
                                                 <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                                 <value name="VALUE">
                                                   <block type="math_arithmetic" id="L,d!WkA(ZTF?rMk*gX|:">
                                                     <field name="OP">DIVIDE</field>
                                                     <value name="A">
                                                       <shadow type="math_number">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="math_arithmetic" id="Y?ptK9X2+dF|Q6oNZfa;">
                                                         <field name="OP">MULTIPLY</field>
                                                         <value name="A">
                                                           <shadow type="math_number">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                           <block type="variables_get" id="Y[a`=E?0,0EU%,*`|@PL">
                                                             <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <shadow type="math_number" id="D:Q_eDfS0$0eFkE.s~d9">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                           <block type="variables_get" id="h+AE0hEXUMZzgS/(PqHw">
                                                             <field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <shadow type="math_number">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="math_number" id=".q-.W`ppE=W6~U,G[M{G">
                                                         <field name="NUM">100</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="debug" id="}G,+oeAzYOWBp`(;iE/L">
                                                     <field name="Severity">log</field>
                                                     <value name="TEXT">
                                                       <shadow type="text">
                                                         <field name="TEXT">test</field>
                                                       </shadow>
                                                       <block type="variables_get" id="@ylEhTd*p|@Qpf9DO01~">
                                                         <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="variables_set" id="QpSp*L2/obVl#BmPW=Im">
                                                         <field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
                                                         <value name="VALUE">
                                                           <block type="math_arithmetic" id="4yEqQ!XOBu/CM1z55rZ+">
                                                             <field name="OP">DIVIDE</field>
                                                             <value name="A">
                                                               <shadow type="math_number">
                                                                 <field name="NUM">1</field>
                                                               </shadow>
                                                               <block type="math_arithmetic" id="NOV4:y,hKM_4WGK+-L5a">
                                                                 <field name="OP">MULTIPLY</field>
                                                                 <value name="A">
                                                                   <shadow type="math_number">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="@@bf!^!!zG3ZazhhDi3N">
                                                                     <field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="B">
                                                                   <shadow type="math_number">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="r8^7W*S+mf8?Y+^iCEu^">
                                                                     <field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <shadow type="math_number">
                                                                 <field name="NUM">1</field>
                                                               </shadow>
                                                               <block type="math_number" id="z=X5B0F%iKCu_{K=nTtz">
                                                                 <field name="NUM">100</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="variables_set" id="GcnkwY=Av#fEW9`j_(LA">
                                                             <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                             <value name="VALUE">
                                                               <block type="math_arithmetic" id="BC:,rAc!m7F!HG_H?a`.">
                                                                 <field name="OP">MINUS</field>
                                                                 <value name="A">
                                                                   <shadow type="math_number" id="ZEU-dcK#.OUwTR%xlpL!">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="znl~Q@O?I@#g8i;LBO3F">
                                                                     <field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="B">
                                                                   <shadow type="math_number" id="`6.:,gs|}r;|)i=WOM)q">
                                                                     <field name="NUM">1</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id=".aFs`RGDYOQiyNOnEq,s">
                                                                     <field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="debug" id="U-5c]Rj@%|q4-iR)n$GK">
                                                                 <field name="Severity">log</field>
                                                                 <value name="TEXT">
                                                                   <shadow type="text" id="0/@w@_4bKtO[4-@JL/bx">
                                                                     <field name="TEXT">test</field>
                                                                   </shadow>
                                                                   <block type="variables_get" id="sQjcbO4t8x}*ph/08A42">
                                                                     <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                                   </block>
                                                                 </value>
                                                                 <next>
                                                                   <block type="controls_if" id="Dv{j+@Ao0zX4F,q.:#[=">
                                                                     <mutation elseif="1"></mutation>
                                                                     <value name="IF0">
                                                                       <block type="logic_compare" id="J4doY.kF$c~7WO6$@Zl]">
                                                                         <field name="OP">GTE</field>
                                                                         <value name="A">
                                                                           <block type="variables_get" id="gJz6kkTqUqfp]]%bVxmK">
                                                                             <field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="B">
                                                                           <block type="variables_get" id="aigO*jWNOUWw.2d4z`y}">
                                                                             <field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <statement name="DO0">
                                                                       <block type="controls_if" id=")`YJ^)aGk6A+l]oCX9@g">
                                                                         <value name="IF0">
                                                                           <block type="logic_compare" id="1kL5O,FD^1AF~Ui^-?N%">
                                                                             <field name="OP">EQ</field>
                                                                             <value name="A">
                                                                               <block type="variables_get" id="YTv05lus(j-!otQ,RA0l">
                                                                                 <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                                               </block>
                                                                             </value>
                                                                             <value name="B">
                                                                               <block type="variables_get" id="+nauxomT!BzcChx*43Gu">
                                                                                 <field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </value>
                                                                         <statement name="DO0">
                                                                           <block type="update" id=")`oTB=*R-ng3gjG-q5ZH">
                                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                             <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                                                             <field name="WITH_DELAY">FALSE</field>
                                                                             <value name="VALUE">
                                                                               <block type="logic_boolean" id=",je=plC@|,)bhNC|FHQk">
                                                                                 <field name="BOOL">TRUE</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </statement>
                                                                       </block>
                                                                     </statement>
                                                                     <value name="IF1">
                                                                       <block type="logic_compare" id="NS0?wW4pIbx9)fY,Xiqa">
                                                                         <field name="OP">EQ</field>
                                                                         <value name="A">
                                                                           <block type="variables_get" id="U?57`D)MS,~NwrLt[I5u">
                                                                             <field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="B">
                                                                           <block type="variables_get" id="JMJ{duW8sv=nwo^:39h3">
                                                                             <field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <statement name="DO1">
                                                                       <block type="update" id="~_6S%,WZ][E^nlvlRJXE">
                                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                         <field name="OID">0_userdata.0.SB_10_manuell_laden</field>
                                                                         <field name="WITH_DELAY">FALSE</field>
                                                                         <value name="VALUE">
                                                                           <block type="logic_boolean" id="CpF%8d:6}p-SqTWpemF4">
                                                                             <field name="BOOL">TRUE</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </statement>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
             </next>
           </block>
         </next>
       </block>
      </xml>
      

      B Online
      B Online
      babl
      wrote on last edited by
      #39

      @paul53 da kommt dann auf beiden datenpunkten die gleiche Uhrzeit raus, sind die preise dann von heute oder von morgen in deinem Script

      paul53P 1 Reply Last reply
      0
      • B babl

        @paul53 da kommt dann auf beiden datenpunkten die gleiche Uhrzeit raus, sind die preise dann von heute oder von morgen in deinem Script

        paul53P Offline
        paul53P Offline
        paul53
        wrote on last edited by paul53
        #40

        @babl sagte: da kommt dann auf beiden datenpunkten die gleiche Uhrzeit raus

        Das kann durchaus sein, ist aber nicht immer so.

        @babl sagte in Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.:

        sind die preise dann von heute oder von morgen

        Bis Mitternacht von heute und ab 0:00 Uhr von morgen.

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        B 1 Reply Last reply
        0
        • paul53P paul53

          @babl sagte: da kommt dann auf beiden datenpunkten die gleiche Uhrzeit raus

          Das kann durchaus sein, ist aber nicht immer so.

          @babl sagte in Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.:

          sind die preise dann von heute oder von morgen

          Bis Mitternacht von heute und ab 0:00 Uhr von morgen.

          B Online
          B Online
          babl
          wrote on last edited by
          #41

          @paul53 ok danke kann man dann den Höchstpreis noch als bestehenden Datenpunkt in das Script miteinbauen, so kann man den Preis über die VIS ändern, ohne daß man jedesmal in deinem Script rumwursteln muss? :grinning:

          paul53P 1 Reply Last reply
          0
          • B babl

            @paul53 ok danke kann man dann den Höchstpreis noch als bestehenden Datenpunkt in das Script miteinbauen, so kann man den Preis über die VIS ändern, ohne daß man jedesmal in deinem Script rumwursteln muss? :grinning:

            paul53P Offline
            paul53P Offline
            paul53
            wrote on last edited by
            #42

            @babl sagte: kann man dann den Höchstpreis noch als bestehenden Datenpunkt in das Script miteinbauen, so kann man den Preis über die VIS ändern, ohne daß man jedesmal in deinem Script rumwursteln muss?

            Ja, dann muss der Höchstpreis-Datenpunkt innerhalb des 18:57-Uhr-Triggers abgefragt werden.

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            B 1 Reply Last reply
            0
            • paul53P paul53

              @babl sagte: kann man dann den Höchstpreis noch als bestehenden Datenpunkt in das Script miteinbauen, so kann man den Preis über die VIS ändern, ohne daß man jedesmal in deinem Script rumwursteln muss?

              Ja, dann muss der Höchstpreis-Datenpunkt innerhalb des 18:57-Uhr-Triggers abgefragt werden.

              B Online
              B Online
              babl
              wrote on last edited by babl
              #43

              @paul53

              also so

              const maxPreis = 0.3;

              zu

              const maxPreis = '0_userdata.0.Tibber.Strom_Höchstpreis';

              innerhalb des Trigger Block

              Ist das so richtig?

              paul53P 1 Reply Last reply
              0
              • B babl

                @paul53

                also so

                const maxPreis = 0.3;

                zu

                const maxPreis = '0_userdata.0.Tibber.Strom_Höchstpreis';

                innerhalb des Trigger Block

                Ist das so richtig?

                paul53P Offline
                paul53P Offline
                paul53
                wrote on last edited by
                #44

                @babl sagte: Ist das so richtig?

                Nein, innerhalb des Triggers:

                const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val;
                

                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                B 1 Reply Last reply
                0
                • paul53P paul53

                  @babl sagte: Ist das so richtig?

                  Nein, innerhalb des Triggers:

                  const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val;
                  
                  B Online
                  B Online
                  babl
                  wrote on last edited by
                  #45

                  @paul53 sagte in Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.:

                  const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val;

                  ok so?

                  schedule('50 14 * * *', function() {
                      
                  const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val; 
                  
                      const preise = [];
                  
                  paul53P 1 Reply Last reply
                  0
                  • B babl

                    @paul53 sagte in Testscript: Hausspeicher dyn. laden nach Tibberpreisen uvm.:

                    const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val;

                    ok so?

                    schedule('50 14 * * *', function() {
                        
                    const maxPreis = getState('0_userdata.0.Tibber.Strom_Höchstpreis').val; 
                    
                        const preise = [];
                    
                    paul53P Offline
                    paul53P Offline
                    paul53
                    wrote on last edited by
                    #46

                    @babl sagte: ok so?

                    Ja.
                    Verwendest Du Firefox für ioBroker? Das würde die Leerzeilen beim Kopieren erklären.

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    B 2 Replies Last reply
                    0
                    • paul53P paul53

                      @babl sagte: ok so?

                      Ja.
                      Verwendest Du Firefox für ioBroker? Das würde die Leerzeilen beim Kopieren erklären.

                      B Online
                      B Online
                      babl
                      wrote on last edited by
                      #47

                      @paul53 ja

                      paul53P 1 Reply Last reply
                      0
                      • B babl

                        @paul53 ja

                        paul53P Offline
                        paul53P Offline
                        paul53
                        wrote on last edited by
                        #48

                        @babl
                        Für das Internet verwende ich auch Firefox, aber Chrome für ioBroker (ohne Leerzeilen beim Kopieren).

                        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                        1 Reply Last reply
                        1
                        • paul53P paul53

                          @babl sagte: ok so?

                          Ja.
                          Verwendest Du Firefox für ioBroker? Das würde die Leerzeilen beim Kopieren erklären.

                          B Online
                          B Online
                          babl
                          wrote on last edited by
                          #49

                          @paul53 noch eine Frage warum kommt dann bei dir wenn der max Preis kleiner ist als der Tibberpreis die Zahl 12 raus?

                          paul53P 1 Reply Last reply
                          0
                          • B babl

                            @paul53 noch eine Frage warum kommt dann bei dir wenn der max Preis kleiner ist als der Tibberpreis die Zahl 12 raus?

                            paul53P Offline
                            paul53P Offline
                            paul53
                            wrote on last edited by
                            #50

                            @babl sagte: wenn der max Preis kleiner ist als der Tibberpreis die Zahl 12 raus?

                            Weil 12:00 Uhr außerhalb des Abfragezeitraums 19:00 bis 5:00 Uhr ist und somit nicht geladen wird.

                            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                            B 1 Reply Last reply
                            0
                            • paul53P paul53

                              @babl sagte: wenn der max Preis kleiner ist als der Tibberpreis die Zahl 12 raus?

                              Weil 12:00 Uhr außerhalb des Abfragezeitraums 19:00 bis 5:00 Uhr ist und somit nicht geladen wird.

                              B Online
                              B Online
                              babl
                              wrote on last edited by
                              #51

                              @paul53 aaaah ok, gut danke dir ich glaube das ganze ist mir doch zu hoch, habe aber heute geglaubt ich bringe es auf die reihe.

                              paul53P 1 Reply Last reply
                              0
                              • B babl

                                @paul53 aaaah ok, gut danke dir ich glaube das ganze ist mir doch zu hoch, habe aber heute geglaubt ich bringe es auf die reihe.

                                paul53P Offline
                                paul53P Offline
                                paul53
                                wrote on last edited by paul53
                                #52

                                @babl
                                Das mit den Zeitplänen ist keine so gute Idee. Mache es besser so:

                                Bild_2023-01-07_133858905.png

                                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                B 1 Reply Last reply
                                0
                                • paul53P paul53

                                  @babl
                                  Das mit den Zeitplänen ist keine so gute Idee. Mache es besser so:

                                  Bild_2023-01-07_133858905.png

                                  B Online
                                  B Online
                                  babl
                                  wrote on last edited by
                                  #53

                                  @paul53 ok danke

                                  U D 2 Replies Last reply
                                  0
                                  • Moritz HemmannM Offline
                                    Moritz HemmannM Offline
                                    Moritz Hemmann
                                    wrote on last edited by
                                    #54

                                    @babl @paul53 ich habe die selbe Konstellation iobroker>tibber>Sonnenbatterie aber ich steig mit der JavaScript-Handhabung nicht durch - kann nur mit blockly umgehen. Könnt Ihr mir das final beschreiben wie ich welchen script rein kopiere? Gruß Moritz

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      mauseb
                                      wrote on last edited by
                                      #55

                                      Hallo zusammen,

                                      hat schon jemand sowas für ein E3DC S14 Compact mit tibberlink als Blockly Skript gemacht?
                                      Danke im Voraus

                                      1 Reply Last reply
                                      0
                                      • B babl

                                        @paul53 ok danke

                                        U Offline
                                        U Offline
                                        UlliJ
                                        wrote on last edited by
                                        #56

                                        @babl
                                        Hi, hast Du das mittlerweile zufriedenstellend am Laufen?

                                        Habe etwas ähnliches vor wenn der Strom demnächst von Tibber kommt, bin aber erst am Zusammensuchen, habe noch nichts programmiert und der Pulse läuft auch noch nicht.

                                        Was mir beim Lesen aufgefallen ist: ich mag nicht so recht glauben das die Ladeleistung alle 8s an die Batterie geschickt werden muss.
                                        Laut Doku der Sonnen API kennt die 4 Betriebsarten

                                        1. Manuell
                                        2. Eigenverbrauchsoptimierung
                                        3. Zeitplan
                                        4. Modulerweiterung
                                          Zum laden der Batterie wäre also 1) oder 3) die Betriebsart während der preiswerten Zeiträume. Und 2) dann, wenn die Strompreise hoch sind bzw. Eigenverbrauch wird erst aktiv wenn die Batterie den Netzbezug ausregeln soll.
                                          Oder liege ich da falsch?

                                        Danke und Gruß

                                        Proxmox auf iNuc, lxc für IoB, InfluxDB2, Grafana, u.a. *** Homematic & Homematic IP, Shellies, Zigbee etc

                                        B 1 Reply Last reply
                                        0
                                        • U UlliJ

                                          @babl
                                          Hi, hast Du das mittlerweile zufriedenstellend am Laufen?

                                          Habe etwas ähnliches vor wenn der Strom demnächst von Tibber kommt, bin aber erst am Zusammensuchen, habe noch nichts programmiert und der Pulse läuft auch noch nicht.

                                          Was mir beim Lesen aufgefallen ist: ich mag nicht so recht glauben das die Ladeleistung alle 8s an die Batterie geschickt werden muss.
                                          Laut Doku der Sonnen API kennt die 4 Betriebsarten

                                          1. Manuell
                                          2. Eigenverbrauchsoptimierung
                                          3. Zeitplan
                                          4. Modulerweiterung
                                            Zum laden der Batterie wäre also 1) oder 3) die Betriebsart während der preiswerten Zeiträume. Und 2) dann, wenn die Strompreise hoch sind bzw. Eigenverbrauch wird erst aktiv wenn die Batterie den Netzbezug ausregeln soll.
                                            Oder liege ich da falsch?

                                          Danke und Gruß

                                          B Online
                                          B Online
                                          babl
                                          wrote on last edited by
                                          #57

                                          @ullij hi, kannst du mir die doku zukommen lassen, als ich mit dem angefangen habe ging es nur über die ladeleistung, dies war allerdings auch noch die api v1. ich warte noch auf die fertigstellung des tibberlink adapters und dann werde ich das ganze fertigmachen.

                                          U 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          657

                                          Online

                                          32.7k

                                          Users

                                          82.3k

                                          Topics

                                          1.3m

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

                                          • Don't have an account? Register

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