NEWS
OpenDTU-onBattery Blockly DPL Ein/Aus
-
Hier das Blockly
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="L=IeP_E{`;v.^#v:zZ)2">jsonObj</variable> <variable id="+-}`+im{K3Jj+XIEO6#j">attr</variable> <variable id="ulw#]uAEr8ao^|N_NWy}">val</variable> <variable id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</variable> <variable id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</variable> <variable id="2|vbm;5buC6^$eogp=fe">urlDPLstate</variable> <variable id="PWsI)BqL)EeZPzj!8-VY">set</variable> <variable id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</variable> <variable id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</variable> <variable id="_+8y375~59B=8rd!@Ae%">jsonObjekt</variable> <variable type="timeout" id="timeout">timeout</variable> <variable id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</variable> <variable id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</variable> <variable id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</variable> <variable id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</variable> <variable id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</variable> <variable id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</variable> </variables> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="213" y="-137"> <mutation statements="false"> <arg name="jsonObj" varid="L=IeP_E{`;v.^#v:zZ)2"></arg> <arg name="attr" varid="+-}`+im{K3Jj+XIEO6#j"></arg> <arg name="val" varid="ulw#]uAEr8ao^|N_NWy}"></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="g{c,O//*067~CDT{26F+" x="212" y="-112"> <field name="COMMENT">OpenDTUonBattery&#10;DPL Ein/Aus</field> <next> <block type="on_ext" id="MpdxhvC3:):%?cL5ChV-"> <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="j)L11f:Db#X;sEL6awg/"> <field name="oid">0_userdata.0.openDTUoB.dplEinAus</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="wPs7.T(3#lmg-Q#YnMcz"> <field name="COMMENT">IP von OpenDTUonBattery:</field> <next> <block type="variables_set" id="xiC72+QQD{FQ44VC6wQn"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> <value name="VALUE"> <block type="text" id="3|rd+!6W]T02z}tGd1/m"> <field name="TEXT">192.168.49.xxx</field> </block> </value> <next> <block type="comment" id="8!|A_f5hyHJr/:f!|;r."> <field name="COMMENT">OpenDTUonBattery Passwort:</field> <next> <block type="variables_set" id="ItJFflir$91[$;pF5+MA"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> <value name="VALUE"> <block type="text" id="xYm]l*(;=w@0xJQnWi5-"> <field name="TEXT">fdgxxxdcf</field> </block> </value> <next> <block type="comment" id="8ezl|ED@6X29f4k@:.2H"> <field name="COMMENT">----</field> <next> <block type="variables_set" id="!#IE.`!)HPf,NcPW*miy"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> <value name="VALUE"> <block type="text_join" id="F#[x6:MOpP{a#hljyq@2"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="!@~5;?O8`oIO%oN]bLJa"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="SFT0:Zq378qj5]2?a5#b"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="5}ok+uklC%b/F}gtZr`^"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="C|ac)ks!*i8cZS5zb!0?"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="!=iiY$6m(O#=Q|km-7W1"> <field name="TEXT">/api/powerlimiter/config</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Nw*-3DKlvV=)l.++!yg%"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> <value name="VALUE"> <block type="text_join" id="b3+b3^R@5s5Vbpj^o9!6"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="%UJkDROf_mMO^oE4EKW."> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <value name="ADD1"> <block type="text" id="o}*[n$;A?-]x1P{Ppan."> <field name="TEXT"> -d 'data=</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1%5eOCEM.zYy[-sZ0a43"> <field name="VAR" id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</field> <value name="VALUE"> <block type="text_join" id="B,v7UaJQkq-DSzv41b;v"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id=";4j$FAn0X}CSE_D5:/kl"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Ea#Og5Jr^hwL!_Oh-[Ua"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="kBsI#4)FR#3@EAh.=@b]"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id=",/9?^Tx*?hC1YP`-X]37"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="p5zvA0V{e$4V$#_9gWcY"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> </block> </value> <next> <block type="variables_set" id="u|60ca%8U|+rvrL1*bdK"> <field name="VAR" id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</field> <value name="VALUE"> <block type="text" id="`Z^Zv4qi(GN;drYs.f6I"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> <next> <block type="comment" id="Y+nX-p}*xExWw]O`OX~{"> <field name="COMMENT">aktueller DPL state:</field> <next> <block type="exec" id="I~3.fAPDzJ[1T(TlzoOT"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="9;-TT-}BY,qROECr/9_6"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="i4]srTbBS]Jm}Z^t,,i^"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="U*PNhv3v$WIWPSb|ja,I"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> <value name="VALUE"> <block type="convert_json2object" id="y.{-xr4=@LsO?lm{BV16"> <value name="VALUE"> <block type="exec_result" id="6ho:XZ{%G?n+B=|[OsSQ"> <field name="ATTR">result</field> </block> </value> </block> </value> <next> <block type="comment" id="A(14glg}PvpJG@9qX7Z+"> <field name="COMMENT">DPL Ein:</field> <next> <block type="controls_if" id=")aeo4TK/:D$bt5(cFhVN"> <value name="IF0"> <block type="logic_compare" id="%pI.k62s._dcfZnb8SHC"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="C-u,UgBdHv4sZCblY)(F"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="e..27D@{cN0JPJc_@bv;"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="D9g{#*qgs_-7rfz6|TYD"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="yi4H-8|bl|J[{ecr@w?*"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="/1aiKrRmt}{2sRQ`BE^S"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="]!TrP#dnQ%e`r1%@n;)0"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="exec" id="xWQm84D2~+;KrfUenNP|"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?#1pjgc[4w-Nbot8xQpL"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";wn*ZeQHpIf@a_40]mk$"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="`s4:$VMpnCx?$#E/lH89"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="akzUA)PF0iBQcIE,ZBTo"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="tazI8QS$S%YmkBw8,!R]"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="zV97]OnS?/IjoV1xAl_T"> <field name="COMMENT">DPL Aus:</field> <next> <block type="controls_if" id="7{aiQa33_g$QnlPw!:;F"> <value name="IF0"> <block type="logic_compare" id="XYHuB8ZNE3]RuqS}0zLa"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="kRJjzY0xkd07ZrzDPb1?"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{2pCy)Ah-nq3V.,{DVo1"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="-Hz0vX5GM=t[9OHH8]Wg"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="v[6xm8C%Otou%c3=g710"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="tL?JD.@HaQSk5`{9Wm]{"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="WMimixsaaPP)fhHu2.J$"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="exec" id="/p+Uv~V#hIePApTb=KTR"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?fTh]i~D]=Ue}GsE8^;i"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="$!],od*U?4dNiG;_YIzl"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="|pyw%?Kwve~3iciql_#f"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="z0~!%^yv(pHWcQpw)5``"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="/g9Zs!_,BY#!LKzHEF`/"> <field name="TEXT">'</field> </block> </value> </block> </value> <next> <block type="timeouts_cleartimeout" id="v:wbTQNv4m:UTlyfw:n8"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="}0V3y4lcY{PIE#!~V6bg"> <field name="NAME">timeout</field> <field name="DELAY">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="variables_set" id="s*[FyKXx,06qe75!Ql(H"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="2sNdysyulvZDNM6yeP8H"> <field name="TEXT">114191</field> </block> </value> <next> <block type="variables_set" id="~/@Acy]v_1,b~:Bn[L_+"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="f;}RPMU,=+?6Q7VrPX[$"> <field name="TEXT">114192</field> </block> </value> <next> <block type="variables_set" id="XI+~|V]7r!Kau}Xh8`cs"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="4o,d$])#Rr|W-+g=8#5r"> <field name="TEXT">114172</field> </block> </value> <next> <block type="comment" id="pHVW34|})@%~DNJ(tX3f"> <field name="COMMENT">Limit_100%</field> <next> <block type="variables_set" id="YGofdo8=[F6.o!Qp^XF+"> <field name="VAR" id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="zv%(}:f|zmP5HG:fD09("> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="XAm?]VyB/h{~mRaM1bsf"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="%XVNmv0mDVw(k}BQGk_?"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="^p-]`Q~oVv2Eh[045E)c"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="T{Tp#*68~o$/f%-3@4=!"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id=")l]/Nhc,h|Rg:#*Ka0Q("> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="-iy+n+|)dc=K/8NqL~*E"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id=".ZX[eqqM@Hf-6HHnLe[X"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="itIS@8Y63,ktSrsgW5.F"> <field name="VAR" id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="*I6(R5oBcHQuA=dX6mSv"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="oUpBy-8zKLYpodhxSIf9"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="QuBN*njkx@{j1+c[+ZmZ"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id=";pv}`0?1q%g!#_s5~/y%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="o[)lM|Pmbvb7OKUi*NuS"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="V8FZuQaNdG6{3d83*Vfy"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="qi!d0-X1Z-#=8-deCnKw"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="^C*6RVCe.]c[_:It59N)"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="y-50t.$8~@?)JdWuw9L}"> <field name="VAR" id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id=":Z}TZDl]Vrik0giB}n.P"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="/x5W!c:L8z/%#/u$QS5C"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="jMWXlHgbFT7ud{NSR#)m"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="}Er+;ReC#[21_HkBUgT%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="({)=]?)Sq8cbZ{J_6:(R"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="a!m?UC,|z(Z2L1w[V]?;"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="d10hz@@3$|l=(.i3!yCU"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="ghyHOj#I.GZdwt}/N4.V"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="exec" id="z~uv`gd4.T-c?jLD!w`q"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="{M)j=M5AjT,.J`1?|4n4"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="2pE#.amP4,xu4{2Q,D%{"> <field name="VAR" id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</field> </block> </value> <next> <block type="exec" id="{]ZETu!ip1~2tjg$bQ`P"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id=",tNN#:Wd`$Q^xxlYDxuS"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="jo++g^rXVk`{euOClG%?"> <field name="VAR" id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</field> </block> </value> <next> <block type="exec" id="%(7_80L^M(jkeI`nd-}u"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id=",tNN#:Wd`$Q^xxlYDxuS"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="2wu`wtHRf/32+V=%3s+9"> <field name="VAR" id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml>
Das scheint zu funktionieren.
-
@beowolf
was genau funktioniert und was nicht?um darauf aufzubauen, richtig angeordnet:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="L=IeP_E{`;v.^#v:zZ)2">jsonObj</variable> <variable id="+-}`+im{K3Jj+XIEO6#j">attr</variable> <variable id="ulw#]uAEr8ao^|N_NWy}">val</variable> <variable id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</variable> <variable id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</variable> <variable id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</variable> <variable id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</variable> <variable id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</variable> <variable id="2|vbm;5buC6^$eogp=fe">urlDPLstate</variable> <variable id="PWsI)BqL)EeZPzj!8-VY">set</variable> <variable id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</variable> <variable id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</variable> <variable id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</variable> <variable id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</variable> <variable id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</variable> <variable id="_+8y375~59B=8rd!@Ae%">jsonObjekt</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="213" y="-137"> <mutation statements="false"> <arg name="jsonObj" varid="L=IeP_E{`;v.^#v:zZ)2"></arg> <arg name="attr" varid="+-}`+im{K3Jj+XIEO6#j"></arg> <arg name="val" varid="ulw#]uAEr8ao^|N_NWy}"></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="g{c,O//*067~CDT{26F+" x="212" y="-112"> <field name="COMMENT">OpenDTUonBattery&#10;DPL Ein/Aus</field> <next> <block type="comment" id="wPs7.T(3#lmg-Q#YnMcz"> <field name="COMMENT">IP von OpenDTUonBattery:</field> <next> <block type="variables_set" id="xiC72+QQD{FQ44VC6wQn"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> <value name="VALUE"> <block type="text" id="3|rd+!6W]T02z}tGd1/m"> <field name="TEXT">192.168.49.xxx</field> </block> </value> <next> <block type="comment" id="8!|A_f5hyHJr/:f!|;r."> <field name="COMMENT">OpenDTUonBattery Passwort:</field> <next> <block type="variables_set" id="ItJFflir$91[$;pF5+MA"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> <value name="VALUE"> <block type="text" id="xYm]l*(;=w@0xJQnWi5-"> <field name="TEXT">fdgxxxdcf</field> </block> </value> <next> <block type="comment" id="(Mkj3qMZry-SXoV#TG-e"> <field name="COMMENT">serial HM</field> <next> <block type="variables_set" id="s*[FyKXx,06qe75!Ql(H"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="2sNdysyulvZDNM6yeP8H"> <field name="TEXT">114191</field> </block> </value> <next> <block type="variables_set" id="~/@Acy]v_1,b~:Bn[L_+"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="f;}RPMU,=+?6Q7VrPX[$"> <field name="TEXT">114192</field> </block> </value> <next> <block type="variables_set" id="XI+~|V]7r!Kau}Xh8`cs"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="4o,d$])#Rr|W-+g=8#5r"> <field name="TEXT">114172</field> </block> </value> <next> <block type="comment" id="8ezl|ED@6X29f4k@:.2H"> <field name="COMMENT">----</field> <next> <block type="variables_set" id="!#IE.`!)HPf,NcPW*miy"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> <value name="VALUE"> <block type="text_join" id="F#[x6:MOpP{a#hljyq@2"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="!@~5;?O8`oIO%oN]bLJa"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="SFT0:Zq378qj5]2?a5#b"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="5}ok+uklC%b/F}gtZr`^"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="C|ac)ks!*i8cZS5zb!0?"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="!=iiY$6m(O#=Q|km-7W1"> <field name="TEXT">/api/powerlimiter/config</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Nw*-3DKlvV=)l.++!yg%"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> <value name="VALUE"> <block type="text_join" id="b3+b3^R@5s5Vbpj^o9!6"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="%UJkDROf_mMO^oE4EKW."> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <value name="ADD1"> <block type="text" id="o}*[n$;A?-]x1P{Ppan."> <field name="TEXT"> -d 'data=</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1%5eOCEM.zYy[-sZ0a43"> <field name="VAR" id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</field> <value name="VALUE"> <block type="text_join" id="B,v7UaJQkq-DSzv41b;v"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id=";4j$FAn0X}CSE_D5:/kl"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Ea#Og5Jr^hwL!_Oh-[Ua"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="kBsI#4)FR#3@EAh.=@b]"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id=",/9?^Tx*?hC1YP`-X]37"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="p5zvA0V{e$4V$#_9gWcY"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> </block> </value> <next> <block type="variables_set" id="u|60ca%8U|+rvrL1*bdK"> <field name="VAR" id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</field> <value name="VALUE"> <block type="text" id="`Z^Zv4qi(GN;drYs.f6I"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> <next> <block type="variables_set" id="YGofdo8=[F6.o!Qp^XF+"> <field name="VAR" id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="zv%(}:f|zmP5HG:fD09("> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="XAm?]VyB/h{~mRaM1bsf"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="%XVNmv0mDVw(k}BQGk_?"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="^p-]`Q~oVv2Eh[045E)c"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="T{Tp#*68~o$/f%-3@4=!"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id=")l]/Nhc,h|Rg:#*Ka0Q("> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="-iy+n+|)dc=K/8NqL~*E"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id=".ZX[eqqM@Hf-6HHnLe[X"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="itIS@8Y63,ktSrsgW5.F"> <field name="VAR" id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="*I6(R5oBcHQuA=dX6mSv"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="oUpBy-8zKLYpodhxSIf9"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="QuBN*njkx@{j1+c[+ZmZ"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id=";pv}`0?1q%g!#_s5~/y%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="o[)lM|Pmbvb7OKUi*NuS"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="V8FZuQaNdG6{3d83*Vfy"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="qi!d0-X1Z-#=8-deCnKw"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="^C*6RVCe.]c[_:It59N)"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="y-50t.$8~@?)JdWuw9L}"> <field name="VAR" id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id=":Z}TZDl]Vrik0giB}n.P"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="/x5W!c:L8z/%#/u$QS5C"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="jMWXlHgbFT7ud{NSR#)m"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="}Er+;ReC#[21_HkBUgT%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="({)=]?)Sq8cbZ{J_6:(R"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="a!m?UC,|z(Z2L1w[V]?;"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="d10hz@@3$|l=(.i3!yCU"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="ghyHOj#I.GZdwt}/N4.V"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="on_ext" id="MpdxhvC3:):%?cL5ChV-"> <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="j)L11f:Db#X;sEL6awg/"> <field name="oid">0_userdata.0.openDTUoB.dplEinAus</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="Y+nX-p}*xExWw]O`OX~{"> <field name="COMMENT">aktueller DPL state:</field> <next> <block type="exec" id="I~3.fAPDzJ[1T(TlzoOT"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="9;-TT-}BY,qROECr/9_6"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="i4]srTbBS]Jm}Z^t,,i^"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="U*PNhv3v$WIWPSb|ja,I"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> <value name="VALUE"> <block type="convert_json2object" id="y.{-xr4=@LsO?lm{BV16"> <value name="VALUE"> <block type="exec_result" id="6ho:XZ{%G?n+B=|[OsSQ"> <field name="ATTR">result</field> </block> </value> </block> </value> <next> <block type="comment" id="A(14glg}PvpJG@9qX7Z+"> <field name="COMMENT">DPL Ein:</field> <next> <block type="controls_if" id=")aeo4TK/:D$bt5(cFhVN"> <value name="IF0"> <block type="logic_compare" id="%pI.k62s._dcfZnb8SHC"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="C-u,UgBdHv4sZCblY)(F"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="e..27D@{cN0JPJc_@bv;"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="D9g{#*qgs_-7rfz6|TYD"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="yi4H-8|bl|J[{ecr@w?*"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="/1aiKrRmt}{2sRQ`BE^S"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="]!TrP#dnQ%e`r1%@n;)0"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="exec" id="xWQm84D2~+;KrfUenNP|"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?#1pjgc[4w-Nbot8xQpL"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";wn*ZeQHpIf@a_40]mk$"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="`s4:$VMpnCx?$#E/lH89"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="akzUA)PF0iBQcIE,ZBTo"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="tazI8QS$S%YmkBw8,!R]"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="zV97]OnS?/IjoV1xAl_T"> <field name="COMMENT">DPL Aus:</field> <next> <block type="controls_if" id="7{aiQa33_g$QnlPw!:;F"> <value name="IF0"> <block type="logic_compare" id="XYHuB8ZNE3]RuqS}0zLa"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="kRJjzY0xkd07ZrzDPb1?"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{2pCy)Ah-nq3V.,{DVo1"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="-Hz0vX5GM=t[9OHH8]Wg"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="v[6xm8C%Otou%c3=g710"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="tL?JD.@HaQSk5`{9Wm]{"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="WMimixsaaPP)fhHu2.J$"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="exec" id="/p+Uv~V#hIePApTb=KTR"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?fTh]i~D]=Ue}GsE8^;i"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="$!],od*U?4dNiG;_YIzl"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="|pyw%?Kwve~3iciql_#f"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="z0~!%^yv(pHWcQpw)5``"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="/g9Zs!_,BY#!LKzHEF`/"> <field name="TEXT">'</field> </block> </value> </block> </value> <next> <block type="timeouts_cleartimeout" id="v:wbTQNv4m:UTlyfw:n8"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="}0V3y4lcY{PIE#!~V6bg"> <field name="NAME">timeout</field> <field name="DELAY">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="comment" id="pHVW34|})@%~DNJ(tX3f"> <field name="COMMENT">Limit_100%</field> <next> <block type="exec" id="z~uv`gd4.T-c?jLD!w`q"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="{M)j=M5AjT,.J`1?|4n4"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="2pE#.amP4,xu4{2Q,D%{"> <field name="VAR" id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</field> </block> </value> <next> <block type="exec" id="{]ZETu!ip1~2tjg$bQ`P"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id=",tNN#:Wd`$Q^xxlYDxuS"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="jo++g^rXVk`{euOClG%?"> <field name="VAR" id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</field> </block> </value> <next> <block type="exec" id="%(7_80L^M(jkeI`nd-}u"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id=",tNN#:Wd`$Q^xxlYDxuS"> <field name="TEXT">pwd</field> </shadow> <block type="variables_get" id="2wu`wtHRf/32+V=%3s+9"> <field name="VAR" id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
Wenn Du mir Dein(e) Ziele) nennst, kommen wir evtl. schneller und einfacher zu einer Lösung.
-
Über Datenpunkt steuerbar muss es sein oder genügt explizte Anforderung?
-
Umschalten DPL Ein/Aus soll wie oft am Tag geschehen?
Normalerweise 1x am Tag einschalten und 1x am Tag ausschalten (wegen Bypass?)
Beim Ausschalten muss 100% Leistung wieder eingestellt sein bzw. werden. -
Muss es Blockly sein oder darf es JS sein?
JS in iob sandbox ist schon eingeschränkt, Blockly noch mehr und umständlich.
Mit workaround klappt's bestimmt, dauert nur länger bis wir das umgesetzt bekommen.
Blockly mit async macht es unmöglich schwer mit sync Auswertung API auf Pending, deshalb timeout.
PS: Beachten, dass beim import von Blockly die Timeout-stop und Timeout nicht stimmen, das ist ein Fehler von iob Blockly. Immer kontrollieren und richtig auswählen, vor dem speichern und testen.
-
-
Das Ziel ist es, das ich bzw. meine Frau (WAF ist wichtig) mittags wenn die Sonne schön scheint, den DPL ausschalten kann. Also alles, was von den Panels kommt soll zu 100% in das Hausnetz gehen.
Das was ich festgestellt hatte ist, wenn der Herd mittags an ist, ist das ja keine konstante Last. Die Kochplatten gehen an und wieder aus usw.. In der Zeit regelt sich der DPL um den Verstand.
Deshalb brauche in eine Kachel (iQontrol) um mit einem Fingertipp den DPL auszuschalten.
Mit dem Blockly was ich oben eingestellt hatte funktioniert es jetzt.
Ich teste gleich mal dein geändertes.
-
@beowolf
Habe den Fehler im OpenDTU-OnBattery code gefunden.Verhalten und Ablauf wenn DPL ausgeschaltet wird (enabled:false):
Die Konfiguration wird zwar gespeichert, aber:
Der PowerLimiter macht keinen expliziten „Reset“ der Limits auf 100%.
Stattdessen hängt es davon ab, ob im LimitManager gerade noch ein alter Limit-Wert aktiv ist.Deshalb passiert, dass manchmal noch der alte Wert aus der aktiven Regelung stehen bleibt (z. B. 60 %), manchmal springt es auf 100 %.
Warum dieses Verhalten?
Im Code sieht man, dass beim Abschalten (enabled=false) die Logik nicht aktiv eine Rücksetzung triggert.
Das bedeutet praktisch:Beim Einschalten → aktiver Eingriff in die Limits.
Beim Ausschalten → kein Eingriff → Limit bleibt zufällig auf dem letzten Stand.Lösung:
Firmware patchen (sauberste Lösung)
Im onAdminPost oder PowerLimiter::disable() explizit ein Setzen auf 100 % Limit einbauen, z. B.:src/WebApi_powerlimiter.cpp, angepasst für onAdminPost()
void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest *request, JsonDocument &root) { if (root.containsKey("enabled")) { PowerLimiter.Enabled = root["enabled"]; PowerLimiter.saveConfig(); if (!PowerLimiter.Enabled) { // Wenn PowerLimiter deaktiviert wird, Limit für alle bekannten Wechselrichter auf 100% setzen for (auto &invCfg : PowerLimiter.config.inverters) { LimitManager.setLimit(invCfg.serial, 100, LimitType::PERCENT); } } } if (root.containsKey("verbose_logging")) { PowerLimiter.config.VerboseLogging = root["verbose_logging"]; } if (root.containsKey("solar_passthrough_enabled")) { PowerLimiter.config.SolarPassthroughEnabled = root["solar_passthrough_enabled"]; } if (root.containsKey("conduction_losses")) { PowerLimiter.config.ConductionLosses = root["conduction_losses"]; } if (root.containsKey("battery_always_use_at_night")) { PowerLimiter.config.BatteryAlwaysUseAtNight = root["battery_always_use_at_night"]; } if (root.containsKey("target_power_consumption")) { PowerLimiter.config.TargetPowerConsumption = root["target_power_consumption"]; } if (root.containsKey("target_power_consumption_hysteresis")) { PowerLimiter.config.TargetPowerConsumptionHysteresis = root["target_power_consumption_hysteresis"]; } if (root.containsKey("base_load_limit")) { PowerLimiter.config.BaseLoadLimit = root["base_load_limit"]; } if (root.containsKey("ignore_soc")) { PowerLimiter.config.IgnoreSoc = root["ignore_soc"]; } if (root.containsKey("battery_soc_start_threshold")) { PowerLimiter.config.BatterySocStartThreshold = root["battery_soc_start_threshold"]; } if (root.containsKey("battery_soc_stop_threshold")) { PowerLimiter.config.BatterySocStopThreshold = root["battery_soc_stop_threshold"]; } if (root.containsKey("voltage_start_threshold")) { PowerLimiter.config.VoltageStartThreshold = root["voltage_start_threshold"]; } if (root.containsKey("voltage_stop_threshold")) { PowerLimiter.config.VoltageStopThreshold = root["voltage_stop_threshold"]; } if (root.containsKey("voltage_load_correction_factor")) { PowerLimiter.config.VoltageLoadCorrectionFactor = root["voltage_load_correction_factor"]; } if (root.containsKey("full_solar_passthrough_soc")) { PowerLimiter.config.FullSolarPassthroughSoc = root["full_solar_passthrough_soc"]; } if (root.containsKey("full_solar_passthrough_start_voltage")) { PowerLimiter.config.FullSolarPassthroughStartVoltage = root["full_solar_passthrough_start_voltage"]; } if (root.containsKey("full_solar_passthrough_stop_voltage")) { PowerLimiter.config.FullSolarPassthroughStopVoltage = root["full_solar_passthrough_stop_voltage"]; } if (root.containsKey("inverter_serial_for_dc_voltage")) { PowerLimiter.config.InverterSerialForDcVoltage = root["inverter_serial_for_dc_voltage"].as<String>(); } if (root.containsKey("inverter_channel_id_for_dc_voltage")) { PowerLimiter.config.InverterChannelIdForDcVoltage = root["inverter_channel_id_for_dc_voltage"]; } if (root.containsKey("inverter_restart_hour")) { PowerLimiter.config.InverterRestartHour = root["inverter_restart_hour"]; } if (root.containsKey("total_upper_power_limit")) { PowerLimiter.config.TotalUpperPowerLimit = root["total_upper_power_limit"]; } if (root.containsKey("inverters")) { for (JsonObject inv : root["inverters"].as<JsonArray>()) { String serial = inv["serial"]; auto *cfg = PowerLimiter.findInverterConfig(serial); if (cfg) { if (inv.containsKey("is_governed")) cfg->IsGoverned = inv["is_governed"]; if (inv.containsKey("is_behind_power_meter")) cfg->IsBehindPowerMeter = inv["is_behind_power_meter"]; if (inv.containsKey("power_source")) cfg->PowerSource = inv["power_source"]; if (inv.containsKey("use_overscaling_to_compensate_shading")) cfg->UseOverscalingToCompensateShading = inv["use_overscaling_to_compensate_shading"]; if (inv.containsKey("lower_power_limit")) cfg->LowerPowerLimit = inv["lower_power_limit"]; if (inv.containsKey("upper_power_limit")) cfg->UpperPowerLimit = inv["upper_power_limit"]; if (inv.containsKey("scaling_threshold")) cfg->ScalingThreshold = inv["scaling_threshold"]; } } } PowerLimiter.saveConfig(); request->send(200, "application/json", "{\"success\":true}"); }
Effekt der Änderung:
-
Wenn enabled:true: alles wie bisher.
-
Wenn enabled:false: alle in config.inverters gelisteten WR bekommen sofort ein Limit von 100 %.
Danach reicht ein einziger curl-DPL-Aufruf enabled:false.
Habe bei github ein issue erstellt, in der Hoffnung, dass das künftig berücksichtigt wird.
Dann würde der Code ohne Timeout und Limit setzen funktionieren, so wie es sein sollte.
3 Alternativen:
-
API-Seite belassen (Workaround), wie bisher hier, mit timeout und mit Limit danach setzen.
-
oder:
kleine Watchdog-Logik einbauen: Wenn false, prüft ein Timer alle paar Sekunden, ob Limits ≠ 100% sind, und setzt diese bei Bedarf dann zurück auf 100%. -
oder
nach DPL ausschalten: Wechselrichter Neustart durchführen, dann gehen non-presistente Werte auch verloren.
Fazit:
Dass das Limit nicht immer auf 100 % springt, liegt daran, dass die Firmware beim Abschalten keine Limit-Rücksetzung vornimmt. Es bleibt der „letzte gesetzte Wert“ bestehen, bis jemand ihn überschreibt.Vielleicht wird das ja mal geändert.
-
-
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Das Ziel ist es, das ich bzw. meine Frau (WAF ist wichtig) mittags wenn die Sonne schön scheint, den DPL ausschalten kann. Also alles, was von den Panels kommt soll zu 100% in das Hausnetz gehen.
Das was ich festgestellt hatte ist, wenn der Herd mittags an ist, ist das ja keine konstante Last. Die Kochplatten gehen an und wieder aus usw.. In der Zeit regelt sich der DPL um den Verstand.
Deshalb brauche in eine Kachel (iQontrol) um mit einem Fingertipp den DPL auszuschalten.
Mit dem Blockly was ich oben eingestellt hatte funktioniert es jetzt.
Ich teste gleich mal dein geändertes.
Hat mir keine Ruhe gelassen und denke, dass ich nun die Lösung für "solarbetriebene" Wechselrichter habe
Firmware mit Blockly-Vorlage
edit:
Ab hier, folgende (ursprüngliche) mqtt-Lösung im Spoiler bleibt nur aus historischen Gründen oder
für die, die es mit mqtt versuchen möchten.Hinweis: Funktioniert mit Einschränkungen.
Pending (Verzögerungszeit) bleibt, bei Änderung in WebUI wird automatsich einfach auf Mode:0 geschaltet.
Bei einem (un-)gewollten Neustart der OpenDTUoB oder WiFi-Verbindungsstörungen, -Abbrüche wird auch immer Mode:0 automatisch gesetzt usw.
-
Hallo maxclaudi,
ich habe jetzt deine Version probiert.
Funktioniert zu 100%. Danke dafür.
ABER
Ich nehme die "Version" mit dem kleinem Skript.
Eine zusätzliche mptt Instanz macht alles nicht gerade übersichtlicher im ioBroker. Vom Umschaltverhalten konnte ich nur einen kleinen Unterschied feststellen. Meine WR gehen auch mit der mqtt-Version nach einem kleinen Moment auf das minimale Leistungslimit um dann danach auf 100% zu gehen.
Grüße
Manfred -
@beowolf
Richtig, leider.
Ist nicht meine Version, eher die vorhergesehene mqtt-Version, die ich versucht habe für jeden verständlich zu erklären.Meine Version ist die, die Du nun verwendest mit Timeout.
Die Version ist quasi nicht gern gesehen und auch nicht vorgesehen.
Macht nichts anderes als geloggte Befehle (Web-GUI) zu senden.Zu der vorgesehenen mqtt-Version:
wenn man die verwendet gibt es zu viele Einschränkungen.
Außerdem macht ein Neustart Schwierigkeiten oder/und auch evtl. Störungen z. B. Verbindungsproblem (Wifi oder was auch immer).
Auch hier wird zwar dann auf mode:0 gestellt ABER auch wieder ein Pending.
Was einen direkten Setzen des Wertes ins Nirvana laufen lässt.Bedeutet: Wenn man ein script oder blockly hat, das bei einem Neustart der DTU sofort auf 2 setzen möchte, das nicht möglich ist.
Es muss auch wieder eine Zeit vergangen sein.Habe darauf auf github hingewiesen., aber... naja, abwarten.
Bedauerlich, weil ich die DTU nachts, täglich neu starten lasse(n möchte).
Soll nicht ununterbrochen 24/7 laufen (aus Eigenerfahrung nicht so gut).Auch wenn man in der Web-Gui was ändert, wird gewollt Mode:0 gesetzt.
Mag ich auch nicht.Wenn da von Entwicklerseite OpenDTU-OnBattery nichts geändert wird, dann werde ich das sauber in js umsetzen (polling auf state, mit Blockly nicht bzw. sehr umständlich möglich) oder (falls mal mehr Muße und Zeit vorhanden) die Firmware patchen, dass bei DPL "aus" statt unvorhergesehenes oder unterstes Limit bei Allen Wechselrichtern 100% gesetzt werden.
Bis dahin ist mir meine curl Version auch lieber und funktioniert mit Timeout besser als mqtt.
-
OpenDTU-OnBattery gepatched.
Einzige Änderung:
wenn DPL ausgeschaltet wird, dann wird nur bei "solarbetriebenen" Wechselrichtern das Limt auf maximales Limit gestellt.
"Batteriebetriebene" Wechselrichter verhalten sich wie immer (default, wie Original-Firmware).Funktioniert und läuft seit ca knapp 2h durch.
Einschränkungen:
-
In den Funktionen: keine
-
Systeminformationen:
Firmwareversion / Git Hash: 25.06.11-patch_at_DplOff_solar-Limit_maximum__maxclaudi -
Firmware-Aktualisierung: wurde entfernt.
kosmetisch und beeinträchtigt keine Funktionen.
Möchte nichts ändern, was nicht sein muss oder verwirrt.Firmware kann (wie alle anderen auch) über Web-Oberfläche geflasht werden.
Zurück auf Original flashen funktioniert und ist auch jederzeit über Web-Firmware-Aktualisierung möglich.Damit kann die DPL-Steuerung aus- und eingeschaltet werden, das zusätzliche 100%-Limit setzen nach DPL Deaktivierung entfällt.
Bei Interesse bitte angeben welche Firmware.bin Du möchtest.
Zusätzlich (nicht auf dem Bild): opendtufusionV2_poe
Releases: neueste: 2025.06.11 oder Vorgänger: 2025.04.17 -
-
Vielen Dank für die Arbeit.
Ich habe im Moment die 2025.06.11 generic_esp32s3 drauf.
Die DPL-Steuerung erfolgt aber weiterhin über das Skript, richtig?
Grüße
-
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Ich habe im Moment die 2025.06.11 generic_esp32s3 drauf.
opendtu-onbattery-2025.06.11-generic_esp32s3.bin
hast bekommenDie DPL-Steuerung erfolgt aber weiterhin über das Skript, richtig?
ja, bei deaktivierten OpenDTU-OnBattery-DPL.
nein, wenn OpenDTU-OnBattery-DPL aktiv ist (dann übernimmt ja ODTUoB die DPL-Steuerung)Die einzige Änderung ist, dass bei DPL-Deaktivierung von OpenDTU-OnBattery
"nur" die "solarbetriebenen" Wechselrichter auf maximales Limit gesetzt werden (statt Minimum).
Alles andere bleibt gleich.Bedeutet: Wenn OpenDTU-OnBattery-DPL aktiviert war und abgeschaltet wird, egal ob
- per OpenDTU-OnBattery WebUi
- per script (curl)
dann wird maximales Limit gesetzt.
Wenn OpenDTUoB-DPL Steuerung deaktiv ist und nicht anderweitig per iobroker oder Zendure usw. eine DPL- oder Leistungs-Steuerung des/der Wechselrichter stattfindet, dann wird mit Limit: maximum des/der Wechselrichter die Leistung durchgegeben.
-
Das ist ja Super. Die Umschaltung erfolgt wirklich direkt. Vielen, vielen Dank dafür.
Im Skript darf doch nur die 100% Geschichte raus. Alles andere muß so bleiben.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="L=IeP_E{`;v.^#v:zZ)2">jsonObj</variable> <variable id="+-}`+im{K3Jj+XIEO6#j">attr</variable> <variable id="ulw#]uAEr8ao^|N_NWy}">val</variable> <variable id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</variable> <variable id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</variable> <variable id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</variable> <variable id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</variable> <variable id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</variable> <variable id="yU6fmm*ctEK;X.gC*Cng">WR4 HM-1000_serial</variable> <variable id="2|vbm;5buC6^$eogp=fe">urlDPLstate</variable> <variable id="PWsI)BqL)EeZPzj!8-VY">set</variable> <variable id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</variable> <variable id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</variable> <variable id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</variable> <variable id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</variable> <variable id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</variable> <variable id="h/:^mLws30u))2ZimsSs">WR4 HM-1000_curl</variable> <variable id="_+8y375~59B=8rd!@Ae%">jsonObjekt</variable> </variables> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="213" y="-137"> <mutation statements="false"> <arg name="jsonObj" varid="L=IeP_E{`;v.^#v:zZ)2"></arg> <arg name="attr" varid="+-}`+im{K3Jj+XIEO6#j"></arg> <arg name="val" varid="ulw#]uAEr8ao^|N_NWy}"></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="g{c,O//*067~CDT{26F+" x="212" y="-112"> <field name="COMMENT">OpenDTUonBattery&#10;DPL Ein/Aus</field> <next> <block type="comment" id="wPs7.T(3#lmg-Q#YnMcz"> <field name="COMMENT">IP von OpenDTUonBattery:</field> <next> <block type="variables_set" id="xiC72+QQD{FQ44VC6wQn"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> <value name="VALUE"> <block type="text" id="3|rd+!6W]T02z}tGd1/m"> <field name="TEXT">192.168.xx.xxx</field> </block> </value> <next> <block type="comment" id="8!|A_f5hyHJr/:f!|;r."> <field name="COMMENT">OpenDTUonBattery Passwort:</field> <next> <block type="variables_set" id="ItJFflir$91[$;pF5+MA"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> <value name="VALUE"> <block type="text" id="xYm]l*(;=w@0xJQnWi5-"> <field name="TEXT">Beowolf503588</field> </block> </value> <next> <block type="comment" id="(Mkj3qMZry-SXoV#TG-e"> <field name="COMMENT">serial HM</field> <next> <block type="variables_set" id="s*[FyKXx,06qe75!Ql(H"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="2sNdysyulvZDNM6yeP8H"> <field name="TEXT">11419xx</field> </block> </value> <next> <block type="variables_set" id="~/@Acy]v_1,b~:Bn[L_+"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="f;}RPMU,=+?6Q7VrPX[$"> <field name="TEXT">11419xx</field> </block> </value> <next> <block type="variables_set" id="XI+~|V]7r!Kau}Xh8`cs"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="4o,d$])#Rr|W-+g=8#5r"> <field name="TEXT">11417xx</field> </block> </value> <next> <block type="variables_set" id="4L=wN^,g:oz:OQikS*6@"> <field name="VAR" id="yU6fmm*ctEK;X.gC*Cng">WR4 HM-1000_serial</field> <value name="VALUE"> <block type="text" id="2jRM6}4{ndN1e8lQqLzw"> <field name="TEXT">11418xx</field> </block> </value> <next> <block type="comment" id="8ezl|ED@6X29f4k@:.2H"> <field name="COMMENT">----</field> <next> <block type="variables_set" id="!#IE.`!)HPf,NcPW*miy"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> <value name="VALUE"> <block type="text_join" id="F#[x6:MOpP{a#hljyq@2"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="!@~5;?O8`oIO%oN]bLJa"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="SFT0:Zq378qj5]2?a5#b"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="5}ok+uklC%b/F}gtZr`^"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="C|ac)ks!*i8cZS5zb!0?"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="!=iiY$6m(O#=Q|km-7W1"> <field name="TEXT">/api/powerlimiter/config</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Nw*-3DKlvV=)l.++!yg%"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> <value name="VALUE"> <block type="text_join" id="b3+b3^R@5s5Vbpj^o9!6"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="%UJkDROf_mMO^oE4EKW."> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <value name="ADD1"> <block type="text" id="o}*[n$;A?-]x1P{Ppan."> <field name="TEXT"> -d 'data=</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1%5eOCEM.zYy[-sZ0a43"> <field name="VAR" id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</field> <value name="VALUE"> <block type="text_join" id="B,v7UaJQkq-DSzv41b;v"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id=";4j$FAn0X}CSE_D5:/kl"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Ea#Og5Jr^hwL!_Oh-[Ua"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="kBsI#4)FR#3@EAh.=@b]"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id=",/9?^Tx*?hC1YP`-X]37"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="p5zvA0V{e$4V$#_9gWcY"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> </block> </value> <next> <block type="variables_set" id="u|60ca%8U|+rvrL1*bdK"> <field name="VAR" id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</field> <value name="VALUE"> <block type="text" id="`Z^Zv4qi(GN;drYs.f6I"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> <next> <block type="variables_set" id="YGofdo8=[F6.o!Qp^XF+"> <field name="VAR" id="fb8(CemIXpTZO:5?3eho">WR1 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="zv%(}:f|zmP5HG:fD09("> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="XAm?]VyB/h{~mRaM1bsf"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="%XVNmv0mDVw(k}BQGk_?"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="^p-]`Q~oVv2Eh[045E)c"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="T{Tp#*68~o$/f%-3@4=!"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id=")l]/Nhc,h|Rg:#*Ka0Q("> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="-iy+n+|)dc=K/8NqL~*E"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">WR1 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id=".ZX[eqqM@Hf-6HHnLe[X"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="itIS@8Y63,ktSrsgW5.F"> <field name="VAR" id="b;`WR[z]dikov!wE@,}j">WR2 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id="*I6(R5oBcHQuA=dX6mSv"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="oUpBy-8zKLYpodhxSIf9"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="QuBN*njkx@{j1+c[+ZmZ"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id=";pv}`0?1q%g!#_s5~/y%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="o[)lM|Pmbvb7OKUi*NuS"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="V8FZuQaNdG6{3d83*Vfy"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="qi!d0-X1Z-#=8-deCnKw"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">WR2 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="^C*6RVCe.]c[_:It59N)"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="y-50t.$8~@?)JdWuw9L}"> <field name="VAR" id="~^lm~JreXhZ81X6{yXWg">WR3 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id=":Z}TZDl]Vrik0giB}n.P"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="/x5W!c:L8z/%#/u$QS5C"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="jMWXlHgbFT7ud{NSR#)m"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="}Er+;ReC#[21_HkBUgT%"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="({)=]?)Sq8cbZ{J_6:(R"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="a!m?UC,|z(Z2L1w[V]?;"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="d10hz@@3$|l=(.i3!yCU"> <field name="VAR" id="4eljrs#2Fi];mvA0WV6L">WR3 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="ghyHOj#I.GZdwt}/N4.V"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="variables_set" id="4x#LN@l+TQ!Lkp[H-5/t"> <field name="VAR" id="h/:^mLws30u))2ZimsSs">WR4 HM-1000_curl</field> <value name="VALUE"> <block type="text_join" id=",RCm`Tm3,)jX(r6IS8=C"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="br?7@jk..QlqS}d/LU(."> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="B,=zC-eX!PZK{])4[XLZ"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="y*;OJo}j:4VGR}oKsP+G"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="1t9*`a:OlrR;a!bh!MYQ"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="KTYq]v}[P~p)G@UtO@#v"> <field name="TEXT">/api/limit/config -d 'data={"serial":"</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="v+/,]aZX,R+_{1jSnOWR"> <field name="VAR" id="yU6fmm*ctEK;X.gC*Cng">WR4 HM-1000_serial</field> </block> </value> <value name="ADD6"> <block type="text" id="S/6V?%a]sOs$UZ`Jbmqu"> <field name="TEXT">","limit_value":100,"limit_type":1}'</field> </block> </value> </block> </value> <next> <block type="on_ext" id="MpdxhvC3:):%?cL5ChV-"> <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="j)L11f:Db#X;sEL6awg/"> <field name="oid">0_userdata.0.openDTUoB.dplEinAus</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="Y+nX-p}*xExWw]O`OX~{"> <field name="COMMENT">aktueller DPL state:</field> <next> <block type="exec" id="I~3.fAPDzJ[1T(TlzoOT"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="9;-TT-}BY,qROECr/9_6"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="i4]srTbBS]Jm}Z^t,,i^"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="U*PNhv3v$WIWPSb|ja,I"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> <value name="VALUE"> <block type="convert_json2object" id="y.{-xr4=@LsO?lm{BV16"> <value name="VALUE"> <block type="exec_result" id="6ho:XZ{%G?n+B=|[OsSQ"> <field name="ATTR">result</field> </block> </value> </block> </value> <next> <block type="comment" id="A(14glg}PvpJG@9qX7Z+"> <field name="COMMENT">DPL Ein:</field> <next> <block type="controls_if" id=")aeo4TK/:D$bt5(cFhVN"> <value name="IF0"> <block type="logic_compare" id="%pI.k62s._dcfZnb8SHC"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="C-u,UgBdHv4sZCblY)(F"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="e..27D@{cN0JPJc_@bv;"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="D9g{#*qgs_-7rfz6|TYD"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="yi4H-8|bl|J[{ecr@w?*"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="/1aiKrRmt}{2sRQ`BE^S"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="]!TrP#dnQ%e`r1%@n;)0"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="exec" id="xWQm84D2~+;KrfUenNP|"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?#1pjgc[4w-Nbot8xQpL"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";wn*ZeQHpIf@a_40]mk$"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="`s4:$VMpnCx?$#E/lH89"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="akzUA)PF0iBQcIE,ZBTo"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="tazI8QS$S%YmkBw8,!R]"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="zV97]OnS?/IjoV1xAl_T"> <field name="COMMENT">DPL Aus:</field> <next> <block type="controls_if" id="7{aiQa33_g$QnlPw!:;F"> <value name="IF0"> <block type="logic_compare" id="XYHuB8ZNE3]RuqS}0zLa"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="kRJjzY0xkd07ZrzDPb1?"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{2pCy)Ah-nq3V.,{DVo1"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="-Hz0vX5GM=t[9OHH8]Wg"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="v[6xm8C%Otou%c3=g710"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="tL?JD.@HaQSk5`{9Wm]{"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="WMimixsaaPP)fhHu2.J$"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="exec" id="/p+Uv~V#hIePApTb=KTR"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?fTh]i~D]=Ue}GsE8^;i"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="$!],od*U?4dNiG;_YIzl"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="|pyw%?Kwve~3iciql_#f"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="z0~!%^yv(pHWcQpw)5``"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="/g9Zs!_,BY#!LKzHEF`/"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
Alles funktioniert sogar mit meinen "getunten" HM WR. Ich habe ja die HM-600 und die HM-800 mit dem Hoymiles 1000W Dongle (Flole-Inverter-Tool) auf 1000 Watt erweitert. Die laufen damit super und vollkommen ohne Probleme.
Grüße
-
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Das ist ja Super. Die Umschaltung erfolgt wirklich direkt. Vielen, vielen Dank dafür.
Im Skript darf doch nur die 100% Geschichte raus.
ja
, alle Limit Setzungen können entfernt werden
Es reicht mit der modFirmware aus, nur noch OpenDTU-OnBattery-DPL ein- und auszuschalten.
Habe das Blockly für Dich angepasst:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="L=IeP_E{`;v.^#v:zZ)2">jsonObj</variable> <variable id="+-}`+im{K3Jj+XIEO6#j">attr</variable> <variable id="ulw#]uAEr8ao^|N_NWy}">val</variable> <variable id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</variable> <variable id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</variable> <variable id="2|vbm;5buC6^$eogp=fe">urlDPLstate</variable> <variable id="PWsI)BqL)EeZPzj!8-VY">set</variable> <variable id="_+8y375~59B=8rd!@Ae%">jsonObjekt</variable> </variables> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="237" y="-137"> <mutation statements="false"> <arg name="jsonObj" varid="L=IeP_E{`;v.^#v:zZ)2"></arg> <arg name="attr" varid="+-}`+im{K3Jj+XIEO6#j"></arg> <arg name="val" varid="ulw#]uAEr8ao^|N_NWy}"></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="g{c,O//*067~CDT{26F+" x="253" y="-97"> <field name="COMMENT">OpenDTUonBattery&#10;DPL Ein/Aus</field> <next> <block type="comment" id="wPs7.T(3#lmg-Q#YnMcz"> <field name="COMMENT">IP von OpenDTUonBattery:</field> <next> <block type="variables_set" id="xiC72+QQD{FQ44VC6wQn"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> <value name="VALUE"> <block type="text" id="3|rd+!6W]T02z}tGd1/m"> <field name="TEXT">192.168.xxx.xxx</field> </block> </value> <next> <block type="comment" id="8!|A_f5hyHJr/:f!|;r."> <field name="COMMENT">OpenDTUonBattery Passwort:</field> <next> <block type="variables_set" id="ItJFflir$91[$;pF5+MA"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> <value name="VALUE"> <block type="text" id="xYm]l*(;=w@0xJQnWi5-"> <field name="TEXT">topSecret</field> </block> </value> <next> <block type="comment" id="8ezl|ED@6X29f4k@:.2H"> <field name="COMMENT">----</field> <next> <block type="variables_set" id="!#IE.`!)HPf,NcPW*miy"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> <value name="VALUE"> <block type="text_join" id="F#[x6:MOpP{a#hljyq@2"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="!@~5;?O8`oIO%oN]bLJa"> <field name="TEXT">curl -u "admin:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="SFT0:Zq378qj5]2?a5#b"> <field name="VAR" id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</field> </block> </value> <value name="ADD2"> <block type="text" id="5}ok+uklC%b/F}gtZr`^"> <field name="TEXT">" http://</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="C|ac)ks!*i8cZS5zb!0?"> <field name="VAR" id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</field> </block> </value> <value name="ADD4"> <block type="text" id="!=iiY$6m(O#=Q|km-7W1"> <field name="TEXT">/api/powerlimiter/config</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Nw*-3DKlvV=)l.++!yg%"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> <value name="VALUE"> <block type="text_join" id="b3+b3^R@5s5Vbpj^o9!6"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="%UJkDROf_mMO^oE4EKW."> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <value name="ADD1"> <block type="text" id="o}*[n$;A?-]x1P{Ppan."> <field name="TEXT"> -d 'data=</field> </block> </value> </block> </value> <next> <block type="on_ext" id="MpdxhvC3:):%?cL5ChV-"> <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="j)L11f:Db#X;sEL6awg/"> <field name="oid">0_userdata.0.openDTUoB.dplEinAus</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="Y+nX-p}*xExWw]O`OX~{"> <field name="COMMENT">aktueller DPL state:</field> <next> <block type="exec" id="I~3.fAPDzJ[1T(TlzoOT"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="9;-TT-}BY,qROECr/9_6"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="i4]srTbBS]Jm}Z^t,,i^"> <field name="VAR" id="2|vbm;5buC6^$eogp=fe">urlDPLstate</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="U*PNhv3v$WIWPSb|ja,I"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> <value name="VALUE"> <block type="convert_json2object" id="y.{-xr4=@LsO?lm{BV16"> <value name="VALUE"> <block type="exec_result" id="6ho:XZ{%G?n+B=|[OsSQ"> <field name="ATTR">result</field> </block> </value> </block> </value> <next> <block type="comment" id="A(14glg}PvpJG@9qX7Z+"> <field name="COMMENT">DPL Ein:</field> <next> <block type="controls_if" id=")aeo4TK/:D$bt5(cFhVN"> <value name="IF0"> <block type="logic_multi_and" id="|=G?gJHQ5k}cxFqoR^;z"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="%pI.k62s._dcfZnb8SHC"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="C-u,UgBdHv4sZCblY)(F"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="e..27D@{cN0JPJc_@bv;"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="wdDtzwPpJLC8TB-GUhOw"> <field name="OP">EQ</field> <value name="A"> <block type="get_attr" id="1Dn=g_RFPxjHuXA-brk3"> <value name="PATH"> <shadow type="text" id="(Z$IBe;(S`S6T]qVdh]y"> <field name="TEXT">enabled</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="c1DWkSsJA%t1U3IxR_0J"> <field name="OID">Object ID</field> </shadow> <block type="variables_get" id="taltqfd{-^G(i!T3k2,w"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="_3!+w8pZWtXff|:t(Q)b"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="D9g{#*qgs_-7rfz6|TYD"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="yi4H-8|bl|J[{ecr@w?*"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="/1aiKrRmt}{2sRQ`BE^S"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="]!TrP#dnQ%e`r1%@n;)0"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="exec" id="xWQm84D2~+;KrfUenNP|"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?#1pjgc[4w-Nbot8xQpL"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";wn*ZeQHpIf@a_40]mk$"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="`s4:$VMpnCx?$#E/lH89"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="akzUA)PF0iBQcIE,ZBTo"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="tazI8QS$S%YmkBw8,!R]"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="zV97]OnS?/IjoV1xAl_T"> <field name="COMMENT">DPL Aus:</field> <next> <block type="controls_if" id="7{aiQa33_g$QnlPw!:;F"> <value name="IF0"> <block type="logic_multi_and" id="H^iZ|8)TJame`y1Ep3dR"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="XYHuB8ZNE3]RuqS}0zLa"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="kRJjzY0xkd07ZrzDPb1?"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{2pCy)Ah-nq3V.,{DVo1"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="o9%Kp_kK#y%JO.kFX@M9"> <field name="OP">EQ</field> <value name="A"> <block type="get_attr" id="[vl5Bz_`8%$:LaC|q(*Q"> <value name="PATH"> <shadow type="text" id="TVh_L%j|;TO7i+p`+Y1L"> <field name="TEXT">enabled</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="c1DWkSsJA%t1U3IxR_0J"> <field name="OID">Object ID</field> </shadow> <block type="variables_get" id="=rqG=O%Vhnwcc`uSo:x?"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="^OU`S]xO|8j_[Hvd:k`w"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callcustomnoreturn" id="-Hz0vX5GM=t[9OHH8]Wg"> <mutation name="change"> <arg name="jsonObj"></arg> <arg name="attr"></arg> <arg name="val"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="v[6xm8C%Otou%c3=g710"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> <value name="ARG1"> <block type="text" id="tL?JD.@HaQSk5`{9Wm]{"> <field name="TEXT">enabled</field> </block> </value> <value name="ARG2"> <block type="logic_boolean" id="WMimixsaaPP)fhHu2.J$"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="exec" id="/p+Uv~V#hIePApTb=KTR"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Y[J#ti:!)V_p[~D/~=BP"> <field name="TEXT">pwd</field> </shadow> <block type="text_join" id="?fTh]i~D]=Ue}GsE8^;i"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="$!],od*U?4dNiG;_YIzl"> <field name="VAR" id="PWsI)BqL)EeZPzj!8-VY">set</field> </block> </value> <value name="ADD1"> <block type="convert_object2json" id="|pyw%?Kwve~3iciql_#f"> <field name="PRETTIFY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="z0~!%^yv(pHWcQpw)5``"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="/g9Zs!_,BY#!LKzHEF`/"> <field name="TEXT">'</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
die zusätzliche UND Vergleichung ist nicht nötig.
Ist aber sicherer, schöner und üblicher.
Wenn aus irgendeinem Grund schon DPL-State stimmt, muss er auch nicht geändert werden.
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Alles funktioniert sogar mit meinen "getunten" HM WR. Ich habe ja die HM-600 und die HM-800 mit dem Hoymiles 1000W Dongle (Flole-Inverter-Tool) auf 1000 Watt erweitert. Die laufen damit super und vollkommen ohne Probleme.
denke wir haben unser Ziel erreicht, viel Spaß
-
@maxclaudi sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
die zusätzliche UND Vergleichung ist nicht nötig.
Ist aber sicherer, schöner und üblicher.Was meinst du damit?
-
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
@maxclaudi sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
die zusätzliche UND Vergleichung ist nicht nötig.
Ist aber sicherer, schöner und üblicher.Was meinst du damit?
das hier:
das zusätzliche UND vergleicht den empfangenen Status von OpenDTUoB-DPL ob er er in diesem Beispiel ausgeschaltet ist. Nur dann wird der Befehl ausgeführt und OpenDTUoB-DPL eingeschaltet. Sollte DPL schon eingeschaltet sein, dann wird nichts gemacht.
Kann man auch weg lassen und nur auf Wert=wahr (OpenDTUoB.dplEinAus wurde geändert) prüfen.
Ohne das zusätzliche: UND auf Atrribut enabled=false prüfen.
Dann wird OpenDTUoB immer eingeschaltet, auch wenn DPL schon an sein sollte.Warum? Vielleicht hat man ja einen Fehler in einem oder mehreren scripts.
So wird verhindert, dass wenn openDTUoB-DPL schon in dem DPL-aktiv oder DPL-deaktiv state ist, nicht erneut geschaltet wird.
Was an ist muss nicht noch einmal an geschaltet werden usw.optional, bleibt Dir überlassen
-
habe eine fork OpenDTU-OnBattery-LimitPatch veröffentlicht.
Es gibt 2 Versionen zur Auswahl:
Version: maxLimit:
Beim Deaktivieren vom Dynamic-Power-Limiter werden die "solarbetriebenen" Wechselrichter" immer auf maximales Limit gesetzt (statt wie im normalen Repo auf minimales Limit).
"batteriebetriebene" Wechselrichter: wie bisher im Original (werden abgeschaltet).Alle anderen Funktionen bleiben gleich.
Version: switchLimit
Hier kann mit Schalter im WebUi gewählt werden.
Betrifft nur "solarbetriebene Wechselrichter".
Ist der Schalter aktiviert, dann wird beim Deaktivieren vom Dynamic Power Limiter auf maximales Limit gesetzt.Ist der Schalter deaktiviert, dann wird beim Deaktivieren vom DPL auf minimales Limit gesetzt.
Das Umschalten: Deaktiv oder Aktiv muss auch gespeichert werden, wie DPL ein/aus.
Das macht der vorhandene "Speichern" Button für Alle Einstellungen vom DPL inkl. der Einstellung des neuen Schalters.Für mich ist die Version mit Schalter zwar nicht nötig, aber vielleicht gibt es jemand der die Möglichkeit zum Umschalten haben möchte
Fertige Firmware.Bin zum flashen
- über WebUi Firmware-Aktualisierung also Firmware hochladen
- oder zum direkten flashen beim ersten mal als factory.bin
für die meisten bzw. üblichen Boards sind vorhanden.
Damit lässt sich die Blockly-Vorlage zum ein-/auschalten des DPL über einen Datenpunkt gut verwenden.
Genug gearbeitet, jetzt haben Alle was davon.
viel Spaß