@jvsl
Der Sketch ist relativ einfach. Das Blockly aber nicht. Vielleicht erkläre ich noch fix das Prinzip:
Ein Shelly EM3 stellt die aktuell Verfügbare Energie im Saldo dar. Da er direkt hinter dem Zähler läuft, ist der Grundverbrauch bereits eingerechnet und alle Verbraucher werden im Saldo berücksichtigt. Kann man also direkt übernehmen. Was man noch tun muss, ist die aktuelle Last des Boilers gegenrechnen, sonst schaltet sich die Sache sofort wieder ab. Das heisst der Boiler braucht auch einen Shelly xPM vorneweg!
Leider laufen die SSR nicht linear. Habe das ganze über den PWM-Range (255) in 5er Schritten ausgemessen und näherungsweise einen Logarithmus im Skript genommen. Besser hätte ein Polynom dritten Grades gepasst, hab ich aber mit Blockly nicht abbilden können. Alternativ kann man das Ganze auch manuell im Blockly machen, je nach Überschuss setzt man halt den PWM-Wert in einer Zeile.
Dazu gibt es noch einen Offset, einen Startwert (bei wieviel Überschuss das Lastmanagement einsetzt) und das Skript bedient zwei Boiler (!) mit je 1,5 kW Heizstab. Ehe Du Dich da komplett durchfummelst empfehle ich es neu zu setzen, zumal dort meine sämtlichen Variablen noch drin sind, und es ist auch immer besser, wenn man nebenbei noch versteht was man tut
Bei Fragen fragen....
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
HTTPClient sender;
WiFiClient wifiClient;
const char* ssid = "DeinWLAN";
const char* password = "DeinWLAN-Passwort";
#define LED 2
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
const int PWM_pin = 13; //PWM Ausgabepin (D7 auf dem Board)
const int PWM_pin_1 = 15; //PWM Ausgabepin (D8 auf dem Board)
//######################################################################
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(200);
Serial.print(".");
}
Serial.println("Verbunden!");
pinMode(LED,OUTPUT);
pinMode(D7, OUTPUT);
pinMode(D8, OUTPUT);
analogWriteFreq(500);
analogWriteRange(255);
}
//#####################################################################
void loop() {
if (sender.begin(wifiClient, "http://IPdesIOBroker:8082/getPlainValue/0_userdata.0.Lastmanagement.Boiler80PWM")) {
int httpCode = sender.GET();
if (httpCode > 0) {
// Anfrage wurde gesendet und Server hat geantwortet
// Info: Der HTTP-Code für 'OK' ist 200
if (httpCode == HTTP_CODE_OK) {
// Hier wurden die Daten vom Server empfangen
// String vom Webseiteninhalt speichern
String payload = sender.getString();
// Hier kann mit dem Wert weitergearbeitet werden
// ist aber nicht unbedingt notwendig
int steuer = payload.toInt() ;
Serial.println (steuer);
//Ausgabe auf D8
if (steuer < 0) { analogWrite(PWM_pin,( steuer));};
if (steuer >= 0) { analogWrite(PWM_pin,steuer);};
}
}else{
// Falls HTTP-Error
Serial.printf("HTTP-Error: ", sender.errorToString(httpCode).c_str());
}
// Wenn alles abgeschlossen ist, wird die Verbindung wieder beendet
sender.end();
}else {
Serial.printf("HTTP-Verbindung konnte nicht hergestellt werden!");
}
delay (2000);
<block xmlns="https://developers.google.com/blockly/xml" type="procedures_defnoreturn" id="A.gz|Hyg}Li~u)dac9Q)" x="2913" y="-237.25">
<field name="NAME">Offset</field>
<comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
<statement name="STACK">
<block type="controls_if" id="kts.!Z,9]EOKMY)(L[7-">
<value name="IF0">
<block type="logic_compare" id="ro4]F[b9YYPzKjMv/tt%">
<field name="OP">LTE</field>
<value name="A">
<block type="math_single" id="h;w/T#XZi;m+^=bGx8y+">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="1}t$HDh~I^_whbA.Gb{B">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id=":BugHy?_tmkl2@dcKf=D">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="cO!6+;{qiwz9J]@Z}JMk">
<field name="NUM">600</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="[C{hLL@*?d_ZHQXCv-Uy">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="oH,c{L5B#,A%XRAnbaXj">
<field name="NUM">93</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="b(QItv5m#Rb[M8P]Im=5">
<value name="IF0">
<block type="logic_operation" id="3C4?}Am+PRhs~lLk#u,K">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="j-@.dY,/PFMJ-7%:{H))">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="rd0;1#6+g$D:33z*tZ@^">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="~[Eh2ZUny}2QKZ*2^Udy">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="RTbQR1=jVCM]c%7E+/w4">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="a%DF!Xa/Y?$|_x0vmKZz">
<field name="NUM">100</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="|su3mZ=@._`XUveVRo@b">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="c;DFY7GLi4O#*eJQSF/h">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="^T)X##+P2h0PDwmtjjxC">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="~h5JUMRrl?h.uwL+%(r!">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="-`Y)g0mKcl0aJx@Gh_d5">
<field name="NUM">600</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="g~:`0whsLOhKe]o,G~tW">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="1*60~0!Vh4sM,!O^JPCz">
<field name="NUM">92</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="VKs/9~WZA`u!*^EeM|Ab">
<value name="IF0">
<block type="logic_operation" id="U]b2PWTc|OLtd0*0-d~K">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="V_B(.LY$rX,oOer,lS~l">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="HqhpJT=m,t^AU_8PfI}0">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="wTBX*1hop#5A:3:X#T}e">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="8y6BJMga+/=u5Ikw`aD7">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="]s5grnZ:ZP}L#P+f6rLp">
<field name="NUM">600</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="GzgR!F!^qZcxO3=9Wd;L">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="]o/}[uzp-!([RQ(|D8UR">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="jFEZ/GBO79).m_dMoFmJ">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="yNUZjbuHe2eSV(uO}l6f">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="n9l5I:,ul*L?|]Pe0Nt+">
<field name="NUM">700</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="S63g2pl-PJ;vN=):V_1b">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id=";Bejb_+IX;=ntc0|$SFq">
<field name="NUM">90</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="lfUZ6`^U9J|C~UsN1Nnx">
<value name="IF0">
<block type="logic_operation" id="Qc`Ka8G#H=7V#[~jqr,P">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="Ow})`Wz=-wU]^R{l}DpK">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="EZF%1n_MK,Wdp=_fV5-|">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id=".6pkuyb#?uJQXR.1xr+z">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="-F=1hCczh^`6zMaLQk0G">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="~e6$#C,8qjKD_YeujRn0">
<field name="NUM">700</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="c%TDn(tE}T[o[O.}@q(i">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="GsPGS?M,:)e*3i,pp*)M">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="{HMxL%VWGN=)}OyoPG%F">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="x=qydny2)p-{Hz%=165O">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="wW!3!HSo;1A@jv?r,O:N">
<field name="NUM">800</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="=pYg0[K(4uGBO/A5ol:3">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="vM4eG8Gor]DPmSFdu*(v">
<field name="NUM">90</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="g8$;.|Tj^/{Bk]SP)xGa">
<value name="IF0">
<block type="logic_operation" id="_Vp0%rqwhKT/!Pl8J)zk">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="?Jnw+Q5sLctHLUx@|YDL">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="Qy:5lSE,}%`5m:1c9OVm">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="r$!t%+#:jYb#6//b=kq=">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="oonDuY_!dvc1+Z,,LiNt">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="{9-;HDHsSJI[(R](MSUT">
<field name="NUM">800</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="!WTL[fTO(?FExqll4G@P">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="pZl].SI8Kw^AG1Dgai{s">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="?@lOQYE9K~{Xx3)DyNcf">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="fgFd.`!()kzqb.)_@Q*0">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="hnXJO2G!yHB8_~:I%#Jq">
<field name="NUM">900</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="vWe^460RLVIhd`X|DDtF">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="O8YxispS/Y=IkijOyBXv">
<field name="NUM">90</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="D}I+lPn3vGB6KPdZai@n">
<value name="IF0">
<block type="logic_operation" id="^M!H%Kq+z[OgwZ;u|W4t">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="Wd+NRTS`YeBpf~Y)M?,B">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="(ANsU[rLSl;yaYR[ZVLa">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="=2FQ+be`Fn`F_#Ty6qUs">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="1:@S62YKeSQU_5qnq#/O">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="XL}*|YU1XWis6_DSIyS[">
<field name="NUM">900</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="k)PAnzSlF..n*L^5`Sr=">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="6=BPE{i+zuxXxvZ@~um.">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="_(4|k2nox)(!6T2!6gyc">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="C;28.`_@84Z%|44bg5`+">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id=")bL1O8.w1zW7)mn;P!1Q">
<field name="NUM">950</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="8f%U5Vp|#X!,neSw,kYB">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Hh,lXh@t`y]n~i2xCt.x">
<field name="NUM">88</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="AKw#JtcJJlG3;r5;}nZ2">
<value name="IF0">
<block type="logic_operation" id="S[ds*Kv%Q.K:RG.`uSd8">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="N8w$/z[/7~QTWjLNC8CW">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="PXhFOCGycAXZ(lDn!msz">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="gc13zb|@fRCQ@C4m?GYB">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="6oRj5l;QRe/xZG=9z!?P">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id=":F|5Yam1OQxl^^?nRRDg">
<field name="NUM">950</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="iz7KQe_i_D^]jdXTAl9t">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="P6D;0?Bqdu6FtQuFmb3F">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="Tr3h;3-Ak)h6M(ji)?%Q">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="{Ky-Qd:D1A4a$bg,iw+H">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="MxRT2iuv^Tec~nn^vA3N">
<field name="NUM">1000</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="7rG[`K`O74MjfKRdn/VU">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="}pqi-q9#D6Sor[?4c7hC">
<field name="NUM">86</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="L016Q9w,}/VbgO;ThrXR">
<value name="IF0">
<block type="logic_operation" id="BSXnP4NcbS/Q^H6hrxN^">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="9CaWFHQT^3*o=P/G~%y~">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="s~)Ll!c=soy`ON[|krSy">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="B8P5/4Ip4L}3[acYHTST">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="ieMa`}kh$-zqYqu!8Q_p">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="QHiDYmt:LDv11wk|l:B#">
<field name="NUM">1000</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="(u;9V)$w:LqW6/]B3;+U">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="5P,a.u?e[g[$ngbX1US,">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="[%9g-A.i%~#WyzC}q2`Z">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="65.$:1AbTUwZMw7Tt=zp">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="p+_:9JYgysP_ThG822Ra">
<field name="NUM">1050</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="grAh$8DJ3*PEzFPl}+l}">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="gZ70L2=mvQ[s!5ZRu#*,">
<field name="NUM">83</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="$/BWm*bZG,+SNb$S)Ph*">
<value name="IF0">
<block type="logic_operation" id=",vuvImxooh!w2v4Qe2+]">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id=")lmgiWk]F!M9fWbhN0)=">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="_%t(LBRKItr+Ww4m95mW">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="5^9ciDJnfyQkI-|=/W?6">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="CLFo^u4Rtz`B,k@g`8hU">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="AT]_4~v-5G0ZzJt[8_rW">
<field name="NUM">1050</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="}V8Dza]W8HG|pt*X,Y]`">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="1z~0=K8*,O}fqkc67A1,">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="7uyEaA#/J7G5-Xa/`O^t">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="n$#g?3a@D}N^T*xk$[WH">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="2-S3+O[~I]8~$?NaA7Tc">
<field name="NUM">1100</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="cLOE1z[1?.a3@;j]#xYP">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="6.Xo!@w$uEv#/io5ym5~">
<field name="NUM">75</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="J/f]CZ/OwhZ@KT:B)Mfu">
<value name="IF0">
<block type="logic_operation" id="d%$w2WD{[[}n8ORt?sWD">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id=":1LOx;BqJ~8PF#bp*`NC">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="0]PAb{ziK)r`^eM5~Yzc">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="%CH3X|AvYDm,kbjMWxR0">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="XOuttW?%IAc2+Cp%nsot">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="4Ya-v(VLRvT%Y,@Zq?pO">
<field name="NUM">1100</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="I/5ILL?jrIW6(=-LmIWF">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="P!YLF7`7Gc1yD:}!a[z)">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="82ltC-;vDi0q_T*;6#^H">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="2nsh}n957J+fPy3^.,#I">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="G`~OjeI:GBf`UNq3@$VC">
<field name="NUM">1200</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="EsLtKZA7DPZ,D`sX1)YC">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="JK*#`tg!I94VH{E.4[J6">
<field name="NUM">65</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="hcrWvTfs~Dn]fm|2F7Gf">
<value name="IF0">
<block type="logic_operation" id="}6QfiH5wdn1mAvh:6$K}">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="i/(r,AG4.68n^+EBjCDI">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="N+]qrvA04!1I_0EK+y]n">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="-(KU)]EPI1?p9vS6~*g6">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="K$~?ALRI{XBH%uWU.L,H">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="cve)naYmz^jVxhb1ZoK7">
<field name="NUM">1200</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="nisVFKPkj#}K*5aiqi8q">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="Cc}]-mAKw~#/XN6H0GNh">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="YxaKD9fa;R}mU2ms+l3m">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="~lA3rR8qCO:Cy`gDIvU+">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="s6k$IR0jM,[/88I=8ukw">
<field name="NUM">1300</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="4xc;yKgltFP584v8h/Om">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Z]mh!FlH0NlrE+_l^hxF">
<field name="NUM">55</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="aPRM!A{xuWFs3wwK*b[a">
<value name="IF0">
<block type="logic_operation" id="M)Dpnl0:7[8+%6ap4CYE">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="sM{U4sW#KHtV;7%=;{1*">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id="LSe1.v8Z2]7a?rv,T;B@">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="e@EJUGM83I(.Ntg0)Rc:">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="{)6)X1^@2PSEE2ZC;L[k">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="6C7+N6?|JDKMaWe%Y0G[">
<field name="NUM">1300</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="_#S;Bsq8Wu%0P^}S6`WB">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="/euJp`^h@I_2bAb5si^[">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="3MY/8([OM1is.2afLl1m">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="_I:)|gv^x7{0V`RR##L`">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="WH5_:}=~UxvH}S0bJLXL">
<field name="NUM">1400</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="nDYRC`mj()gtC.mX/Ll6">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="MmZB`.yYG.Zn@@E*Svh+">
<field name="NUM">54</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="]yEHY~?-Qo_#;mkB)lg~">
<value name="IF0">
<block type="logic_operation" id="{i6e$@;qw~QtSY^z|?f7">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="}ozq4eyVz0,pX!5~fBRQ">
<field name="OP">GTE</field>
<value name="A">
<block type="math_single" id=",Mm$_g_T2CpA9yb!qnp2">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="Q9u1rP7n1U:$s80;+x)+">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="AY.3/%c|;cB?s)O9-ze7">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="$ko0{VVsA[fF6@e-(:Ni">
<field name="NUM">1400</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="i+GiFRu:11!2U0a0x-@i">
<field name="OP">LT</field>
<value name="A">
<block type="math_single" id="q2$J[F*`xxlFLV7)`b|c">
<field name="OP">ABS</field>
<value name="NUM">
<shadow type="math_number" id="EKRQX^U6c7qih-R[S*an">
<field name="NUM">9</field>
</shadow>
<block type="get_value" id="@]y1Z%2vB,dcYP%0V=CJ">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Lastmanagement.Average</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="(1gIoA1^o)G4:-sJ-aE|">
<field name="NUM">5000</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="eOzXs[K@9pF.S=2*jA6)">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Lastmanagement.123</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="erjRvWG?smDx{Tcpl:oP">
<field name="NUM">35</field>
</block>
</value>
</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>