NEWS
OpenDTU-onBattery Blockly DPL Ein/Aus
-
einfacher:
Dynamic Power Limiter nur über einen Datenpunkt ein- und ausschalten.
Wird der DPL über ein Script ausgeschaltet, behält der Inverter das letzte Limit (non persistent) bei.
Deshalb wird im folgenden Blockly beim Auschalten des DPL auch das Limit wieder auf 100% gesetzt.
Der DPL kann einfach per Datenpunkt in einem Blockly ein- oder ausgeschaltet werden.
Dazu wird der Datenpunkt zum Einschalten aktualisiert mit wahr.
Zum Ausschalten mit falsch.
Im Blockly sind 2 Inverter zur DPL Steuerung berücksichtigt.
Wird nur 1 Inverter zur DPL Steuerung verwendet, kann die Variable und der Block gelöscht werden oder einfach bei beiden Variablen die gleiche Seriennummer eintragen.
Falls doch mal später 2 Inverter für DPL aktiviert werden sollen.Seriennummer werden nur nach dem Ausschalten verwendet, damit der/die Inverter wieder volle Leistung liefern.
Werte werden nur non-persistent gesetzt, wie bei der DPL-Steuerung.
Für das Script wurde manuell 1 Verzeichnis und 1 Datenpunkt angelegt:
Verzeichnis:
openDTUoB
0_userdata.0.Datenpunkte.openDTUoBDatenpunkt:
dplEinAus
"type": "boolean"
0_userdata.0.Datenpunkte.openDTUoB.dplEinAus
Vor dem Ausführen des Scripts müsen folgende Eintragungen vorgenommen werden:
IP OpenDTUon Battery
Password
1te Seriennummer des Inverters für die DPL-Steuerung
2te Seriennummer des Inverters, der auch DPL steuert (bei nur einem aktivierten Inverter einfach die gleiche Seriennummer vom ersten Inverter eintragen).
Blockly:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="P.,=V-_lWMTIt*,^9bWa">jsonObj</variable> <variable id="?Ekt8|,iPfa0uAPY)N%A">attr</variable> <variable id="y`qH:gKyqipx04VGZ@;=">val</variable> <variable id="T[fn@X+yakzmBpi9]n*E">openDTUonBatteryIP</variable> <variable id="nh}jM|3k}%Qhny;,Etjk">OpenDTUonBatteryPassword</variable> <variable id="/X1](JXiM-@K#NE`C4,%">InverterSerial</variable> <variable id="b+E=vG0=nXY*@8jhUpT1">InverterSerial2</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> </variables> <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.Datenpunkte.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.170.178.250</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">openDTU42</field> </block> </value> <next> <block type="variables_set" id="u:x]^bL1{Q9m2)/M*CRl"> <field name="VAR" id="/X1](JXiM-@K#NE`C4,%">InverterSerial</field> <value name="VALUE"> <block type="text" id="m)|9(*pwq()mn.3Ron~:"> <field name="TEXT">11611111111</field> </block> </value> <next> <block type="variables_set" id="++@7g{b1u:LHh]h:CEq+"> <field name="VAR" id="b+E=vG0=nXY*@8jhUpT1">InverterSerial2</field> <value name="VALUE"> <block type="text" id="m8cbvw?0pnZNAUaiU8Zq"> <field name="TEXT">112122222222</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="comment" id="ql1mac4Qf*!]/(y:*HR+"> <field name="COMMENT">DPLinverter01 Limit 100%</field> <next> <block type="exec" id="iNs^J_^oAm89Vr+p^dcU"> <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="C9zK,I#|DhseRSSl*?8X"> <field name="TEXT"></field> </shadow> <block type="text_join" id="~7~(vzW]+%{R35ES=iGn"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=".v]Hhm{LD(-@){kzp()2"> <field name="VAR" id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="OZY@nUX[m`.Rp[12/e{g"> <field name="VAR" id="/X1](JXiM-@K#NE`C4,%">InverterSerial</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="]wG/EOqQ!/tw6ZlRcab0"> <field name="VAR" id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</field> </block> </value> </block> </value> <next> <block type="comment" id="aI[_!O+Ua%`p6/mqrCjz"> <field name="COMMENT">DPLinverter02 Limit 100%</field> <next> <block type="exec" id="v[cN9cA@.Ejy;Z1G81kX"> <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="C9zK,I#|DhseRSSl*?8X"> <field name="TEXT"></field> </shadow> <block type="text_join" id="Wd`VvP4NqCJ}/*|~IbTV"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="hy+6K,WWY.Y`%h-+p;v1"> <field name="VAR" id="JppG`(9.sfDt)j^gha}{">cUrlLimitPart1</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="W/O@o[J$nrG+r..LB`}A"> <field name="VAR" id="b+E=vG0=nXY*@8jhUpT1">InverterSerial2</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="q%FGBbHAZ^N/`|V3wzs%"> <field name="VAR" id="Xy47v*SILC`=7N1mM,:5">cUrlLimitPart2</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </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> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="738" y="862"> <mutation statements="false"> <arg name="jsonObj" varid="P.,=V-_lWMTIt*,^9bWa"></arg> <arg name="attr" varid="?Ekt8|,iPfa0uAPY)N%A"></arg> <arg name="val" varid="y`qH:gKyqipx04VGZ@;="></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
Damit kann in jedem Script der Dynamic Power Limiter ein- oder ausgeschaltet werden.
Ist bestimmt brauchbar.
Vorschläge oder Verbesserungen willkommen.
Würde mich mal über eine Rückmeldung oder einen Beitrag freuen.
Nicht, dass ich hier Alleinunterhalter bin -
@maxclaudi genau das habe ich gesucht, läuft perfekt. dankee
so kann ich mein BKW steuern wenn meine Große PV anlage endlich freigeschalten wird.
-
@denjo
Danke für die Rückmeldung und gern geschehen
Freut mich, dass ich helfen konnte. -
@maxclaudi leider schaltet er den WR aus wenn ich es auf false gestellt habe
-
@maxclaudi sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Würde mich mal über eine Rückmeldung oder einen Beitrag freuen.
dann verschiebe ich das mal besser.
Eine Einsteigerfrage wie nan ein Gerät in ioBroker einbindet ist das ja nicht. -
@denjo
Ein Ausschaltbefehl oder Restart ist darin nicht enthalten.Es wird zuerst nur die Konfiguration des Dynamik-Power-Limiter abgerufen und in eine Variable übergeben.
Danach wird je nach Datenpunkt-Aktualisierung der DPL ein- oder ausgeschaltet. und zusätzlich die davor eingelesenen Parameter wieder mit übergeben.
Beim Ausschalten, bzw. gleich danach werden zusätzlich die Wechselrichter auf 100% Leistung (non_persistent) eingestellt.
Ein Ausschalten kann dadurch eigentlich nicht passieren.
Der Trigger sollte auch nur auslösen bei:
Falls Objekte "wurde geändert"
0_userdata.0.Datenpunkte.openDTUoB.dplEinAus
Somit kann's bzw. darf es auch nicht zu einer (Dauer-)Schleife kommen, außer es wäre nicht so und in einem Blockly von Dir wird ständig in einer Schleife ein/aus getriggert...
oder
der Trigger reagiert auf "geändert". auch wenn er ständig nur den gleichen Wert aktualisiert bekommt.
Was eigentlich nicht sein dürfte.
Vielleicht sind die Befehlsfolgen auch zu schnell für Deine(n) Wechselrichter(?).
Hab jetzt mal für Dich ein Blockly, das nur reagiert, wenn auch der Wert wirklich verändert wurde.
Auf Limit setzen wurde bewusst verzichtet.
Interressant wäre auch, welche(n) Wechselrichter Du für die DPL-Steuerung verwendest?
Habe nur wenige Hoymiles zur Verfügung.Auch Dein Script könnte weiterhelfen, warum bei Dir ausgeschaltet wird.
Versuch's mal mit dem Blockly:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="!vz=]X,KQ3?_R/xq.Sbf">jsonObj</variable> <variable id="d!Xk#_fYu(@qaz)xb|6V">attr</variable> <variable id="z4/sN[H|/(mN4vnd%??r">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="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.Datenpunkte.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.170.178.250</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">openDTU42</field> </block> </value> <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="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="m!{7tc}+k738c3)VaEUx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="a;bj5#I*mE{2u7(jaH%9"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="Z6HJn~!.L1rzmJVcBG8{"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="q(TuN;RJ7lhe4cq$yNnB"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="*^p)oZ2mVnWLDpmnyN-,"> <field name="OP">EQ</field> <value name="A"> <block type="get_attr" id="3p`mkNx[*HO7iQJC|V{N"> <value name="PATH"> <shadow type="text" id="8DfMj){9E]0z+yjsND5+"> <field name="TEXT">enabled</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="aHFd;U%V4s{~a(8w9UNy"> <field name="OID">0_userdata.0.Datenpunkte.Test.test-Json</field> </shadow> <block type="variables_get" id="Gt)$8NYmfc(^b2,2so1,"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="5?+CTi[GpFp][a-?Wbn="> <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="true"></mutation> <field name="WITH_STATEMENT">TRUE</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> <statement name="STATEMENT"> <block type="debug" id="^T_$oIN/{iGOHb67zL1o"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="$EPuCef77$Dr-U%0wHNQ"> <field name="TEXT">test</field> </shadow> <block type="exec_result" id="[n6RT8j9^+,[onHfQTU1"> <field name="ATTR">result</field> </block> </value> </block> </statement> </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="1Y:E+,Ust$:ewECrMv)p"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="_T*YwxAB4#Xs_pDY+p#j"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="Nto5bN64vh9%Czjwh`^+"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_boolean" id="mz{kc7yDlbLx]j]C%pQ_"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_compare" id="22=g?/gZS9ne:iv+T9wO"> <field name="OP">EQ</field> <value name="A"> <block type="get_attr" id="kyx*W9k$}#04:WkBS^?9"> <value name="PATH"> <shadow type="text" id="4~0l@.bS7HHz$}.VpYem"> <field name="TEXT">enabled</field> </shadow> </value> <value name="OBJECT"> <shadow type="get_object" id="aHFd;U%V4s{~a(8w9UNy"> <field name="OID">0_userdata.0.Datenpunkte.Test.test-Json</field> </shadow> <block type="variables_get" id=";JM+v5vm0%m2};Ot1=0I"> <field name="VAR" id="_+8y375~59B=8rd!@Ae%">jsonObjekt</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="7EORb^RB}#CtJ09lTI1m"> <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="true"></mutation> <field name="WITH_STATEMENT">TRUE</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> <statement name="STATEMENT"> <block type="debug" id="d,[^(Avd7@SZ:P6X/fiS"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="uq~a2HGjtc5e|h.21,D{"> <field name="TEXT">test</field> </shadow> <block type="exec_result" id="nTlwOY6fw[+1f(a@pFR!"> <field name="ATTR">result</field> </block> </value> </block> </statement> </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> </statement> </block> </next> </block> <block type="procedures_defcustomnoreturn" id="nxZk[TB}x%yvkJ058U]o" x="887" y="13"> <mutation statements="false"> <arg name="jsonObj" varid="!vz=]X,KQ3?_R/xq.Sbf"></arg> <arg name="attr" varid="d!Xk#_fYu(@qaz)xb|6V"></arg> <arg name="val" varid="z4/sN[H|/(mN4vnd%??r"></arg> </mutation> <field name="NAME">change</field> <field name="SCRIPT">anNvbk9ialthdHRyXSA9IHZhbDs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
Einfach mal testen und wieder melden. Danke.
-
@maxclaudi sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Würde mich mal über eine Rückmeldung oder einen Beitrag freuen.
Nicht, dass ich hier Alleinunterhalter binDanke für das Blockly.
Ich bin damit auch am testen.
Was geht:
DPL wird per Datenpunkt ein ein und aus geschaltet.
Nach dem Einschalten läuft DPL wie gewohnt.
Nach dem Ausschalten werden meine WR (HM-800 und HM-600) auch auf 100% gestellt.
Was nicht geht:
Die bleiben nicht bei 100%.
Ein paar Sekunden später sind sie auf 7,5 % bzw. 10 % (Minimales Leistungslimit im DPL) gestellt.
Warum passiert das?
Grüße
Manfred -
@beowolf sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
@maxclaudi sagte in OpenDTU-onBattery Blockly DPL Ein/Aus:
Würde mich mal über eine Rückmeldung oder einen Beitrag freuen.
Nicht, dass ich hier Alleinunterhalter binDanke für das Blockly.
gerne
Was geht:
DPL wird per Datenpunkt ein ein und aus geschaltet.
Nach dem Einschalten läuft DPL wie gewohnt.
Nach dem Ausschalten werden meine WR (HM-800 und HM-600) auch auf 100% gestellt.
Was nicht geht:
Die bleiben nicht bei 100%.
Ein paar Sekunden später sind sie auf 7,5 % bzw. 10 % (Minimales Leistungslimit im DPL) gestellt.
Warum passiert das?
Weil die Zeit dazwischen zu kurz ist. Die Wechselrichter haben bestimmt noch den state Pending.
Das habe ich auch schon bei einigen Hoymiles festgestellt.
Ergänzend zu Deiner Beobachtung:
DPL ist weiterhin ausgeschaltet aber die Werte haben sich mit ausgeschaltetem Zustand auf Minimum verändert.Funktioniert auch so einwandfrei:
Nach dem DPL Ausschalten warten (ca. 10sek.), dann das Limit vergleichen:
Falls Datenpunkt(e) (mqtt von openDTUonBattery der entsprechenden Wechselrichter) limit_relative ≠ 100 dann mittels curl auf 100% setzen.oder man kann nach ausschalten vom DPL und nach timeout von ~10sek einfach 100% Limit setzen.
Das wird dann beibehalten.Die ca. 10 sekunden Wartezeit sind nötig.
Vielleicht etwas zu kurz, einfach testen, weil der Hoymiles Zeit benötigt um Befehle hintereinander auszuführen. Pending muss abgeschlossen sein.
Normalerweise könnte man pollen, auswerten, abwarten und dann senden.
Aber für so einfache Dinge unnötig.Man schaltet ja normal nur 1x am Tag DPL ein oder aus (für Bypass?).
Um es Dir leichter zu machen habe ich dafür noch ein Blockly für beide Wechselrichter zusammengeklickt:
blockly als import:
<block xmlns="https://developers.google.com/blockly/xml" type="variables_set" id="6acw^x;DnOzQr,+1QMY~" x="-912" y="13063"> <field name="VAR" id="03lE}K#LAiE6UIn{TSpe">openDTUoB_pwd</field> <value name="VALUE"> <block type="text" id=".Gzymx[U58ZC5@#_eI1O"> <field name="TEXT">topSecret</field> </block> </value> <next> <block type="variables_set" id="s*[FyKXx,06qe75!Ql(H"> <field name="VAR" id="Q[Ul.eSqTa`ja|Cts-+/">HM800_serial</field> <value name="VALUE"> <block type="text" id="2sNdysyulvZDNM6yeP8H"> <field name="TEXT">123456789011</field> </block> </value> <next> <block type="variables_set" id="~/@Acy]v_1,b~:Bn[L_+"> <field name="VAR" id="]TAF~$|vQbu%71?%TIMg">HM600_serial</field> <value name="VALUE"> <block type="text" id="f;}RPMU,=+?6Q7VrPX[$"> <field name="TEXT">123456789012</field> </block> </value> <next> <block type="variables_set" id="n9utWkCmZ~5O=d;qD`/Y"> <field name="VAR" id="DvrV|7SgL3%[J#.tMQYu">ip</field> <value name="VALUE"> <block type="text" id="XM-2mM4T[^{0`;c!`RPw"> <field name="TEXT">192.168.2.200</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="9G;7cx}YMIq[e`lw6*X~">HM800_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="03lE}K#LAiE6UIn{TSpe">openDTUoB_pwd</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="DvrV|7SgL3%[J#.tMQYu">ip</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-+/">HM800_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">HM600_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="03lE}K#LAiE6UIn{TSpe">openDTUoB_pwd</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="DvrV|7SgL3%[J#.tMQYu">ip</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">HM600_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="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="b;`WR[z]dikov!wE@,}j">HM600_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="9G;7cx}YMIq[e`lw6*X~">HM800_curl</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block>
kannst ja anpassen für Dein Blockly. Variablen von Passwort für OpenDTU, IP und Seriennumern müsstest schon integriert haben und kannst die dann nehmen/ersetzen.
Alternativ starten manche den Wechselrichter nach DPL ausschalten neu, damit die non-persistenten Werte weg sind und der Wechselrichter wieder auf 100% ist.
Viel Spaß und Erfolg.
PS: Blockly mag ich eigentlich nicht. Lieber js. Ist man nicht so eingeschränkt und geht schneller.
-
Wenn ich dein Blockly manuell aufrufe, geht das Limit wieder auf 100%.
Wie starte ich das Skript zeitversetzt nachdem ich dpl ausgeschaltet habe.
Mit Timeout "warte" 1 Minute will das nicht.
-
@beowolf
jetzt ist das Bild weg. Du hast vergessen direkt vor dem Timeout auch ein Stop-Timeout einzubauen.
Damit ein timeout-reset statt findet.
Dann funktioniert es auch.Am besten exportierst Du Deinen Blockly-Code in die Zwischenablage, fügst ihn hier als code ein und Seriennummern+passwort usw. ersetzt Du einfach mit 'xxxxxx'.
Dass Du keineMinute warten möchtest, ist klar.
Was sind sonst noch die Ziele?Bedenke, dass die Limit-Änderungen in den flüchtigen Speicher geschrieben werden => unbedenklich.
Das Umschalten (Ein/Aus) ist Flash => bedenklich.
Das Umschalten sollte man nicht übertreiben und nicht oft an einem Tag machen, was auch überflüssig ist.Zeit ist zwar knapp (bin an einem größeren Projekt dran), aber das werden wir für Dich hoffentlich gelöst bekommen
-
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.