NEWS
[gelöst] Lampe nach Zeit ein /ausschalten
-
@alero sagte in Lampe nach Zeit ein /ausschalten:
Beim jetztigen Script geht das licht zwar an aber nicht mehr von selber aus
Zeigen bitte
-
-
@alero ok, moment
-
@alero Probier mal so:
-
@djmarc75
sorry
kann dir nicht ganz folgen. nutzt du hier nur den fenstergriff kontakt? -
@alero sagte in Lampe nach Zeit ein /ausschalten:
kann dir nicht ganz folgen
Woran hängts denn ?
Hier mal der Code zum Importieren:
-
@alero sagte in Lampe nach Zeit ein /ausschalten:
nutzt du hier nur den fenstergriff kontakt?
Als Trigger - so wie Du in Deinem Skript das auch machst.
-
@djmarc75
ich denke du nutzt nur den fenstergriffkontakt, oder? -
@alero Setz mal den Blocklycode hier rein bitte (in Codetags !)
-
dann würde es doch auch angehen wenn der griff auf open (2) steht.
oder liege ich da falsch? -
@alero sagte in Lampe nach Zeit ein /ausschalten:
wenn der griff auf open (2) steht
Der Trigger ist ja der Griff.
-
BlocklyJavascriptTypeScriptRules 09:15:46.110 info javascript.0 (387) Stop script script.js.common.Beleuchtung_Terrasse_bei_Dunkelheit 09:15:46.114 info javascript.0 (387) Start javascript script.js.common.Beleuchtung_Terrasse_bei_Dunkelheit 09:15:46.116 info javascript.0 (387) script.js.common.Beleuchtung_Terrasse_bei_Dunkelheit: registered 1 subscription, 0 schedules, 0 messages, 0 logs and 0 file subscriptions Ausgewählte Blöcke exportieren <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on" id="$8mK_S~;;.n+OVN/l*pT" x="-2587" y="-1037"> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="{fMDjAPthwDd!$(h;Out"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="*5W]N|^l*s17C7RjPQ@b"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="controls_if" id=";P$ZuXjsa0pju+VGQ6zE"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="hdn09=,wjMGfhCmR=MUH" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_negate" id="I|z;l8HNW-VAr^BiPsEa"> <value name="BOOL"> <block type="time_compare_ex" id="FyU~n,NxYnt!LMG{F[vl"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="QZO2@KmXY08z220b@:qT"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id="v_?#s)k:c/yX|-Cggqzy"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">-30</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="U0rQ5owVf;Ib@,3*O)BM"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="8e3P:).IV6S;65v55NqV"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">30</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="K@JC8t@hv5z9rjG#kUm(" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="N@z/~/a{S56VxM!AxGA!"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="sb,u0q=s{IF8lHriGD#b"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="%tUT{1TVmM8DH^u11lqK"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> </block> </value> <value name="B"> <block type="logic_boolean" id="TR$Vc6O}GqRF~uhpNuCN"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="i~%W}{JE#i(]%g?H{aG="> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="}]t#7K,C_SB,H@JOy7BR"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="*X(l22/j.R!Us!T;GoWo"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="d}8.NLBCiD(14qa^.td9"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="^a5H%Rw~2$KtVF6+x4q8"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.000BDA499AEFB6.1.MOTION</field> </block> </value> <value name="B"> <block type="logic_boolean" id="^VR(PB#ac#jQ$pnn4Rx9"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="?:kwasmBihapC9gm_@-@"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="gwxP/E2xby]_oUJ!jj)_"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="1P=);rXh2|w`:r#}kkNf"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="U^^j?l~KJAj(WdV|Bl)s"> <field name="TEXT">test</field> </shadow> <block type="text" id="q12nXDgWSB0*D[1Qrr0Y"> <field name="TEXT">Terrassentuer wurde geöffnet mit Licht an</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="-yh6MwkBtMO^DYm*;B,C"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="T61}Z-X{@Wr0c9ed8{0$"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="8k[RQ.IfRAETOrAX9R-T"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="=P*RC}Z-Gm@#W%PT,ToU"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="uU:+n-#_N}_XM8SKMt:7"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="[/dat,l}`Uo*X#Bd6sml"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="Lh?eB@|q#RJGnOq~7bVc"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="^Px+:y4QRL,1Wr@W}q_O"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="1.+dV/%jto:XYqfj4;q@"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="@GsNKj4;9w{EvxmvHv-Z"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="ycET$[i*MYq3GYrjok=u"> <field name="TEXT">test</field> </shadow> <block type="text" id="HS)$PHnT*}v6^Yn}79_m"> <field name="TEXT">Terrassentuer wurde gekippt oder geschlossen</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </statement> </block> </xml> <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on" id="$8mK_S~;;.n+OVN/l*pT" x="-2587" y="-1037"> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="{fMDjAPthwDd!$(h;Out"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="*5W]N|^l*s17C7RjPQ@b"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="controls_if" id=";P$ZuXjsa0pju+VGQ6zE"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="hdn09=,wjMGfhCmR=MUH" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_negate" id="I|z;l8HNW-VAr^BiPsEa"> <value name="BOOL"> <block type="time_compare_ex" id="FyU~n,NxYnt!LMG{F[vl"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="QZO2@KmXY08z220b@:qT"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id="v_?#s)k:c/yX|-Cggqzy"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">-30</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="U0rQ5owVf;Ib@,3*O)BM"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="8e3P:).IV6S;65v55NqV"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">30</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="K@JC8t@hv5z9rjG#kUm(" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="N@z/~/a{S56VxM!AxGA!"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="sb,u0q=s{IF8lHriGD#b"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="%tUT{1TVmM8DH^u11lqK"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> </block> </value> <value name="B"> <block type="logic_boolean" id="TR$Vc6O}GqRF~uhpNuCN"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="i~%W}{JE#i(]%g?H{aG="> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="}]t#7K,C_SB,H@JOy7BR"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="*X(l22/j.R!Us!T;GoWo"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="d}8.NLBCiD(14qa^.td9"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="^a5H%Rw~2$KtVF6+x4q8"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.000BDA499AEFB6.1.MOTION</field> </block> </value> <value name="B"> <block type="logic_boolean" id="^VR(PB#ac#jQ$pnn4Rx9"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="?:kwasmBihapC9gm_@-@"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="gwxP/E2xby]_oUJ!jj)_"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="1P=);rXh2|w`:r#}kkNf"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="U^^j?l~KJAj(WdV|Bl)s"> <field name="TEXT">test</field> </shadow> <block type="text" id="q12nXDgWSB0*D[1Qrr0Y"> <field name="TEXT">Terrassentuer wurde geöffnet mit Licht an</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="-yh6MwkBtMO^DYm*;B,C"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="T61}Z-X{@Wr0c9ed8{0$"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="8k[RQ.IfRAETOrAX9R-T"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="=P*RC}Z-Gm@#W%PT,ToU"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="uU:+n-#_N}_XM8SKMt:7"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="[/dat,l}`Uo*X#Bd6sml"> <field name="ATTR">val</field> <field name="OID">hm-rpc.1.0007DA4989ADED.1.STATE</field> </block> </value> <value name="B"> <block type="math_number" id="Lh?eB@|q#RJGnOq~7bVc"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="^Px+:y4QRL,1Wr@W}q_O"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hm-rpc.0.IEQ0023606.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="1.+dV/%jto:XYqfj4;q@"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="@GsNKj4;9w{EvxmvHv-Z"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="ycET$[i*MYq3GYrjok=u"> <field name="TEXT">test</field> </shadow> <block type="text" id="HS)$PHnT*}v6^Yn}79_m"> <field name="TEXT">Terrassentuer wurde gekippt oder geschlossen</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </statement> </block> </xml>
das ist aber jetzt noch mit dem bewegungsmelder.
-
es soll nur das Licht angehen wenn die Tür offen ist , es dunkel ist und in dem fall der Bm eine Bewegung erkannt hat.
Der Tpüürgriff steht auch so schon mal auf offen obwohl keiner nach draussen geht.(wegen der Rollade) -
@djmarc75 hab ich jetzt nen Denkfehler oder schaltet sich zu gegebener Uhrzeit das Licht ein und gleich wieder aus, wenn ich die Tür kippe?
Griffbewegung
zu=0
offen=2
kippen=1 -
@alero
Dann ist der Trigger der BWM und der Griff nur eine Bedingung. -
@crunchip
es sollte so sein dass wenn es dunkel ist und der fenstergriff auf 2 steht (offen) und der BM eine Bewegung erkannt hat , dann soll das Licht auf der terrasse angehen. so der plan. -
-
und während des schreibens dachte ich es wäre vielleicht besser wenn ich das " fenster offen " über den Fensterkontakt mache. weil die Tür (der fenstergriff) auch schon mal auf offen steht obwohl keiner raus geht. dann soll das licht natürlich nicht angehen.
-
@crunchip sagte in Lampe nach Zeit ein /ausschalten:
gleich wieder aus, wenn ich die Tür kippe?
In dem Fall ja, habe den Datenpunkt vom BWM vergessen (in meinem Beispiel)
@alero sagte in Lampe nach Zeit ein /ausschalten:
es sollte so sein dass wenn es dunkel ist und der fenstergriff auf 2 steht (offen) und der BM eine Bewegung erkannt hat , dann soll das Lickt auf der terrasse angehen.
dann sollte:
@codierknecht sagte in Lampe nach Zeit ein /ausschalten:
Dann ist der Trigger der BWM und der Griff nur eine Bedingung.
-
@alero
Also so:Wenn der BWM auslöst, prüfst Du, ob die Terrassentür offen und es Nacht ist (ggf. zusätzlich den Griff).
=> Licht an + Timer starten
Eine erneute Bewegung bei gleichen Bedingungen startet den Timer neu.
Wenn Timer abgelaufen => Licht aus.