NEWS
Blocky, Timeout
-
Hi,
ich setze ein Timeout auf Stop wenn eine bedingung erfüllt ist, wenn diese wieder eintrifft möchte ich ich das der Timer wieder von vorn beginnt. Bei mir ist es so das die Zeit weiter an der gestopten stelle runterzählt.
Ich vermute ich brauche nicht ein Timeout Stop sonder ein Clear Timeout nur leider habe ich diesen Baustein nicht. Woher bekomme ich diesen? In manchen Blocky beschreibungen haben diesen manche User schon benutzt.
Gruß
Luigi
-
Clear = Englisch
Stop = Deutsch
Könntest du dein blockly Mal Posten mit Export das geht einfacher als Glaskugel suchen
–-----------------------
Send from mobile device
Das schöne ios hat Auto Korrektur zum k****
Wer Schreibfehler findet darf sie behalten oder auf eBay verkaufen, mindest Umsatz 10% für die community
-
klar kann ich das,
Ist aber eigentlich nicht wichtig da der Rantanplan schon ein funktionierendes gepostet hat, ich will nur wissen warum meines nicht funktioniert bzw, wo mein denk fehler ist, das es nicht das macht was ich will!
! ````
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="OXQr)6s4u)WRaA/sYd[]" x="-287" y="-113"><mutation items="1"></mutation>
<field name="CONDITION">any</field><value name="OID0"><shadow type="field_oid" id="hVKHR4v;5OQ3]KJm?4Ne"><field name="oid">tradfri.0.L-65541.lightbulb.brightness</field></shadow></value> <statement name="STATEMENT"><block type="controls_if" id="1p:576{Yr`R,YW}?{#q*"><value name="IF0"><block type="logic_compare" id="IgLmnX#i;RDdJ!F.!dwi"><field name="OP">GT</field> <value name="A"><block type="get_value" id="bbvL!gG:DS1C3.@LJ=8="><field name="ATTR">val</field> <field name="OID">tradfri.0.L-65541.lightbulb.brightness</field></block></value> <value name="B"><block type="math_number" id=":rvI^T/]33X=]9Whn2@M"><field name="NUM">70</field></block></value></block></value> <statement name="DO0"><block type="control" id="6y?a?]He1ZPeJ3ksSsVH"><mutation delay_input="false"></mutation> <field name="OID">javascript.0.SpuelmaschineAN</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="|gq7HEV2:Qm:mML4WO(y"><field name="BOOL">FALSE</field></block></value> <next><block type="variables_set" id="l#`y|,9Tuei:o(c{`tBq"><field name="VAR">Spuelmaschine_fertig</field> <value name="VALUE"><block type="logic_boolean" id="#!Clr61(]g}buhcJUwz-"><field name="BOOL">FALSE</field></block></value></block></next></block></statement> <next><block type="controls_if" id="upQVi)@0qJp#Pn~?vS(1"><value name="IF0"><block type="logic_compare" id="@2[YQKRO-dPfxMz!E0_+"><field name="OP">LT</field> <value name="A"><block type="get_value" id="*A?*@)xk2OVfe@OAO5x9"><field name="ATTR">val</field> <field name="OID">tradfri.0.L-65541.lightbulb.brightness</field></block></value> <value name="B"><block type="math_number" id="pn1L)m4B2vnLoQHhx-1O"><field name="NUM">5</field></block></value></block></value> <statement name="DO0"><block type="timeouts_settimeout" id="zH6g9~*Ufq?,*bup5W7R"><field name="NAME">timeout</field> <field name="DELAY">15</field> <field name="UNIT">sec</field> <statement name="STATEMENT"><block type="controls_if" id="W23vz;E*W^~xTvyvom7+"><value name="IF0"><block type="logic_operation" id="D(wi!(8?jmXp+B-Pot3J"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="MDFJ-ii-NO+5Yh;{E)fe"><field name="OP">LT</field> <value name="A"><block type="get_value" id="8B@hI1T|mRy(BGgD|5U{"><field name="ATTR">val</field> <field name="OID">tradfri.0.L-65541.lightbulb.brightness</field></block></value> <value name="B"><block type="math_number" id="Dw71y,9gjp(-yJp#v.Ry"><field name="NUM">5</field></block></value></block></value> <value name="B"><block type="logic_compare" id=")W)kjm6vUNwUcxnMq7/="><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="[zwGULxq+jhl_L*wsd0^"><field name="VAR">Spuelmaschine_fertig</field></block></value> <value name="B"><block type="logic_boolean" id="{{T;#bFuh.]I1.3`om.i"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <statement name="DO0"><block type="controls_if" id="5uH=jA:VlY`-9`Ft;uh2"><mutation else="1"></mutation> <value name="IF0"><block type="logic_operation" id="8|.UG}B^=j8BoRh.hBl#"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="yzF%6m#q:B?~:m;!-cRF"><field name="OP">GT</field> <value name="A"><block type="get_value" id="0~Ei@%Z,6!n1XTCgdOSk"><field name="ATTR">val</field> <field name="OID">tradfri.0.L-65541.lightbulb.brightness</field></block></value> <value name="B"><block type="math_number" id="k6W^P3u,m,-+C@2!Aa4X"><field name="NUM">5</field></block></value></block></value> <value name="B"><block type="logic_compare" id="TGR!iq7y:,E5+Y3+U%Cx"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="OYU]Ebl,^bN|khl1sbqM"><field name="VAR">Spuelmaschine_fertig</field></block></value> <value name="B"><block type="logic_boolean" id="3Hx9~|9hh1l)Yw0jCV!_"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <statement name="DO0"><block type="timeouts_cleartimeout" id="bppBYur``}u*C:vl3OF)"><field name="NAME">timeout</field> <next><block type="timeouts_clearinterval" id="5sD0YCW.gTE2b#-vx!LK"><next><block type="timeouts_cleartimeout" id="G#.W]A.U%vxmC?){qIRk"><field name="NAME">timeout</field> <next><block type="timeouts_cleartimeout" id="mss!%%+AdJR0;S,]/u7v"><field name="NAME">timeout</field></block></next></block></next></block></next></block></statement> <statement name="ELSE"><block type="pushover" id="k:Uf/_CKMW7fz)nX+~}w"><field name="INSTANCE">.1</field> <field name="PRIORITY">0</field> <value name="MESSAGE"><shadow type="text" id="c:2;FM!HNqmI0FV-;27e"><field name="TEXT">Spülmaschine fertig</field></shadow></value> <value name="TITLE"><block type="text" id="y=BPFIk:NWJRtIJPrik}"><field name="TEXT">Spülmaschine fertig</field></block></value> <value name="DEVICE"><block type="text" id="Pj3./a|{#~~h1B78?2%k"><field name="TEXT">Luigi</field></block></value> <next><block type="variables_set" id="FmwRf.B]o3UE):e*H^g|"><field name="VAR">Spuelmaschine_fertig</field> <value name="VALUE"><block type="logic_boolean" id=":)EBH4bz#N_AY5aUjOiL"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="2,kU}1:rUeWsSUN@WMWu"><mutation delay_input="false"></mutation> <field name="OID">javascript.0.SpuelmaschineAN</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="_DvITzV3,J]Zq,xz@4_4"><field name="BOOL">TRUE</field></block></value></block></next></block></next></block></statement></block></statement></block></statement></block></statement></block></next></block></statement></block></xml>
ups sehe gerade die ganzen stop sind nicht im originalen ![4298_test2.png](/assets/uploads/files/4298_test2.png) hier so richtig
-
bzw, wo mein denk fehler ist, das es nicht das macht was ich will! `
Schau Dir doch mal eine Bedingungen richtig an.In der Ersten fragst Du "falls brightness < 5….." und in der Zweiten "falls brightness > 5......"
Welchen Wert soll das denn sein?!
Wenn ein Timeout gestoppt wird, werden die Blöcke innerhalb des Timers NICHT mehr ausgeführt.
Du stoppst nun den Timer innerhalb des Timers.
Keine Ahnung was dann passiert.
Muss ich mal demnächst ein paar Tests machen.
Grüße
-
Ich verstehe den Aufbau des blockly auch nicht wirklich.
Doppelte abfragen und timer vor einer Abfrage?
–-----------------------
Send from mobile device
Das schöne ios hat Auto Korrektur zum k****
Wer Schreibfehler findet darf sie behalten oder auf eBay verkaufen, mindest Umsatz 10% für die community
-
Gut,
ich dann bin ich nicht einzige der den Code nicht versteht. Nein spass bei seite ich verstehe das ganze ja auch nicht ich mache das so wie ich das für richtig halte leider mit mäßigen erfolg.
und das macht mich wahnsinnig.
Wobei es ja eigentlich ganz einfach ist. ahh!
-
Wobei es ja eigentlich ganz einfach ist. ahh! `
Ist es eigentlich auchDie Bausteine werden von oben nach unten abgearbeitet.
Einfach mal das Blockly, sich selbst, von oben nach unten vorlesen.
Und bedenken das das Script genau das macht was da steht.
Grüße