NEWS
OpenDTU / SunnyHomeManager2 Ansteuerung, finde Fehler nicht
-
Moin Community,
ist meine allererste Berührung mit Blockly, ich hab mir ein Script zusammen gebaut ( als Vorlage diente mir @Kymchy Script aus diesem Thread ) welches Nachts die Stromeinspeisung eines Hoymiles Wechselrichters aus einer Batterie in das Hausnetz steuert. Gemessen an dem derzeitigen Verbrauch. Als Energymeter kommt ein SunnyHomeManager2 von SMA zum Einsatz. Dieser hat zwei einzelne Datenpunkte für den derzeitigen Verbrauch/Einspeißung. Wird kein Strom Verbraucht zeigt er also 0 an und der anderen Datenpunkt dann z.B. 50W für die Einspeißung. Beide Datenpunkte arbeiten nur mit positiven Zahlen. Das Problem ist jetzt
Wenn 50W zuviel aus der Batterie gezogen und ins Netz eingespeißt werden, regeln mein Script nicht auf 0 runter sondern auf 50W Strombezug. Bei 80W Einspeißung, geht es um 160W auf 80W Strombezug, usw. Bis ein Verbraucher diesen loop unterbricht.
Bin mittlerweile echt am verzweifeln.... vlt findet ja ein frisches paar Augen den Fehler.
Falls jmd den Code braucht:
code_text v7.1.4 BlocklyJavascriptTypeScriptRules Skript läuft nicht Protokoll Ausgewählte Blöcke exportieren <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="?~:J:;gqC%-pt?=zNsH:">Sunrise</variable> <variable id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</variable> <variable id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</variable> <variable id="MQnX9mtF]{])2.DnhLPW">MaxPower</variable> <variable id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</variable> <variable id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</variable> <variable id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</variable> <variable id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</variable> <variable id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</variable> <variable id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</variable> <variable id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</variable> </variables> <block type="schedule" id="!P+uzJ#%y!_wHsKqo2~M" x="-754" y="-460"> <field name="SCHEDULE">*/30 * * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="~v~t5u;a_q(#kb+E{(FH"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sunrise</field> <value name="VALUE"> <block type="time_astro" id="Svgszky6QE2/10f8vck1"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> </block> </value> <next> <block type="variables_set" id="~/087{!i@]6[`rKxsw]j"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</field> <value name="VALUE"> <block type="time_astro" id="BO/%++Qd.ktL4PfK.r3?"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> </block> </value> <next> <block type="controls_if" id="xaOp|xXgB@BB44iq}cJ."> <mutation else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="Y8n@Iqzd:%qZbp|#P_v^"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">not between</field> <value name="START_TIME"> <shadow type="text" id="]-0N3DkP*7?ghtYzXwX!"> <field name="TEXT">12:00</field> </shadow> <block type="variables_get" id="!,6PYgrHnSxh#Evn[Yie"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="J]$RnLG]3LLjr:SCc*G8"> <field name="TEXT">18:00</field> </shadow> <block type="variables_get" id="LMy)6-$QN(f3d9klxV`O"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sunrise</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="qPTGB%7j$nBgk,mbZ/af"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> <value name="VALUE"> <block type="get_value" id="^.6?$PaCCRu/*#r[*{H]"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <next> <block type="controls_if" id="h4=.njbcaX.PHi^w4^2%"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="0+yP5+K@+y/eDLGD|),L"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="^UW.Eb4:(|^2-EyE!3ml"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> </block> </value> <value name="B"> <block type="math_number" id="z5LXzg`S7a~SL*?;1.2Q"> <field name="NUM">24</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="4CEbW*aaD@NS0+c{-01V"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="sgkRf}?fd8+Jh5gEc2s-"> <mutation items="2"></mutation> <value name="ADD0"> <block type="get_value" id=".Y@_6KGO.t^nM~qZ:UYx"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <value name="ADD1"> <block type="text" id="`mTx1~Z~aX?u%kJ)gh%+"> <field name="TEXT">V. Batterie Spannung OK. :-)</field> </block> </value> </block> </value> <next> <block type="variables_set" id=".oH%b02AR59HC5*p$Agv"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> <value name="VALUE"> <block type="math_number" id="x*:T81?$YRY:}BeY0Nye"> <field name="NUM">300</field> </block> </value> <next> <block type="variables_set" id="Ih%sQzzK`!Ec=`tscEm-"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> <value name="VALUE"> <block type="get_value" id="E60zTd:yszZT-@pD[YB#"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.pregard</field> </block> </value> <next> <block type="variables_set" id="tw9^jo7eU.H_7z$vPD*P"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> <value name="VALUE"> <block type="get_value" id="%K9(=~MN{fJI/lP]-g@}"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.psurplus</field> </block> </value> <next> <block type="variables_set" id=":rlAB32E^@yPP9Jh?EMO"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> <value name="VALUE"> <block type="get_value" id="Q8pLDlgI~N(N2-6)X@Qu"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.ac.phase_1.power</field> </block> </value> <next> <block type="variables_set" id="t8-xB+K`%rr)x]%:Q5cN"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="2FaDMR/kS5K9d!j=`dK3"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Z`YZ!4FileGG?5VwaP-/"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="n0BqKn~p@qPw.Jvfrj,s"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> </block> </value> <next> <block type="variables_set" id="4Tr5Ir7F(Ev3Efr|@E*H"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="RKKaF/RtZ);]vqqj97*a"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Hn10{_s_+ZlGXOl3vO{|"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="kVMCmr*b?HxAYqylsi?L"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> </block> </value> <next> <block type="variables_set" id="dejmJ0t!5cZg__hv:[Hq"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="u5q01Of:/%F.]FEGPN+5"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="~8aP#Z{r?de:ZD.`$C=]"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="A,ujYC3wYHTnnQaq^#n("> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="IX4uAbcPK2@dQK8m7gRE"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="={}_9w;ehTNn!7z#[o0r"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="t-b4`);OO#}H]Psd~vT5"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="NC+yG[j1DD`!j=+,2DCE"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="S;7F2WSrE7BO,w96Fshf"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="pRLLpP[vUxm=$F^I`$os"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="Gb#b|PmIgZa9aJA,ZBUe"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="j6mylM`2I.Oz|DDS[[5I"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="F!R?WaeB.)czm;#@u|=;"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="]m^i]KOnX0IDtr=6Q_ue"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="aNf_:QS2!,XK80(W@Q`z"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="rDLh#-eGR_cdgvNxURXN"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="//Rx),f%pyif!qW8O/?G"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="?LqcJEM*O`:ze8n#sB,%"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id=",LE$HAztPz7d{;Y1Z}/E"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> <value name="B"> <block type="math_number" id="AUJDbs-mxx.Qerz_1HKv"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="95ivs[/M?xb+3w8LWXc|"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="5IVkP[pivf/s59Doiu{^"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="6$]Cc^(=0z[91BvjJ)[f"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> <value name="ADD1"> <block type="text" id="EAUN!kAdM4#A#Hj;jj9#"> <field name="TEXT">W Einspeisung</field> </block> </value> </block> </value> <next> <block type="control" id="Xo0;]Z,@st_sy8!+-d[j"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="C}VFJ(1BMyV6K~qZ[z}U"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> <next> <block type="debug" id="f[RCL|81#VRGt1xD,_Uc"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="bihp6q9q37F}rMi$c7IH"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="rsd8ksA|8eHPK]x!ft09"> <field name="TEXT">Reduziert auf benötigte Power in %: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="M?bQt/=]5_HZ;GWsjn0-"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id=":;*n|Cp@7JyXvbf=wU(!"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="T;blR^D!Ea/^uFlJB%dM"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <value name="B"> <block type="math_number" id="zKpY?TH[]zcDBUbbthRu"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="ED@#_h+}T[M/:FJyXmOv"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="V)D9tF]~185Y:s*:;;ei"> <field name="NUM">100</field> </block> </value> <next> <block type="debug" id="cN(|AZHex)JrxDaGN#(G"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="G}o=V)H7$D5Pdb##pG}N"> <field name="TEXT">Maximale Leistung</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="Wq?R@M;qWRq)8Xr.t*|P"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="hH5V`h:)tk12xl=-(t,="> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <next> <block type="debug" id="a|tJG#)_3^6V1QQ1%Afe"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="t@H48w^o4P/ue8;2:0gV"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="[!Rp0?MHhx)ginoW3:sz"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="cG)7s`N~=|ZU39]/p.or"> <field name="TEXT">Steigere Leistung auf </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=")n}=;RQE%[D~UG;0FzHU"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="S_oqhQRo%xLzTGqD_H0T"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="An^I.ZEXoUy8`{:Bg1@d"> <field name="TEXT">Batterie Spannung zu niedrig!</field> </shadow> </value> <next> <block type="control" id="(pa(+LpmB;pq0rd5DU%{"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">ham.0.Wohnzimmer-TV.Switch.On</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a#$){GZ8w|0di[@Ktws4"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="6hv2w66u%V}c3Ij`Q?pi"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="LmPU])Tk80,#%40`K:m4"> <field name="TEXT">Zeit ist außerhalb der Reglungszeit.</field> </shadow> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml> <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="?~:J:;gqC%-pt?=zNsH:">Sunrise</variable> <variable id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</variable> <variable id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</variable> <variable id="MQnX9mtF]{])2.DnhLPW">MaxPower</variable> <variable id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</variable> <variable id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</variable> <variable id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</variable> <variable id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</variable> <variable id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</variable> <variable id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</variable> <variable id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</variable> </variables> <block type="schedule" id="!P+uzJ#%y!_wHsKqo2~M" x="-754" y="-460"> <field name="SCHEDULE">*/30 * * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="~v~t5u;a_q(#kb+E{(FH"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sunrise</field> <value name="VALUE"> <block type="time_astro" id="Svgszky6QE2/10f8vck1"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> </block> </value> <next> <block type="variables_set" id="~/087{!i@]6[`rKxsw]j"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</field> <value name="VALUE"> <block type="time_astro" id="BO/%++Qd.ktL4PfK.r3?"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> </block> </value> <next> <block type="controls_if" id="xaOp|xXgB@BB44iq}cJ."> <mutation else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="Y8n@Iqzd:%qZbp|#P_v^"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">not between</field> <value name="START_TIME"> <shadow type="text" id="]-0N3DkP*7?ghtYzXwX!"> <field name="TEXT">12:00</field> </shadow> <block type="variables_get" id="!,6PYgrHnSxh#Evn[Yie"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sunset</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="J]$RnLG]3LLjr:SCc*G8"> <field name="TEXT">18:00</field> </shadow> <block type="variables_get" id="LMy)6-$QN(f3d9klxV`O"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sunrise</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="qPTGB%7j$nBgk,mbZ/af"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> <value name="VALUE"> <block type="get_value" id="^.6?$PaCCRu/*#r[*{H]"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <next> <block type="controls_if" id="h4=.njbcaX.PHi^w4^2%"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="0+yP5+K@+y/eDLGD|),L"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="^UW.Eb4:(|^2-EyE!3ml"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> </block> </value> <value name="B"> <block type="math_number" id="z5LXzg`S7a~SL*?;1.2Q"> <field name="NUM">24</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="4CEbW*aaD@NS0+c{-01V"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="sgkRf}?fd8+Jh5gEc2s-"> <mutation items="2"></mutation> <value name="ADD0"> <block type="get_value" id=".Y@_6KGO.t^nM~qZ:UYx"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <value name="ADD1"> <block type="text" id="`mTx1~Z~aX?u%kJ)gh%+"> <field name="TEXT">V. Batterie Spannung OK. :-)</field> </block> </value> </block> </value> <next> <block type="variables_set" id=".oH%b02AR59HC5*p$Agv"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> <value name="VALUE"> <block type="math_number" id="x*:T81?$YRY:}BeY0Nye"> <field name="NUM">300</field> </block> </value> <next> <block type="variables_set" id="Ih%sQzzK`!Ec=`tscEm-"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> <value name="VALUE"> <block type="get_value" id="E60zTd:yszZT-@pD[YB#"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.pregard</field> </block> </value> <next> <block type="variables_set" id="tw9^jo7eU.H_7z$vPD*P"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> <value name="VALUE"> <block type="get_value" id="%K9(=~MN{fJI/lP]-g@}"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.psurplus</field> </block> </value> <next> <block type="variables_set" id=":rlAB32E^@yPP9Jh?EMO"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> <value name="VALUE"> <block type="get_value" id="Q8pLDlgI~N(N2-6)X@Qu"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.ac.phase_1.power</field> </block> </value> <next> <block type="variables_set" id="t8-xB+K`%rr)x]%:Q5cN"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="2FaDMR/kS5K9d!j=`dK3"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Z`YZ!4FileGG?5VwaP-/"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="n0BqKn~p@qPw.Jvfrj,s"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> </block> </value> <next> <block type="variables_set" id="4Tr5Ir7F(Ev3Efr|@E*H"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="RKKaF/RtZ);]vqqj97*a"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Hn10{_s_+ZlGXOl3vO{|"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="kVMCmr*b?HxAYqylsi?L"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> </block> </value> <next> <block type="variables_set" id="dejmJ0t!5cZg__hv:[Hq"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="u5q01Of:/%F.]FEGPN+5"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="~8aP#Z{r?de:ZD.`$C=]"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="A,ujYC3wYHTnnQaq^#n("> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="IX4uAbcPK2@dQK8m7gRE"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="={}_9w;ehTNn!7z#[o0r"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="t-b4`);OO#}H]Psd~vT5"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="NC+yG[j1DD`!j=+,2DCE"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="S;7F2WSrE7BO,w96Fshf"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="pRLLpP[vUxm=$F^I`$os"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="Gb#b|PmIgZa9aJA,ZBUe"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="j6mylM`2I.Oz|DDS[[5I"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="F!R?WaeB.)czm;#@u|=;"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="]m^i]KOnX0IDtr=6Q_ue"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="aNf_:QS2!,XK80(W@Q`z"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="rDLh#-eGR_cdgvNxURXN"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="//Rx),f%pyif!qW8O/?G"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="?LqcJEM*O`:ze8n#sB,%"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id=",LE$HAztPz7d{;Y1Z}/E"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> <value name="B"> <block type="math_number" id="AUJDbs-mxx.Qerz_1HKv"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="95ivs[/M?xb+3w8LWXc|"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="5IVkP[pivf/s59Doiu{^"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="6$]Cc^(=0z[91BvjJ)[f"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> <value name="ADD1"> <block type="text" id="EAUN!kAdM4#A#Hj;jj9#"> <field name="TEXT">W Einspeisung</field> </block> </value> </block> </value> <next> <block type="control" id="Xo0;]Z,@st_sy8!+-d[j"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="C}VFJ(1BMyV6K~qZ[z}U"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> <next> <block type="debug" id="f[RCL|81#VRGt1xD,_Uc"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="bihp6q9q37F}rMi$c7IH"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="rsd8ksA|8eHPK]x!ft09"> <field name="TEXT">Reduziert auf benötigte Power in %: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="M?bQt/=]5_HZ;GWsjn0-"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id=":;*n|Cp@7JyXvbf=wU(!"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="T;blR^D!Ea/^uFlJB%dM"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <value name="B"> <block type="math_number" id="zKpY?TH[]zcDBUbbthRu"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="ED@#_h+}T[M/:FJyXmOv"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="V)D9tF]~185Y:s*:;;ei"> <field name="NUM">100</field> </block> </value> <next> <block type="debug" id="cN(|AZHex)JrxDaGN#(G"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="G}o=V)H7$D5Pdb##pG}N"> <field name="TEXT">Maximale Leistung</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="Wq?R@M;qWRq)8Xr.t*|P"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="hH5V`h:)tk12xl=-(t,="> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <next> <block type="debug" id="a|tJG#)_3^6V1QQ1%Afe"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="t@H48w^o4P/ue8;2:0gV"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="[!Rp0?MHhx)ginoW3:sz"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="cG)7s`N~=|ZU39]/p.or"> <field name="TEXT">Steigere Leistung auf </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=")n}=;RQE%[D~UG;0FzHU"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="S_oqhQRo%xLzTGqD_H0T"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="An^I.ZEXoUy8`{:Bg1@d"> <field name="TEXT">Batterie Spannung zu niedrig!</field> </shadow> </value> <next> <block type="control" id="(pa(+LpmB;pq0rd5DU%{"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">ham.0.Wohnzimmer-TV.Switch.On</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a#$){GZ8w|0di[@Ktws4"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="6hv2w66u%V}c3Ij`Q?pi"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="LmPU])Tk80,#%40`K:m4"> <field name="TEXT">Zeit ist außerhalb der Reglungszeit.</field> </shadow> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml>
-
@cptkrustenkäse müsst die Basis deiner Berechnungen nicht wie folgt sein:
Entweder du hast gerade Bezug oder du speist gerade ein.
Die Fälle solltest du nacheinander prüfen:- Falls A: Du hast Bezug. Das müsstest du den "aktuellen Bezug" + "Bezug aus Batterie" addieren. Das müsste immer passen, selbst wenn einer der beiden Werte 0 ist. Die Zahl die dabei herauskommt ist das was du neu als Leistung für die Einspeisung setzen muss. Du setzt die Leistung und bist fertig mit diesem Programmdurchlauf bis der nächste Trigger kommt.
- Sonst falls B: Du hast keinen Bezug, aber Stromeinspeisung. In diesem Fall musst du von deinem "Bezug aus Batterie" den Wert der aktuellen "Stromeinspeisung" abziehen. Das Ergebnis wiederum muss dann neu gesetzt werden, und fertig ist der Programmdurchlauf.
- Sonst: musst du nichts tun
Um das ganze herum die Prüfung ob deine Batteriespannung noch ausreicht.
-
@bananajoe said in OpenDTU / SunnyHomeManager2 Ansteuerung, finde Fehler nicht:
- Falls A: Du hast Bezug. Das müsstest du den "aktuellen Bezug" + "Bezug aus Batterie" addieren. Das müsste immer passen, selbst wenn einer der beiden Werte 0 ist. Die Zahl die dabei herauskommt ist das was du neu als Leistung für die Einspeisung setzen muss. Du setzt die Leistung und bist fertig mit diesem Programmdurchlauf bis der nächste Trigger kommt.
Hey
. Das hatte ich nach meinem Verständnis auch so gemacht, mit dieser Regel:
Strombezug ( Watt aus dem Öffentlichen Stromnetz bezogen wird ) + Bezug aus der Batterie ( Watt aus der Batterie ) = Neue Benötige Watt aus der Batterie.
- Sonst falls B: Du hast keinen Bezug, aber Stromeinspeisung. In diesem Fall musst du von deinem "Bezug aus Batterie" den Wert der aktuellen "Stromeinspeisung" abziehen. Das Ergebnis wiederum muss dann neu gesetzt werden, und fertig ist der Programmdurchlauf.
Bezug Aus Batterie ( Watt aus Batterie ) minus Stromeinspeisung ( derzeitige Watt die ins Stromnetz eingespeist werden ) = Neue Watt Wert der aus der Batterie gezogen wird.
Das Problem ist halt das die Regel dazu führt das er wie gesagt wenn 160 W aus der Batterie gezogen werden, er 40 W davon einspeist, er nicht um -40 W auf die benötigten 120W geht sondern um -80 W auf 80 W. Und man dann wieder aus dem Netz Strom bezieht.
Ich hab die Regel jetzt so umgeändert das er der Wert der aktuellen Stromeinspeißung geteilt durch 2 nimmt.
Das ist zwar nur ein workaround, aber es funktioniert. Die Schwankungen belaufen sich jetzt im einstelligen Watt bereich damit kann ich leben.Hier noch der Code falls zukünftig auch jemand sein Hoymiles OpenDTU mit dem Sunnyhomemanger2 von SMA steuern möchte und per Google hierher findet:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="UJ`JGN{Ezb$K7jJ[4P}j">Sonnenuntergang</variable> <variable id="?~:J:;gqC%-pt?=zNsH:">Sonnenaufgang</variable> <variable id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</variable> <variable id="MQnX9mtF]{])2.DnhLPW">MaxPower</variable> <variable id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</variable> <variable id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</variable> <variable id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</variable> <variable id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</variable> <variable id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</variable> <variable id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</variable> <variable id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</variable> </variables> <block type="schedule" id="!P+uzJ#%y!_wHsKqo2~M" x="-754" y="-460"> <field name="SCHEDULE">*/30 * * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="~/087{!i@]6[`rKxsw]j"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sonnenuntergang</field> <value name="VALUE"> <block type="time_astro" id="BO/%++Qd.ktL4PfK.r3?"> <field name="TYPE">sunset</field> <field name="OFFSET">-20</field> </block> </value> <next> <block type="variables_set" id="~v~t5u;a_q(#kb+E{(FH"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sonnenaufgang</field> <value name="VALUE"> <block type="time_astro" id="Svgszky6QE2/10f8vck1"> <field name="TYPE">sunrise</field> <field name="OFFSET">20</field> </block> </value> <next> <block type="controls_if" id="xaOp|xXgB@BB44iq}cJ."> <mutation else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="Y8n@Iqzd:%qZbp|#P_v^"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">not between</field> <value name="START_TIME"> <shadow type="text" id="]-0N3DkP*7?ghtYzXwX!"> <field name="TEXT">12:00</field> </shadow> <block type="variables_get" id="LMy)6-$QN(f3d9klxV`O"> <field name="VAR" id="?~:J:;gqC%-pt?=zNsH:">Sonnenaufgang</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="J]$RnLG]3LLjr:SCc*G8"> <field name="TEXT">18:00</field> </shadow> <block type="variables_get" id="!,6PYgrHnSxh#Evn[Yie"> <field name="VAR" id="UJ`JGN{Ezb$K7jJ[4P}j">Sonnenuntergang</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="qPTGB%7j$nBgk,mbZ/af"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> <value name="VALUE"> <block type="get_value" id="^.6?$PaCCRu/*#r[*{H]"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <next> <block type="controls_if" id="h4=.njbcaX.PHi^w4^2%"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="0+yP5+K@+y/eDLGD|),L"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="^UW.Eb4:(|^2-EyE!3ml"> <field name="VAR" id=":U;.Z4:pYNy(TwM9X-dL">BattSpannung</field> </block> </value> <value name="B"> <block type="math_number" id="z5LXzg`S7a~SL*?;1.2Q"> <field name="NUM">25</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="4CEbW*aaD@NS0+c{-01V"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="sgkRf}?fd8+Jh5gEc2s-"> <mutation items="2"></mutation> <value name="ADD0"> <block type="get_value" id=".Y@_6KGO.t^nM~qZ:UYx"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.dc.input_1.voltage</field> </block> </value> <value name="ADD1"> <block type="text" id="`mTx1~Z~aX?u%kJ)gh%+"> <field name="TEXT">V. Batterie Spannung OK. :-)</field> </block> </value> </block> </value> <next> <block type="variables_set" id=".oH%b02AR59HC5*p$Agv"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> <value name="VALUE"> <block type="math_number" id="x*:T81?$YRY:}BeY0Nye"> <field name="NUM">300</field> </block> </value> <next> <block type="variables_set" id="Ih%sQzzK`!Ec=`tscEm-"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> <value name="VALUE"> <block type="get_value" id="E60zTd:yszZT-@pD[YB#"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.pregard</field> </block> </value> <next> <block type="variables_set" id="tw9^jo7eU.H_7z$vPD*P"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> <value name="VALUE"> <block type="math_arithmetic" id="T([Z*q{6;EEzb,]@433i"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="U;^?-%_`dlTocx]3yW,s"> <field name="NUM">1</field> </shadow> <block type="get_value" id="%K9(=~MN{fJI/lP]-g@}"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.psurplus</field> </block> </value> <value name="B"> <shadow type="math_number" id="GcDSz9-~iiHMrbBZICA1"> <field name="NUM">2</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id=":rlAB32E^@yPP9Jh?EMO"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> <value name="VALUE"> <block type="get_value" id="Q8pLDlgI~N(N2-6)X@Qu"> <field name="ATTR">val</field> <field name="OID">opendtu.0.112184712142.ac.phase_1.power</field> </block> </value> <next> <block type="variables_set" id="4Tr5Ir7F(Ev3Efr|@E*H"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="RKKaF/RtZ);]vqqj97*a"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Hn10{_s_+ZlGXOl3vO{|"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="kVMCmr*b?HxAYqylsi?L"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> </block> </value> <next> <block type="variables_set" id="t8-xB+K`%rr)x]%:Q5cN"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> <value name="VALUE"> <block type="math_arithmetic" id="2FaDMR/kS5K9d!j=`dK3"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="2FEk%?jHI2)Hvf4}p|*;"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Z`YZ!4FileGG?5VwaP-/"> <field name="VAR" id="AcYpB0Ty+wVObL7=Y.a.">Strombezug</field> </block> </value> <value name="B"> <shadow type="math_number" id="+10nRI6/x]hugF{/lmxM"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="n0BqKn~p@qPw.Jvfrj,s"> <field name="VAR" id="1}Q0686mMw0ZGk)e+r?(">Bezug aus Batterie</field> </block> </value> </block> </value> <next> <block type="variables_set" id="dejmJ0t!5cZg__hv:[Hq"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="u5q01Of:/%F.]FEGPN+5"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="~8aP#Z{r?de:ZD.`$C=]"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="A,ujYC3wYHTnnQaq^#n("> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="IX4uAbcPK2@dQK8m7gRE"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="={}_9w;ehTNn!7z#[o0r"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="t-b4`);OO#}H]Psd~vT5"> <field name="VAR" id="le#}gR{6G.yhW=x|6pS8">BenötigterBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="NC+yG[j1DD`!j=+,2DCE"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="S;7F2WSrE7BO,w96Fshf"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> <value name="VALUE"> <block type="math_round" id="pRLLpP[vUxm=$F^I`$os"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="Gb#b|PmIgZa9aJA,ZBUe"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="j6mylM`2I.Oz|DDS[[5I"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="F!R?WaeB.)czm;#@u|=;"> <field name="NUM">100</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="^9s!!bN4`IP8Eh[6|b9K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="]m^i]KOnX0IDtr=6Q_ue"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id=":waUW@O*#aU+#:wMBPaU"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="aNf_:QS2!,XK80(W@Q`z"> <field name="VAR" id="6.|9?VrvdY1ZC1)AW$gj">ÜberschüssigerBattStrom</field> </block> </value> <value name="B"> <shadow type="math_number" id="o[@1j].F1O.sf]*UDUH8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="rDLh#-eGR_cdgvNxURXN"> <field name="VAR" id="MQnX9mtF]{])2.DnhLPW">MaxPower</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="controls_if" id="//Rx),f%pyif!qW8O/?G"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="?LqcJEM*O`:ze8n#sB,%"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id=",LE$HAztPz7d{;Y1Z}/E"> <field name="VAR" id="hJ!EC%M7$t22D:pF[*||">Stromeinspeisung</field> </block> </value> <value name="B"> <block type="math_number" id="AUJDbs-mxx.Qerz_1HKv"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="95ivs[/M?xb+3w8LWXc|"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="5IVkP[pivf/s59Doiu{^"> <mutation items="2"></mutation> <value name="ADD0"> <block type="get_value" id="@`QRPyg$fa5]%OV?q6y7"> <field name="ATTR">val</field> <field name="OID">sma-em.0.3008816738.psurplus</field> </block> </value> <value name="ADD1"> <block type="text" id="EAUN!kAdM4#A#Hj;jj9#"> <field name="TEXT">W Einspeisung</field> </block> </value> </block> </value> <next> <block type="control" id="Xo0;]Z,@st_sy8!+-d[j"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="C}VFJ(1BMyV6K~qZ[z}U"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> <next> <block type="debug" id="f[RCL|81#VRGt1xD,_Uc"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="gJ2g2W6e~P]Kjk4#rhy7"> <field name="TEXT">Spannung OK. :)</field> </shadow> <block type="text_join" id="bihp6q9q37F}rMi$c7IH"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="rsd8ksA|8eHPK]x!ft09"> <field name="TEXT">Reduziere Leistung in % auf </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="M?bQt/=]5_HZ;GWsjn0-"> <field name="VAR" id=")=|pV++_~3l_ua:=Nc,S">ÜBattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id=":;*n|Cp@7JyXvbf=wU(!"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="T;blR^D!Ea/^uFlJB%dM"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <value name="B"> <block type="math_number" id="zKpY?TH[]zcDBUbbthRu"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="ED@#_h+}T[M/:FJyXmOv"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="V)D9tF]~185Y:s*:;;ei"> <field name="NUM">100</field> </block> </value> <next> <block type="debug" id="cN(|AZHex)JrxDaGN#(G"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="G}o=V)H7$D5Pdb##pG}N"> <field name="TEXT">Maximale Leistung</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="Wq?R@M;qWRq)8Xr.t*|P"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">opendtu.0.112184712142.power_control.limit_nonpersistent_relative</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="hH5V`h:)tk12xl=-(t,="> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> <next> <block type="debug" id="a|tJG#)_3^6V1QQ1%Afe"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="t@H48w^o4P/ue8;2:0gV"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="[!Rp0?MHhx)ginoW3:sz"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="cG)7s`N~=|ZU39]/p.or"> <field name="TEXT">Steigere Leistung in % auf </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=")n}=;RQE%[D~UG;0FzHU"> <field name="VAR" id="Wrd/;pC@_X$oJ_N_Xu/K">BattStromInProzent</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="S_oqhQRo%xLzTGqD_H0T"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="An^I.ZEXoUy8`{:Bg1@d"> <field name="TEXT">Batterie Spannung zu niedrig!</field> </shadow> </value> <next> <block type="control" id="(pa(+LpmB;pq0rd5DU%{"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">ham.0.Wohnzimmer-TV.Switch.On</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a#$){GZ8w|0di[@Ktws4"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="timeouts_wait" id="JTJ;EcL~czl25EC5.t$I"> <field name="DELAY">60</field> <field name="UNIT">min</field> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> <statement name="ELSE"> <block type="debug" id="6hv2w66u%V}c3Ij`Q?pi"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="LmPU])Tk80,#%40`K:m4"> <field name="TEXT">Zeit ist außerhalb der Reglungszeit.</field> </shadow> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml>