NEWS
Schattenbedarf || 2 Temperaturstufen
-
Ich möchte ein Blockly-Script zur Beschattung an einer Hauswand erstellen. Hierzu soll die Lufttemperatur kontinuierlich gemessen werden und bei Änderung das Script getriggert werden. Das Ganze soll nicht im Winter stattfinden (Datenpunkt Jahreszeit_Winter). Außerdem sollen alle Beschattungsstufen sofort deaktiviert werden, wenn der Datenpunkt „Schattenbedarf_Ostwand_Azimut“ von TRUE auf FALSE wechselt.
Zur Beschattung selber soll es zwei Beschattungsstufen geben. Wenn die Temperatur größer 26°C ist, soll mit 5 Minuten Zeitverzögerung die erste Beschattungsstufe angehen. Wenn die Temperatur größer gleich 30°C ist, soll die zweite Beschattungsstufe angehen, ebenfalls mit 5 Minuten Zeitverzögerung. Dies soll auch rückwärtig passieren. Wenn die Temperatur unter 30°C fällt, soll die Beschattungsstufe 1 weiterhin aktiv bleiben. Beide Beschattungsstufen sollen deaktiviert werden, wenn die Temperatur kleiner 24°C gemessen wird, ebenfalls mit einer Zeitverzögerung von 5 Minuten. Die Frage ist jetzt, ob das hier unten aufgefüllte Blockly-Script so umgesetzt werden kann.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="delayOnSchatten2">delayOnSchatten2</variable> <variable type="timeout" id="delayOnSchatten1">delayOnSchatten1</variable> <variable type="timeout" id="DelayOffSchatten">DelayOffSchatten</variable> </variables> <block type="on" id="3_|;x+AtL}`BmECuq.|%" x="-237" y="-1762"> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> <field name="CONDITION">lt</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="FNxU[a(VpTU^4E-|0#M^"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="x]u.yui(BI`tRPJH(`vT"> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="s:UzH?#tmF3k`UoDpZez"> <field name="NAME">DelayOffSchatten</field> <next> <block type="controls_if" id="-K_m6mJ8=FDekK*IQ+6y"> <value name="IF0"> <block type="get_value" id="wI2;4vuAY/jc1P0mDi@+"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="control" id="i.%~#D;,mB8rOj33T$p0"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="`|;^}taOCR^vU`*[@}u/"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="controls_if" id=",X!?F:hx,|E%l$2(]/o]"> <value name="IF0"> <block type="get_value" id="79CEJPg{`#6#3f?8rT`Z"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="control" id="|`WZxD2/oIc_]vsGxbma"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="q0~LSlGZ3=w0yXjjgf5G"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="on" id="K.nCT?sMD)N93hL6vUSS"> <field name="OID">hm-rpc.1.0010D8A990A572.1.ACTUAL_TEMPERATURE</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="ql|Os4j[cG3l{b-~gPD+"> <value name="IF0"> <block type="logic_multi_and" id="wSa+bH;t9nu2|5@GxO4E"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_negate" id="1p?Tt.8#0SX{Ad=K0G3w"> <value name="BOOL"> <block type="get_value" id="8s?!+JZa-x8`t`-f/SL^"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Anwesenheit.Haus.Jahreszeit_Winter</field> </block> </value> </block> </value> <value name="AND1"> <block type="get_value" id="92`5OOV2|FGRQ~_R33??"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="BoAxmRr#oX2v{+V!W1dE"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_multi_and" id="*90rj-=CXa|5yOL}qPby"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="{g3Tj-TgWqUXpDdyPqS7"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="/aleDq}X~:y+JbD!tfMU"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="~g#h1x|Tvd{PK+8li9*#"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="mozfd5D[](rlhKCzT|+i"> <value name="BOOL"> <block type="timeouts_gettimeout" id="Dwe7{A_[rdZYS:h+D~;x"> <field name="NAME">delayOnSchatten2</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id=",RUP{w[$sBQy-CFsoew("> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="hU15yEjlIk/2*0eqR~xN"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="=l-FF(rTK|k3{tAlArW)"> <field name="NAME">delayOnSchatten2</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="u44R1FxtlM;5@_sd#]Rv"> <value name="IF0"> <block type="logic_negate" id="YQ2C1zTuRCCvkTlgNwN`"> <value name="BOOL"> <block type="get_value" id="lE9!L{au?Pol3-,=):w~"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="ET/bjbdB~c^vIk7A=sG`"> <field name="COMMENT">Schattenbedarf Stufe 2 erreicht</field> <next> <block type="control" id="_E_.q(GB3jJ2GX2db%u!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="h|W6|%0PDWv{5teDW`.N"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="i#Si,Okbbo%662yWR[a1"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="r96?Jf9]Nj{Ydbbw8ywh"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="`KvwseKO6!!Ts$OO|0RQ"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="dn3-5l+-)?~F5Kck=?_."> <field name="NUM">26</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="/f+[(HN@%Yb~3/UfaWJd"> <value name="BOOL"> <block type="timeouts_gettimeout" id="KRalU5XBmt9i7`NepTK5"> <field name="NAME">delayOnSchatten1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_cleartimeout" id="VO#Tu|J*UkFU|h+nwNl)"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id=",[C#Nfc}0!,b-y_BA^%1"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="t_uLE5~x}E5U[nj4p?h8"> <field name="NAME">delayOnSchatten1</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="!SJ[LO;q%jVUm2NmY(rt"> <value name="IF0"> <block type="logic_negate" id="-^@$.UtC9Nk(j(}%NHU2"> <value name="BOOL"> <block type="get_value" id="@oDLcZ}VE!SoWV}dOR0#"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="psHU?]#(MVkX+Y~|ybU0"> <field name="COMMENT">Schattenbedarf Stufe 1 erreicht</field> <next> <block type="control" id="E~8@]ape_P_PvtFjXZJo"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="(S0Fi^Som`7,ict=W]xN"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="5;^vE[i8,xBy;K%MCMKD"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Cquamm`J0X-$8,ltG}O|"> <field name="OP">LT</field> <value name="A"> <block type="on_source" id="8C1j@iGLc$WY=:Lu{Zc="> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="mp*P!T^g.dx0+l7a05f5"> <field name="NUM">24</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="(,?v@+bcD^A/$)_yVPtB"> <value name="BOOL"> <block type="timeouts_gettimeout" id="@oewxvlCUtqw,:Tltuev"> <field name="NAME">DelayOffSchatten</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="timeouts_cleartimeout" id="G@=ta!UbW=5|bE$d*mTV"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="1R*5t2Tx8%+T7i}msU0."> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_settimeout" id="x~ky6K^3wBCF$;JoD@w,"> <field name="NAME">DelayOffSchatten</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="}WyTdvWPSH,+tB$*tL75"> <value name="IF0"> <block type="get_value" id="^v*DyN{W.hk)eInmF_Za"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="comment" id="OIX.Ab4|[i*8!uBNOX5U"> <field name="COMMENT">Schattenbedarf Stufe 1 deaktivieren</field> <next> <block type="control" id=";O-*nFa@bV=SZIa.];M["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="-c4~+oH#om37,Pn]q9%h"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="%HaK?$:00ApPvppN^kS("> <value name="IF0"> <block type="get_value" id="*~ec6X$hmafTMCzvxmpG"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="comment" id=")kMSXMfndgwp1ORKg)g4"> <field name="COMMENT">Schattenbedarf Stufe 2 deaktivieren</field> <next> <block type="control" id="g!|:w^;38G]u[q#(Xf2|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="yHodE[=S:jA5yvXhmKp6"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </xml>Vielleicht kann mir jemand weiterhelfen?
Vielen Dank im Vorraus.
Takahara -
Ich möchte ein Blockly-Script zur Beschattung an einer Hauswand erstellen. Hierzu soll die Lufttemperatur kontinuierlich gemessen werden und bei Änderung das Script getriggert werden. Das Ganze soll nicht im Winter stattfinden (Datenpunkt Jahreszeit_Winter). Außerdem sollen alle Beschattungsstufen sofort deaktiviert werden, wenn der Datenpunkt „Schattenbedarf_Ostwand_Azimut“ von TRUE auf FALSE wechselt.
Zur Beschattung selber soll es zwei Beschattungsstufen geben. Wenn die Temperatur größer 26°C ist, soll mit 5 Minuten Zeitverzögerung die erste Beschattungsstufe angehen. Wenn die Temperatur größer gleich 30°C ist, soll die zweite Beschattungsstufe angehen, ebenfalls mit 5 Minuten Zeitverzögerung. Dies soll auch rückwärtig passieren. Wenn die Temperatur unter 30°C fällt, soll die Beschattungsstufe 1 weiterhin aktiv bleiben. Beide Beschattungsstufen sollen deaktiviert werden, wenn die Temperatur kleiner 24°C gemessen wird, ebenfalls mit einer Zeitverzögerung von 5 Minuten. Die Frage ist jetzt, ob das hier unten aufgefüllte Blockly-Script so umgesetzt werden kann.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="delayOnSchatten2">delayOnSchatten2</variable> <variable type="timeout" id="delayOnSchatten1">delayOnSchatten1</variable> <variable type="timeout" id="DelayOffSchatten">DelayOffSchatten</variable> </variables> <block type="on" id="3_|;x+AtL}`BmECuq.|%" x="-237" y="-1762"> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> <field name="CONDITION">lt</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="FNxU[a(VpTU^4E-|0#M^"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="x]u.yui(BI`tRPJH(`vT"> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="s:UzH?#tmF3k`UoDpZez"> <field name="NAME">DelayOffSchatten</field> <next> <block type="controls_if" id="-K_m6mJ8=FDekK*IQ+6y"> <value name="IF0"> <block type="get_value" id="wI2;4vuAY/jc1P0mDi@+"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="control" id="i.%~#D;,mB8rOj33T$p0"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="`|;^}taOCR^vU`*[@}u/"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="controls_if" id=",X!?F:hx,|E%l$2(]/o]"> <value name="IF0"> <block type="get_value" id="79CEJPg{`#6#3f?8rT`Z"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="control" id="|`WZxD2/oIc_]vsGxbma"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="q0~LSlGZ3=w0yXjjgf5G"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="on" id="K.nCT?sMD)N93hL6vUSS"> <field name="OID">hm-rpc.1.0010D8A990A572.1.ACTUAL_TEMPERATURE</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="ql|Os4j[cG3l{b-~gPD+"> <value name="IF0"> <block type="logic_multi_and" id="wSa+bH;t9nu2|5@GxO4E"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_negate" id="1p?Tt.8#0SX{Ad=K0G3w"> <value name="BOOL"> <block type="get_value" id="8s?!+JZa-x8`t`-f/SL^"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Anwesenheit.Haus.Jahreszeit_Winter</field> </block> </value> </block> </value> <value name="AND1"> <block type="get_value" id="92`5OOV2|FGRQ~_R33??"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="BoAxmRr#oX2v{+V!W1dE"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_multi_and" id="*90rj-=CXa|5yOL}qPby"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="{g3Tj-TgWqUXpDdyPqS7"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="/aleDq}X~:y+JbD!tfMU"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="~g#h1x|Tvd{PK+8li9*#"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="mozfd5D[](rlhKCzT|+i"> <value name="BOOL"> <block type="timeouts_gettimeout" id="Dwe7{A_[rdZYS:h+D~;x"> <field name="NAME">delayOnSchatten2</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id=",RUP{w[$sBQy-CFsoew("> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="hU15yEjlIk/2*0eqR~xN"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="=l-FF(rTK|k3{tAlArW)"> <field name="NAME">delayOnSchatten2</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="u44R1FxtlM;5@_sd#]Rv"> <value name="IF0"> <block type="logic_negate" id="YQ2C1zTuRCCvkTlgNwN`"> <value name="BOOL"> <block type="get_value" id="lE9!L{au?Pol3-,=):w~"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="ET/bjbdB~c^vIk7A=sG`"> <field name="COMMENT">Schattenbedarf Stufe 2 erreicht</field> <next> <block type="control" id="_E_.q(GB3jJ2GX2db%u!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="h|W6|%0PDWv{5teDW`.N"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="i#Si,Okbbo%662yWR[a1"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="r96?Jf9]Nj{Ydbbw8ywh"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="`KvwseKO6!!Ts$OO|0RQ"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="dn3-5l+-)?~F5Kck=?_."> <field name="NUM">26</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="/f+[(HN@%Yb~3/UfaWJd"> <value name="BOOL"> <block type="timeouts_gettimeout" id="KRalU5XBmt9i7`NepTK5"> <field name="NAME">delayOnSchatten1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_cleartimeout" id="VO#Tu|J*UkFU|h+nwNl)"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id=",[C#Nfc}0!,b-y_BA^%1"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="t_uLE5~x}E5U[nj4p?h8"> <field name="NAME">delayOnSchatten1</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="!SJ[LO;q%jVUm2NmY(rt"> <value name="IF0"> <block type="logic_negate" id="-^@$.UtC9Nk(j(}%NHU2"> <value name="BOOL"> <block type="get_value" id="@oDLcZ}VE!SoWV}dOR0#"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="psHU?]#(MVkX+Y~|ybU0"> <field name="COMMENT">Schattenbedarf Stufe 1 erreicht</field> <next> <block type="control" id="E~8@]ape_P_PvtFjXZJo"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="(S0Fi^Som`7,ict=W]xN"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="5;^vE[i8,xBy;K%MCMKD"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Cquamm`J0X-$8,ltG}O|"> <field name="OP">LT</field> <value name="A"> <block type="on_source" id="8C1j@iGLc$WY=:Lu{Zc="> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="mp*P!T^g.dx0+l7a05f5"> <field name="NUM">24</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="(,?v@+bcD^A/$)_yVPtB"> <value name="BOOL"> <block type="timeouts_gettimeout" id="@oewxvlCUtqw,:Tltuev"> <field name="NAME">DelayOffSchatten</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="timeouts_cleartimeout" id="G@=ta!UbW=5|bE$d*mTV"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="1R*5t2Tx8%+T7i}msU0."> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_settimeout" id="x~ky6K^3wBCF$;JoD@w,"> <field name="NAME">DelayOffSchatten</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="}WyTdvWPSH,+tB$*tL75"> <value name="IF0"> <block type="get_value" id="^v*DyN{W.hk)eInmF_Za"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="comment" id="OIX.Ab4|[i*8!uBNOX5U"> <field name="COMMENT">Schattenbedarf Stufe 1 deaktivieren</field> <next> <block type="control" id=";O-*nFa@bV=SZIa.];M["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="-c4~+oH#om37,Pn]q9%h"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="%HaK?$:00ApPvppN^kS("> <value name="IF0"> <block type="get_value" id="*~ec6X$hmafTMCzvxmpG"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="comment" id=")kMSXMfndgwp1ORKg)g4"> <field name="COMMENT">Schattenbedarf Stufe 2 deaktivieren</field> <next> <block type="control" id="g!|:w^;38G]u[q#(Xf2|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="yHodE[=S:jA5yvXhmKp6"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </xml>Vielleicht kann mir jemand weiterhelfen?
Vielen Dank im Vorraus.
Takahara@takahara bitte das Blockly auch zeigen.
-
Ich möchte ein Blockly-Script zur Beschattung an einer Hauswand erstellen. Hierzu soll die Lufttemperatur kontinuierlich gemessen werden und bei Änderung das Script getriggert werden. Das Ganze soll nicht im Winter stattfinden (Datenpunkt Jahreszeit_Winter). Außerdem sollen alle Beschattungsstufen sofort deaktiviert werden, wenn der Datenpunkt „Schattenbedarf_Ostwand_Azimut“ von TRUE auf FALSE wechselt.
Zur Beschattung selber soll es zwei Beschattungsstufen geben. Wenn die Temperatur größer 26°C ist, soll mit 5 Minuten Zeitverzögerung die erste Beschattungsstufe angehen. Wenn die Temperatur größer gleich 30°C ist, soll die zweite Beschattungsstufe angehen, ebenfalls mit 5 Minuten Zeitverzögerung. Dies soll auch rückwärtig passieren. Wenn die Temperatur unter 30°C fällt, soll die Beschattungsstufe 1 weiterhin aktiv bleiben. Beide Beschattungsstufen sollen deaktiviert werden, wenn die Temperatur kleiner 24°C gemessen wird, ebenfalls mit einer Zeitverzögerung von 5 Minuten. Die Frage ist jetzt, ob das hier unten aufgefüllte Blockly-Script so umgesetzt werden kann.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="delayOnSchatten2">delayOnSchatten2</variable> <variable type="timeout" id="delayOnSchatten1">delayOnSchatten1</variable> <variable type="timeout" id="DelayOffSchatten">DelayOffSchatten</variable> </variables> <block type="on" id="3_|;x+AtL}`BmECuq.|%" x="-237" y="-1762"> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> <field name="CONDITION">lt</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="FNxU[a(VpTU^4E-|0#M^"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="x]u.yui(BI`tRPJH(`vT"> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="s:UzH?#tmF3k`UoDpZez"> <field name="NAME">DelayOffSchatten</field> <next> <block type="controls_if" id="-K_m6mJ8=FDekK*IQ+6y"> <value name="IF0"> <block type="get_value" id="wI2;4vuAY/jc1P0mDi@+"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="control" id="i.%~#D;,mB8rOj33T$p0"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="`|;^}taOCR^vU`*[@}u/"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="controls_if" id=",X!?F:hx,|E%l$2(]/o]"> <value name="IF0"> <block type="get_value" id="79CEJPg{`#6#3f?8rT`Z"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="control" id="|`WZxD2/oIc_]vsGxbma"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="q0~LSlGZ3=w0yXjjgf5G"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="on" id="K.nCT?sMD)N93hL6vUSS"> <field name="OID">hm-rpc.1.0010D8A990A572.1.ACTUAL_TEMPERATURE</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="ql|Os4j[cG3l{b-~gPD+"> <value name="IF0"> <block type="logic_multi_and" id="wSa+bH;t9nu2|5@GxO4E"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_negate" id="1p?Tt.8#0SX{Ad=K0G3w"> <value name="BOOL"> <block type="get_value" id="8s?!+JZa-x8`t`-f/SL^"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Anwesenheit.Haus.Jahreszeit_Winter</field> </block> </value> </block> </value> <value name="AND1"> <block type="get_value" id="92`5OOV2|FGRQ~_R33??"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Azimut</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="BoAxmRr#oX2v{+V!W1dE"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_multi_and" id="*90rj-=CXa|5yOL}qPby"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="{g3Tj-TgWqUXpDdyPqS7"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="/aleDq}X~:y+JbD!tfMU"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="~g#h1x|Tvd{PK+8li9*#"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="mozfd5D[](rlhKCzT|+i"> <value name="BOOL"> <block type="timeouts_gettimeout" id="Dwe7{A_[rdZYS:h+D~;x"> <field name="NAME">delayOnSchatten2</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id=",RUP{w[$sBQy-CFsoew("> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_cleartimeout" id="hU15yEjlIk/2*0eqR~xN"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="=l-FF(rTK|k3{tAlArW)"> <field name="NAME">delayOnSchatten2</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="u44R1FxtlM;5@_sd#]Rv"> <value name="IF0"> <block type="logic_negate" id="YQ2C1zTuRCCvkTlgNwN`"> <value name="BOOL"> <block type="get_value" id="lE9!L{au?Pol3-,=):w~"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="ET/bjbdB~c^vIk7A=sG`"> <field name="COMMENT">Schattenbedarf Stufe 2 erreicht</field> <next> <block type="control" id="_E_.q(GB3jJ2GX2db%u!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="h|W6|%0PDWv{5teDW`.N"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_multi_and" id="i#Si,Okbbo%662yWR[a1"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="r96?Jf9]Nj{Ydbbw8ywh"> <field name="OP">GTE</field> <value name="A"> <block type="on_source" id="`KvwseKO6!!Ts$OO|0RQ"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="dn3-5l+-)?~F5Kck=?_."> <field name="NUM">26</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="/f+[(HN@%Yb~3/UfaWJd"> <value name="BOOL"> <block type="timeouts_gettimeout" id="KRalU5XBmt9i7`NepTK5"> <field name="NAME">delayOnSchatten1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_cleartimeout" id="VO#Tu|J*UkFU|h+nwNl)"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id=",[C#Nfc}0!,b-y_BA^%1"> <field name="NAME">DelayOffSchatten</field> <next> <block type="timeouts_settimeout" id="t_uLE5~x}E5U[nj4p?h8"> <field name="NAME">delayOnSchatten1</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="!SJ[LO;q%jVUm2NmY(rt"> <value name="IF0"> <block type="logic_negate" id="-^@$.UtC9Nk(j(}%NHU2"> <value name="BOOL"> <block type="get_value" id="@oDLcZ}VE!SoWV}dOR0#"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="psHU?]#(MVkX+Y~|ybU0"> <field name="COMMENT">Schattenbedarf Stufe 1 erreicht</field> <next> <block type="control" id="E~8@]ape_P_PvtFjXZJo"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="(S0Fi^Som`7,ict=W]xN"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF2"> <block type="logic_multi_and" id="5;^vE[i8,xBy;K%MCMKD"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="AND0"> <block type="logic_compare" id="Cquamm`J0X-$8,ltG}O|"> <field name="OP">LT</field> <value name="A"> <block type="on_source" id="8C1j@iGLc$WY=:Lu{Zc="> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="mp*P!T^g.dx0+l7a05f5"> <field name="NUM">24</field> </block> </value> </block> </value> <value name="AND1"> <block type="logic_negate" id="(,?v@+bcD^A/$)_yVPtB"> <value name="BOOL"> <block type="timeouts_gettimeout" id="@oewxvlCUtqw,:Tltuev"> <field name="NAME">DelayOffSchatten</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="timeouts_cleartimeout" id="G@=ta!UbW=5|bE$d*mTV"> <field name="NAME">delayOnSchatten2</field> <next> <block type="timeouts_cleartimeout" id="1R*5t2Tx8%+T7i}msU0."> <field name="NAME">delayOnSchatten1</field> <next> <block type="timeouts_settimeout" id="x~ky6K^3wBCF$;JoD@w,"> <field name="NAME">DelayOffSchatten</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="controls_if" id="}WyTdvWPSH,+tB$*tL75"> <value name="IF0"> <block type="get_value" id="^v*DyN{W.hk)eInmF_Za"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> </block> </value> <statement name="DO0"> <block type="comment" id="OIX.Ab4|[i*8!uBNOX5U"> <field name="COMMENT">Schattenbedarf Stufe 1 deaktivieren</field> <next> <block type="control" id=";O-*nFa@bV=SZIa.];M["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="-c4~+oH#om37,Pn]q9%h"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="%HaK?$:00ApPvppN^kS("> <value name="IF0"> <block type="get_value" id="*~ec6X$hmafTMCzvxmpG"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> </block> </value> <statement name="DO0"> <block type="comment" id=")kMSXMfndgwp1ORKg)g4"> <field name="COMMENT">Schattenbedarf Stufe 2 deaktivieren</field> <next> <block type="control" id="g!|:w^;38G]u[q#(Xf2|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Schatten.Schattenbedarf_Ostwand_Temperatur_Stufe_2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="yHodE[=S:jA5yvXhmKp6"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </xml>Vielleicht kann mir jemand weiterhelfen?
Vielen Dank im Vorraus.
Takahara -
@takahara sagte: Wenn die Temperatur unter 30°C fällt, soll die Beschattungsstufe 1 weiterhin aktiv bleiben.
In deinem Skript bleibt auch Stufe 2 aktiv bis die Temperatur unter 24 °C fällt.
Vorschlag:

-
-
@takahara sagte: Woher bekomme ich das "ein"?
Das ist der Funktionsparameter. Die Variable wird automatisch erstellt.

Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden


