NEWS
Mehrere Heizkörper Synchronisiseren, value storm
-
@smo Ich habe im Grunde das setzen der Werte ausgelagert und aus der Gruppenkonfiguration heraus einen onChange Listener gebaut, der auf alle Werte lauscht, die Du synchronisieren willst.
Jede Änderung an den Werten eines Gruppenmitglieds führt dazu, dass der Code separat einen Timer mit 2sec anwirft, der dann nach den 2sec eine Funktion aufruft, die prüft, ob der/die Wert(e) sich seit dem Aufruf verändert haben. Ist dem der Fall, macht sie gar nichts.
So umgeht man das setzen der Werte egal wie die Zeitliche Abfolge aussieht und ob da irgendwo zwischendrin etwas hängt oder so, denn nur wenn der Wert sich seit dem Aufruf nicht verändert hat (2sec), wird auch etwas synchronisiert.
Solltest Du also zum Beispiel einen Wert versehentlich ändern und binnen 2sec wieder zurück setzen, passiert nichts.@great-sun Nochmal gegenchecken ob die Änderung nach dem Ablauf des Timers noch genau so besteht ist ne ziemlich gute Idee :) Gleich mit eingebaut:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xwP+E7r*%:9g!Q/8k!*u">Kueche</variable> <variable id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</variable> <variable id="LJYmQ224PvX(za_jPm!_">Stube-Sued</variable> <variable id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</variable> <variable type="timeout" id="timeout">timeout</variable> <variable id="d|fQQ^z{.5`R~GJleE[U">idZiel1</variable> <variable id="~avL/#WiGg4U,4l5M5+L">idZiel2</variable> </variables> <block type="variables_set" id="}`|5T^zl8rrO05gh{9td" x="-162" y="-362"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> <value name="VALUE"> <block type="field_oid" id="cVcm=hQi#;N[p(`f|saz"> <field name="oid">zigbee.0.84fd27fffea5aa76.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id="D#=Oy8`3ZC$2p8z5,^*o"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> <value name="VALUE"> <block type="field_oid" id=",dWvxR6VD`sHLg2K%Q1B"> <field name="oid">zigbee.0.84fd27fffea5a776.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id=";`XS`L?KTPd/AWs0J:3~"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> <value name="VALUE"> <block type="field_oid" id="Th$Wq$lmufG.x_qeP**b"> <field name="oid">zigbee.0.cc86ecfffeb7ff1a.current_heating_setpoint</field> </block> </value> <next> <block type="on_ext" id="rNCavHPQHqv[%LtqKZw~"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION">false</field> <value name="OID0"> <shadow type="field_oid" id="]:K7sxy+Z1=fLir+S/O;"> <field name="oid">zigbee.0.b4e3f9fffe11af85.current_heating_setpoint</field> </shadow> <block type="variables_get" id="*QY%|A3{Okrmh2OMTG.*"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <value name="OID1"> <shadow type="field_oid" id="uy;(g-Jex[e?@d9?h_]@"> <field name="oid">default</field> </shadow> <block type="variables_get" id="P7vBCrFl8E]IT;tc4973"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <value name="OID2"> <shadow type="field_oid" id="J:G4DbTwRa)_X7ShcRnV"> <field name="oid">default</field> </shadow> <block type="variables_get" id="sxUf:.!$H]L8MEptV:iv"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="oi*@RHmtQ{8m54wIwb[7"> <value name="IF0"> <block type="logic_compare" id="GAXt}vZ_/puqs=w9D{t9"> <field name="OP">NEQ</field> <value name="A"> <block type="on_source" id="^p7CtQ3=z}Fv!JBL:}|6"> <field name="ATTR">state.from</field> </block> </value> <value name="B"> <block type="text" id="$=8NvT]JGeg]dQX##U@3"> <field name="TEXT">system.adapter.javascript.0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="@m)|afm9vfkId3MwaxBg"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> <value name="VALUE"> <block type="on_source" id="RRck8Pm/jASL,?|E^eFC"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="timeouts_cleartimeout" id="6qBn%jN)iTq=Rj.z]9oJ"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id=".}%W2Ft85m2#Tu/oT(qK"> <field name="NAME">timeout</field> <field name="DELAY">1500</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id="C@^DUGSfh(=XA`:)nTOj"> <value name="IF0"> <block type="logic_compare" id="8ojH(8HOSMs7a@FHhc[d"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="#a;*GGU,pfWi(ZRlLM[@"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> </block> </value> <value name="B"> <block type="get_value_var" id="wzkw~11W=+#OYI0V|Is_"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Ok$F/iT$bcwE99!;fKU/"> <field name="TEXT"></field> </shadow> <block type="on_source" id="*Qo~ytz3k,oxXfLWBn^W"> <field name="ATTR">id</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="logic_switch_case" id=".h;5GTblOo.hLH`R;cq#"> <mutation xmlns="http://www.w3.org/1999/xhtml" case="1" default="1"></mutation> <value name="CONDITION"> <block type="on_source" id="%[P7X^cdD^twDGYo@w]/"> <field name="ATTR">id</field> </block> </value> <value name="CASECONDITION0"> <block type="variables_get" id="Mgi]C=yW!W,z]xnt_cJw"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <statement name="CASE0"> <block type="variables_set" id="@lEY@(,h*MTSy:e{caEI"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="t1PcK,}-Vzug_07*0Sgs"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <next> <block type="variables_set" id="4}Y3aRhQ].{x$*fr~Owv"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="OH!Fw#;8r$qP_@y5b!;L"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> </block> </next> </block> </statement> <value name="CASECONDITION1"> <block type="variables_get" id="cS=Esi8cP[@Xq7oe1w,0"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <statement name="CASE1"> <block type="variables_set" id="HW/iFSllX1%qK+G!o-gV"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="qZVI[pTbd.qFfykJy$lf"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <next> <block type="variables_set" id="(Hfwzk)Nd#Zs#ZFY`^=|"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="N3DfM30dZIj]2{%s|WR0"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> </block> </next> </block> </statement> <statement name="ONDEFAULT"> <block type="variables_set" id="dth`4:`=z]+0HiS*P|%;"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="B-Vde1A]D,6w@^k#_5bq"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <next> <block type="variables_set" id="WV,SGvU~}|:J;FR@HO@`"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="e,2/_qXR3v(S~ZDB:Q#y"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> </block> </next> </block> </statement> <next> <block type="control_ex" id="m8n(ez~Ih}c!g.tJCO_+" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="CTD:j1@O(mDK$,v{Uh;c"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="f4#m[n3|OFPcq-0cuvX2"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="+pi$o-3WYA;Hv-`7j^]p"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="tc{BuczraO#{E-GtWH:~"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="`-HY6@Y1WUq`#z6WzM@N"> <field name="NUM">0</field> </shadow> </value> <next> <block type="control_ex" id="*8t)fh|aw6pOWtpC4#PW" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="$wO;{`X9C?,n2q4a/iiq"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="/f,=NCV*|v^xcO4[i_={"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="n*d/SJvg$g)CYTW}0dD-"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml> -
@great-sun Nochmal gegenchecken ob die Änderung nach dem Ablauf des Timers noch genau so besteht ist ne ziemlich gute Idee :) Gleich mit eingebaut:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xwP+E7r*%:9g!Q/8k!*u">Kueche</variable> <variable id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</variable> <variable id="LJYmQ224PvX(za_jPm!_">Stube-Sued</variable> <variable id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</variable> <variable type="timeout" id="timeout">timeout</variable> <variable id="d|fQQ^z{.5`R~GJleE[U">idZiel1</variable> <variable id="~avL/#WiGg4U,4l5M5+L">idZiel2</variable> </variables> <block type="variables_set" id="}`|5T^zl8rrO05gh{9td" x="-162" y="-362"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> <value name="VALUE"> <block type="field_oid" id="cVcm=hQi#;N[p(`f|saz"> <field name="oid">zigbee.0.84fd27fffea5aa76.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id="D#=Oy8`3ZC$2p8z5,^*o"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> <value name="VALUE"> <block type="field_oid" id=",dWvxR6VD`sHLg2K%Q1B"> <field name="oid">zigbee.0.84fd27fffea5a776.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id=";`XS`L?KTPd/AWs0J:3~"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> <value name="VALUE"> <block type="field_oid" id="Th$Wq$lmufG.x_qeP**b"> <field name="oid">zigbee.0.cc86ecfffeb7ff1a.current_heating_setpoint</field> </block> </value> <next> <block type="on_ext" id="rNCavHPQHqv[%LtqKZw~"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION">false</field> <value name="OID0"> <shadow type="field_oid" id="]:K7sxy+Z1=fLir+S/O;"> <field name="oid">zigbee.0.b4e3f9fffe11af85.current_heating_setpoint</field> </shadow> <block type="variables_get" id="*QY%|A3{Okrmh2OMTG.*"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <value name="OID1"> <shadow type="field_oid" id="uy;(g-Jex[e?@d9?h_]@"> <field name="oid">default</field> </shadow> <block type="variables_get" id="P7vBCrFl8E]IT;tc4973"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <value name="OID2"> <shadow type="field_oid" id="J:G4DbTwRa)_X7ShcRnV"> <field name="oid">default</field> </shadow> <block type="variables_get" id="sxUf:.!$H]L8MEptV:iv"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="oi*@RHmtQ{8m54wIwb[7"> <value name="IF0"> <block type="logic_compare" id="GAXt}vZ_/puqs=w9D{t9"> <field name="OP">NEQ</field> <value name="A"> <block type="on_source" id="^p7CtQ3=z}Fv!JBL:}|6"> <field name="ATTR">state.from</field> </block> </value> <value name="B"> <block type="text" id="$=8NvT]JGeg]dQX##U@3"> <field name="TEXT">system.adapter.javascript.0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="@m)|afm9vfkId3MwaxBg"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> <value name="VALUE"> <block type="on_source" id="RRck8Pm/jASL,?|E^eFC"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="timeouts_cleartimeout" id="6qBn%jN)iTq=Rj.z]9oJ"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id=".}%W2Ft85m2#Tu/oT(qK"> <field name="NAME">timeout</field> <field name="DELAY">1500</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id="C@^DUGSfh(=XA`:)nTOj"> <value name="IF0"> <block type="logic_compare" id="8ojH(8HOSMs7a@FHhc[d"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="#a;*GGU,pfWi(ZRlLM[@"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> </block> </value> <value name="B"> <block type="get_value_var" id="wzkw~11W=+#OYI0V|Is_"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Ok$F/iT$bcwE99!;fKU/"> <field name="TEXT"></field> </shadow> <block type="on_source" id="*Qo~ytz3k,oxXfLWBn^W"> <field name="ATTR">id</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="logic_switch_case" id=".h;5GTblOo.hLH`R;cq#"> <mutation xmlns="http://www.w3.org/1999/xhtml" case="1" default="1"></mutation> <value name="CONDITION"> <block type="on_source" id="%[P7X^cdD^twDGYo@w]/"> <field name="ATTR">id</field> </block> </value> <value name="CASECONDITION0"> <block type="variables_get" id="Mgi]C=yW!W,z]xnt_cJw"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <statement name="CASE0"> <block type="variables_set" id="@lEY@(,h*MTSy:e{caEI"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="t1PcK,}-Vzug_07*0Sgs"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <next> <block type="variables_set" id="4}Y3aRhQ].{x$*fr~Owv"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="OH!Fw#;8r$qP_@y5b!;L"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> </block> </next> </block> </statement> <value name="CASECONDITION1"> <block type="variables_get" id="cS=Esi8cP[@Xq7oe1w,0"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <statement name="CASE1"> <block type="variables_set" id="HW/iFSllX1%qK+G!o-gV"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="qZVI[pTbd.qFfykJy$lf"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <next> <block type="variables_set" id="(Hfwzk)Nd#Zs#ZFY`^=|"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="N3DfM30dZIj]2{%s|WR0"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> </block> </next> </block> </statement> <statement name="ONDEFAULT"> <block type="variables_set" id="dth`4:`=z]+0HiS*P|%;"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="B-Vde1A]D,6w@^k#_5bq"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <next> <block type="variables_set" id="WV,SGvU~}|:J;FR@HO@`"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="e,2/_qXR3v(S~ZDB:Q#y"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> </block> </next> </block> </statement> <next> <block type="control_ex" id="m8n(ez~Ih}c!g.tJCO_+" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="CTD:j1@O(mDK$,v{Uh;c"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="f4#m[n3|OFPcq-0cuvX2"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="+pi$o-3WYA;Hv-`7j^]p"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="tc{BuczraO#{E-GtWH:~"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="`-HY6@Y1WUq`#z6WzM@N"> <field name="NUM">0</field> </shadow> </value> <next> <block type="control_ex" id="*8t)fh|aw6pOWtpC4#PW" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="$wO;{`X9C?,n2q4a/iiq"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="/f,=NCV*|v^xcO4[i_={"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="n*d/SJvg$g)CYTW}0dD-"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml> -
@great-sun Nochmal gegenchecken ob die Änderung nach dem Ablauf des Timers noch genau so besteht ist ne ziemlich gute Idee :) Gleich mit eingebaut:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xwP+E7r*%:9g!Q/8k!*u">Kueche</variable> <variable id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</variable> <variable id="LJYmQ224PvX(za_jPm!_">Stube-Sued</variable> <variable id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</variable> <variable type="timeout" id="timeout">timeout</variable> <variable id="d|fQQ^z{.5`R~GJleE[U">idZiel1</variable> <variable id="~avL/#WiGg4U,4l5M5+L">idZiel2</variable> </variables> <block type="variables_set" id="}`|5T^zl8rrO05gh{9td" x="-162" y="-362"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> <value name="VALUE"> <block type="field_oid" id="cVcm=hQi#;N[p(`f|saz"> <field name="oid">zigbee.0.84fd27fffea5aa76.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id="D#=Oy8`3ZC$2p8z5,^*o"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> <value name="VALUE"> <block type="field_oid" id=",dWvxR6VD`sHLg2K%Q1B"> <field name="oid">zigbee.0.84fd27fffea5a776.current_heating_setpoint</field> </block> </value> <next> <block type="variables_set" id=";`XS`L?KTPd/AWs0J:3~"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> <value name="VALUE"> <block type="field_oid" id="Th$Wq$lmufG.x_qeP**b"> <field name="oid">zigbee.0.cc86ecfffeb7ff1a.current_heating_setpoint</field> </block> </value> <next> <block type="on_ext" id="rNCavHPQHqv[%LtqKZw~"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION">false</field> <value name="OID0"> <shadow type="field_oid" id="]:K7sxy+Z1=fLir+S/O;"> <field name="oid">zigbee.0.b4e3f9fffe11af85.current_heating_setpoint</field> </shadow> <block type="variables_get" id="*QY%|A3{Okrmh2OMTG.*"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <value name="OID1"> <shadow type="field_oid" id="uy;(g-Jex[e?@d9?h_]@"> <field name="oid">default</field> </shadow> <block type="variables_get" id="P7vBCrFl8E]IT;tc4973"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <value name="OID2"> <shadow type="field_oid" id="J:G4DbTwRa)_X7ShcRnV"> <field name="oid">default</field> </shadow> <block type="variables_get" id="sxUf:.!$H]L8MEptV:iv"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="oi*@RHmtQ{8m54wIwb[7"> <value name="IF0"> <block type="logic_compare" id="GAXt}vZ_/puqs=w9D{t9"> <field name="OP">NEQ</field> <value name="A"> <block type="on_source" id="^p7CtQ3=z}Fv!JBL:}|6"> <field name="ATTR">state.from</field> </block> </value> <value name="B"> <block type="text" id="$=8NvT]JGeg]dQX##U@3"> <field name="TEXT">system.adapter.javascript.0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="@m)|afm9vfkId3MwaxBg"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> <value name="VALUE"> <block type="on_source" id="RRck8Pm/jASL,?|E^eFC"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="timeouts_cleartimeout" id="6qBn%jN)iTq=Rj.z]9oJ"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id=".}%W2Ft85m2#Tu/oT(qK"> <field name="NAME">timeout</field> <field name="DELAY">1500</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id="C@^DUGSfh(=XA`:)nTOj"> <value name="IF0"> <block type="logic_compare" id="8ojH(8HOSMs7a@FHhc[d"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="#a;*GGU,pfWi(ZRlLM[@"> <field name="VAR" id="PL6ZeJ*=r3uKgdG-:cQC">Temperatur</field> </block> </value> <value name="B"> <block type="get_value_var" id="wzkw~11W=+#OYI0V|Is_"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Ok$F/iT$bcwE99!;fKU/"> <field name="TEXT"></field> </shadow> <block type="on_source" id="*Qo~ytz3k,oxXfLWBn^W"> <field name="ATTR">id</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="logic_switch_case" id=".h;5GTblOo.hLH`R;cq#"> <mutation xmlns="http://www.w3.org/1999/xhtml" case="1" default="1"></mutation> <value name="CONDITION"> <block type="on_source" id="%[P7X^cdD^twDGYo@w]/"> <field name="ATTR">id</field> </block> </value> <value name="CASECONDITION0"> <block type="variables_get" id="Mgi]C=yW!W,z]xnt_cJw"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <statement name="CASE0"> <block type="variables_set" id="@lEY@(,h*MTSy:e{caEI"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="t1PcK,}-Vzug_07*0Sgs"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <next> <block type="variables_set" id="4}Y3aRhQ].{x$*fr~Owv"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="OH!Fw#;8r$qP_@y5b!;L"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> </block> </next> </block> </statement> <value name="CASECONDITION1"> <block type="variables_get" id="cS=Esi8cP[@Xq7oe1w,0"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> <statement name="CASE1"> <block type="variables_set" id="HW/iFSllX1%qK+G!o-gV"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="qZVI[pTbd.qFfykJy$lf"> <field name="VAR" id="LJYmQ224PvX(za_jPm!_">Stube-Sued</field> </block> </value> <next> <block type="variables_set" id="(Hfwzk)Nd#Zs#ZFY`^=|"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="N3DfM30dZIj]2{%s|WR0"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> </block> </next> </block> </statement> <statement name="ONDEFAULT"> <block type="variables_set" id="dth`4:`=z]+0HiS*P|%;"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> <value name="VALUE"> <block type="variables_get" id="B-Vde1A]D,6w@^k#_5bq"> <field name="VAR" id="xwP+E7r*%:9g!Q/8k!*u">Kueche</field> </block> </value> <next> <block type="variables_set" id="WV,SGvU~}|:J;FR@HO@`"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> <value name="VALUE"> <block type="variables_get" id="e,2/_qXR3v(S~ZDB:Q#y"> <field name="VAR" id="i}L,KT[`hM%j=fb;7(]g">Stube-Ost</field> </block> </value> </block> </next> </block> </statement> <next> <block type="control_ex" id="m8n(ez~Ih}c!g.tJCO_+" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="CTD:j1@O(mDK$,v{Uh;c"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="f4#m[n3|OFPcq-0cuvX2"> <field name="VAR" id="d|fQQ^z{.5`R~GJleE[U">idZiel1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="+pi$o-3WYA;Hv-`7j^]p"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="tc{BuczraO#{E-GtWH:~"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="`-HY6@Y1WUq`#z6WzM@N"> <field name="NUM">0</field> </shadow> </value> <next> <block type="control_ex" id="*8t)fh|aw6pOWtpC4#PW" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="$wO;{`X9C?,n2q4a/iiq"> <field name="VAR" id="~avL/#WiGg4U,4l5M5+L">idZiel2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="/f,=NCV*|v^xcO4[i_={"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="n*d/SJvg$g)CYTW}0dD-"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>@smo sagte: ob die Änderung nach dem Ablauf des Timers noch genau so besteht ist ne ziemlich gute Idee
Diese zusätzliche Abfrage ist sinnlos: Hätte sich der Wert innerhalb der Verzögerungszeit geändert, würde getriggert, der Timer gestoppt und neu gestartet. Eine Wertänderung während der Verzögerung führt also zu keiner Aktion.
Anmerkung: Bei Trigger auf "unbestätigte Änderung" kann der Sollwert nicht mehr an einem Thermostat für alle 3 Thermostate geändert werden. Geräte senden immer "bestätigt".
-
@smo sagte: ob die Änderung nach dem Ablauf des Timers noch genau so besteht ist ne ziemlich gute Idee
Diese zusätzliche Abfrage ist sinnlos: Hätte sich der Wert innerhalb der Verzögerungszeit geändert, würde getriggert, der Timer gestoppt und neu gestartet. Eine Wertänderung während der Verzögerung führt also zu keiner Aktion.
Anmerkung: Bei Trigger auf "unbestätigte Änderung" kann der Sollwert nicht mehr an einem Thermostat für alle 3 Thermostate geändert werden. Geräte senden immer "bestätigt".