NEWS
[Blockly] Alarm mit Timeout
-
Hallo zusammen,
ich möchte einen Alarm ausführen wenn eine Tür geöffnet wird und vom Radar Adapter der Dp "count here" auf "0" steht,
da es aber so läuft das wenn ich die Tür öffne und der Alarm nicht sofort losgehen soll möchte ich dem Radar Adapter 122sek zeit geben um meinen Gtag zu erkennen und somit den Timer Stoppen. Wichtig für mich ist das der Gtag den Timer stoppt wenn er zb. nach 60sek. erkannt wird und nach 122sek der "count here" wieder auf "0" steht, wenn man mal kurz was holen muss.
Jetzt habe ich schon einiges versucht… aber ich komme einfach nicht zum Ziel, die suche hat mir leider auch nicht weiter geholfen.
Bräuchte da mal einen Schubser in die richtige Richtung.
So geht es nicht:
Blockly Export:
<block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="~~FaaVDWq9{=~qmgp01a" x="-512.1200256347656" y="-37.63387870788574"><mutation items="1"></mutation> <field name="CONDITION">ne</field> <value name="OID0"><shadow type="field_oid" id="UioM=_4ya~bm~Fv+AQBJ"><field name="oid">hm-rpc.0.OEQ0223932.1.STATE</field></shadow></value> <statement name="STATEMENT"><block type="controls_if" id="JBT;03Jpt#LQIAi9IkLf"><mutation else="1"></mutation> <value name="IF0"><block type="logic_compare" id="rV4li^Rmu4zpQsE3S(dp"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="y_:kP[grHJEZT!(LmeLw"><field name="ATTR">val</field> <field name="OID">radar.0.countHere</field></block></value> <value name="B"><block type="math_number" id="x,4QX=:ve+,OtNkbb*!_"><field name="NUM">0</field></block></value></block></value> <statement name="DO0"><block type="timeouts_settimeout" id="c=t_X`8;aVf40tVN`Sx{"><field name="NAME">timeout</field> <field name="DELAY">122</field> <field name="UNIT">sec</field> <statement name="STATEMENT"><block type="control" id="ma=UhZWk1jutpp}](]nC"><mutation delay_input="false"></mutation> <field name="OID">milight.0.zone1.hue</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="math_number" id="XY1U}%w!]1p@{^bfi|2L"><field name="NUM">175</field></block></value> <next><block type="control" id="Pw*OQu{2;U-3`(eQ#ZQJ"><mutation delay_input="true"></mutation> <field name="OID">knx.0.Beleuchtung.Schalten.Außenbel__Esszimmer</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">500</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="h3g2Bn,5a4mhUH3gF*Vr"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="WP!GLTq:bBEB8U(z]Jw_"><mutation delay_input="true"></mutation> <field name="OID">knx.0.Beleuchtung.Schalten.Außenbel__HWR</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="o;pI;tlZFCjO%eIIr6m_"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="l/4W(}-7P?bO3H!e5A/K"><mutation delay_input="true"></mutation> <field name="OID">knx.0.Beleuchtung.Schalten.Außenbel__Wohnzimmer</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1500</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="JY8Ts=QfhAc%,BCz*hWX"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="JT5mB*P+lB7d5u:Gomji"><mutation delay_input="true"></mutation> <field name="OID">hm-rpc.0.NEQ1734950.1.STATE</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="y!s+ei;z=feXaDgEHI8t"><field name="BOOL">TRUE</field></block></value> <next><block type="telegram" id="JPJN==[g3X%sXV?UY(Vn"><value name="MESSAGE"><shadow type="text" id="9/3CFhn)N68M*AUBD3Fz"><field name="TEXT">Haustür wurde geöffnet</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement> <statement name="ELSE"><block type="timeouts_cleartimeout" id="L}ED*p{E{-^czOp1}54O"><field name="NAME">timeout</field></block></statement></block></statement></block>
Gruß Christian