NEWS
[gelöst]Smarte Waschmaschine Blocklyfehler
-
mit "inTimeout" meinst du meinen Datenpunkt "Waschmaschine läuft", oder?
Damit ich versuche dies zu verstehen! -
@jwedenig "inTimeout" ist eine Variable im Skript. Diese Variable spiegelt sozusagen den Zustand des Timeout wieder. Also wenn der Timeout beginnt wird "inTimout" auf true gesetzt, also "gesagt" das sich das Skript im Timeout befindet und nicht noch einmal aufgerufen werden muss.
Die Variable hat nichts mit dem DP "Waschmaschine läuft" zu tun.
Du kannst oben rechts im Bearbeitungsfenster auch zwischen der Blocky und JS Ansicht wechseln. Dort siehst du auch am Anfang die deklarierte Variable.
-
Meinst Du so?
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="V9/TviR{0#g;/_S{~!W9">inTimeout</variable> <variable type="undefined" id="timeout">timeout</variable> </variables> <block type="variables_set" id="/5iCS+tfQawO(8ho[n=]" x="37" y="-12"> <field name="VAR" id="V9/TviR{0#g;/_S{~!W9" variabletype="">inTimeout</field> <value name="VALUE"> <block type="logic_boolean" id="T~7a~+Kgc1a*/km|BSSE"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="on" id="wJAD_6Tt~y.J~Y){`}vx"> <field name="OID">hs100.0.192_168_1_69.power</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="6Y^wq_WC]M{/fHM/Qj(?"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="NB%1alrWMb4Z8rdC(0M{"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="yi9-O72uP0eZ-B4gl|(:"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="`*{?Ux2qblDTp$~qpIW^"> <field name="ATTR">val</field> <field name="OID">hs100.0.192_168_1_69.power</field> </block> </value> <value name="B"> <block type="math_number" id="/~+@cS^+RU-]2l%S92(2"> <field name="NUM">10</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=")eMq@`{mWrjCI,vUfBfy"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="^^?mc19R^!x^*V7=[ERO"> <field name="ATTR">val</field> <field name="OID">virtuelle_Knoten.0.Waschmaschine_läuft</field> </block> </value> <value name="B"> <block type="logic_boolean" id="+Cjq?OVJSLIPBfaLnr-6"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="update" id="_aI72~qdAF/Unh]y{r*6"> <mutation delay_input="false"></mutation> <field name="OID">virtuelle_Knoten.0.Waschmaschine_läuft</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="5.K4H_8PW*?^u|W`hYld"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="h^CgS-5@$0FF!;r*Ge/9"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090L90965230UL0.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="p50DxWRt!D3z5pHRQwY["> <field name="TEXT">Die Waschmaschine wurde gestartet!</field> </block> </value> <next> <block type="telegram" id="|;B/GcZ[ArV70vDrEufa"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="Wk7F{GD!o`1Wb#5Qp+QO"> <field name="TEXT">Die Waschmaschine wurde gestartet!</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="7~V{RD3jd66I#NldR(#z"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="B#9RLg6{X`M%69evQ3t{"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="]!{JQB75hzn?-CkE!t-B"> <field name="VAR" id="V9/TviR{0#g;/_S{~!W9" variabletype="">inTimeout</field> </block> </value> <value name="B"> <block type="logic_boolean" id="us56[xZK(XsH)D7S;4[V"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="@;TJ@N]%:Fo]o8;ad@NU"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="/)[48L=1U#NEo$K+o*{`"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="HiFUx}3xX)y%9|T~zr1-"> <field name="ATTR">val</field> <field name="OID">hs100.0.192_168_1_69.power</field> </block> </value> <value name="B"> <block type="math_number" id="d_:@yS}a9e29tcGD`}6:"> <field name="NUM">4</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="V]X(u]9%=qvMaJ^3h3}s"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="*2V:EW2}]5KB$73Lkbqt"> <field name="ATTR">val</field> <field name="OID">virtuelle_Knoten.0.Waschmaschine_läuft</field> </block> </value> <value name="B"> <block type="logic_boolean" id="s~tV8uSGmLsWcRodoX(W"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_settimeout" id="U6B`-Z[=2iHL2UKZH3Gs"> <field name="NAME">timeout</field> <field name="DELAY">60</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="update" id="T$7so:*P#zS7;qFFP5D^"> <mutation delay_input="false"></mutation> <field name="OID">virtuelle_Knoten.0.Waschmaschine_läuft</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="0;oN0Zj+`XAmi5-zpyGj"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id=";0bJlg8qya=5i.Pj7v_W"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090L90965230UL0.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="P.KsgXq;Z4m,R|Q^53fU"> <field name="TEXT">Die Waschmaschine ist fertig!</field> </block> </value> <next> <block type="variables_set" id="^z,ST.HVxk;7reLM$P:I"> <field name="VAR" id="V9/TviR{0#g;/_S{~!W9" variabletype="">inTimeout</field> <value name="VALUE"> <block type="logic_boolean" id="vipw|J6tNu5wk5535dse"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="telegram" id="mJQKn]K=;um%mdYGT]`#"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="-AtBJ7ME%=n$+HGYTyuZ"> <field name="TEXT">Die Waschmaschine ist fertig!</field> </shadow> </value> <next> <block type="variables_set" id="D{F{`#j?*Kz5},|XWKC6"> <field name="VAR" id="V9/TviR{0#g;/_S{~!W9" variabletype="">inTimeout</field> <value name="VALUE"> <block type="logic_boolean" id="%TG[Lsj:ck5+r^YlZ)8D"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </xml>
-
-
@jwedenig fast richtig. Du muss das "Setze inTimeout auf wahr" außerhalb des Timeoutblockes packen. Also am besten packst du den Block einfach direkt vor den Timeout Block.
So wie es jetzt ist würde es nicht viel bringen, da die Variable erst nach dem Timeout gesetzt werden würde.
-
jetzt aber, oder?
Bin gespannt, ob es funktioniert -
@jwedenig sagte:
jetzt aber, oder?
Nein, setze inTimeout auf falsch muss in den timeout / verzögert ausgeführt werden.
-
Das sollte die richtige Version sein.
-
Super, danke Euch, werde wieder testen und berichten!
Schönen Abend! -
vielen Dank nochmals, es funktioniert nun tadellos!
Liebe Grüße
Jürgen