NEWS
Skript Fenster auf nicht optimal
-
Hallo Zusammen,
ich hatte letztes Jahr schon mal ein Skript gebaut und in Aktion genommen, welches den Fensterstatus und Temperatur Abfall überwachsen soll. Irgendwie läuft dieses aber nicht optimal. So werden die Meldungen zu schnell nacheinander ausgegeben (logisch die Temperatur ist < der Mindesttemperatur und fällt weiter).
Hat jemand eine Idee zur Optimierung z.B. Zwischen erster Meldung und erneuter Prüfung einen Timer
oder hat jemand ein schlaueres, irgendwie erscheint es mir selber aktuell fragwürdig warum ich als Trigger die Temperatur nehme und nicht den Fensterstatus?<block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="i_%w!B3XTB]C}MLrhG$o" x="-98" y="-2514"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="]t}%]B=dQr?16;,zON4^"> <field name="oid">default</field> </shadow> <block type="field_oid" id="%cFwTqh=|kt4rf!Yg^B["> <field name="oid">hm-rpc.1.000393C99BEECA.1.ACTUAL_TEMPERATURE_STATUS</field> </block> </value> <value name="OID1"> <shadow type="field_oid" id="ZlD1I[do%M*s?2gOY;v~"> <field name="oid">default</field> </shadow> <block type="field_oid" id="TX`?E5*UO!:A0*Rlh?[P"> <field name="oid">zigbee.0.00158d000273c35f.temperature</field> </block> </value> <statement name="STATEMENT"> <block type="comment" id="x2Y2YCf:9:{xsbYi[VKz"> <field name="COMMENT">Trigger Fenster und Trigger Temperaturabfall</field> <next> <block type="controls_if" id="z^$A*=PqAa*B|y[{c#|;"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="zAZ/n`RHg/G1Jv4.zd^a" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="cgfXS,33]RMwN?]ZEvV+"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="*G3+;]6O@qf=qV_B4Eu)"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0000D3C99985C1.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="n6xzyypLNRbG])A//o{3"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="Sv7n+M;)smd$(:4mA32s" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="n!cS6py@n;}9B1S@|km@"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="jvNauVYNP_${:-F5CKS~"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.000393C99BEECA.1.ACTUAL_TEMPERATURE</field> </block> </value> <value name="B"> <block type="math_number" id=";*a,GKd.[paXySdwG[?R"> <field name="NUM">19.5</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="rpS2I*#//:6cyM%A!Kb1"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="zhzfyFX#H(Taqcm^(k34"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d000273c35f.temperature</field> </block> </value> <value name="B"> <block type="math_number" id="7^t9xO918h^ddUO9do2d"> <field name="NUM">19.5</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="VNX`R(-z1hdjl841LK`|"> <field name="COMMENT">Alexa und Pushover mit variablen Text ansprechen</field> <next> <block type="timeouts_settimeout" id="=Vju)wrYVCw7+c~SA{$C"> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="]Ul{`mu/{j/e~,F(=;_~"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.429c7541422f43bfbf236d2d3d7af066.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="WM%@-:YC-I$4prv6.[bN"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="_hdpH;8fAM(0XPHWkA|z"> <field name="TEXT">Fenster Schlafzimmer schließen, Temperatur nur noch bei </field> </block> </value> <value name="ADD1"> <block type="math_round" id="Vd~0{~)02BzqT_IM3.6s"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="./rUWv8ZCTD)ET.1|UU)"> <field name="NUM">3.1</field> </shadow> <block type="get_value" id="*9*G{n9-AfW5@#~`F%7j"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d000273c35f.temperature</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="7lt;[m|Uvcb?c#^aZk#v"> <field name="TEXT"> Grad</field> </block> </value> </block> </value> <next> <block type="pushover" id=".KQO5,XYBdF:^RPG}E(W"> <field name="INSTANCE"></field> <field name="SOUND"></field> <field name="PRIORITY">0</field> <field name="LOG"></field> <value name="MESSAGE"> <shadow type="text" id="B`,lTv/-Df5Szb/R!9HE"> <field name="TEXT">Fenster im Schlafzimmer schließen</field> </shadow> <block type="text_join" id="YPbYht64Knl#9GqfF`c{"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="N,+@|n:a]DD#;76u0gLV"> <field name="TEXT">Fenster Schlafzimmer schließen, Temperatur nur noch bei </field> </block> </value> <value name="ADD1"> <block type="math_round" id="c(XKF)o+9%~qj{IS1,ge"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="?).In!1~E0dP`GHgu`Vm"> <field name="NUM">3.1</field> </shadow> <block type="get_value" id="$sAi:/nnYTqn$Cf?GB`9"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d000273c35f.temperature</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id=",I#bp.R^7%sAI1kNdq8D"> <field name="TEXT"> Grad</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="^KR1;Kn#i@}E8vS)zLDo"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="NjyS~uHb^ds/vq/Kq|}@"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0000D3C99985C1.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="d_W`|$_*D:Sju0r_*_ew"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_cleartimeout" id="8uAQ}vs;OW{TXx$U:m}@"> <field name="NAME">timeout</field> </block> </statement> </block> </next> </block> </statement> </block>
-
@robbsen sagte: So werden die Meldungen zu schnell nacheinander ausgegeben
Da der Timer mehrfach gestartet wurde.
@robbsen sagte in Skript Fenster auf nicht optimal:
als Trigger die Temperatur nehme und nicht den Fensterstatus?
Ja, besser den Fensterstatus als Trigger verwenden und mittels eines Intervalls erinnern.
-
@paul53 merci :), dann baue ich mal um.