NEWS
Bewegungsmelder und Dimmer mit Zeitsteuerung
-
Hallo an alle,
kurze Frage zum Thema Bewegungsmelder, Lampe dimmen und Zeitprofil.
Ich möchte gerne erreichen das ein Leuchtmittel (Ikea Tradfri) ab einer Zeit (17.00 Uhr)
sowie unter 10 Lux (Auswertung über Philips Hue BWM) in den Brightness Zustand 15 und
um/ab 22.00 Uhr in den Brightness Zustand 0 geht.
Im Moment bin ich soweit, das die Lampe ab unter 10 Lux und bei BMW wahr ab 17.00 Uhr
auf Brightness Zustand 90 geht und nach Timeout von 90 Sekunden in Brightness Zustand 15
sowie das die Lampe ab 22.00 Uhr nach dem Timeout auf Brightness 0 geht.
Was nicht funktioniert ist das die Lampe bei unter 10 Lux und um/ab 17.00 Uhr (je nach Helligkeit um die Uhrzeit) automatisch auf Brightness 15 geht (unabhängig vom Zustand BMW) und genau um 22.00 Uhr auf Brightness 0 geht (unabhängig vom Zustand BMW).
Letzter Stand den ich probiert habe ist das ganze mit einem Zeitplan anzustossen aber
auch das klappt nicht.Ich hoffe man kann erlesen was ich möchte.
Viele Grüße
Sven<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="LichtAus1">LichtAus1</variable> <variable type="timeout" id="LichtAus2">LichtAus2</variable> </variables> <block type="on_ext" id="s,6QGM5bzZSsZ0v:E%Ov" x="38" y="2563"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="3j.DVqjpW8G*NrhH06iV"> <field name="oid">zigbee.1.001788010bd1f703.occupancy</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="4(9cP;kXcxCVvx(HyU5)"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="?2p$%9n%.xyD7BvPi#SP"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="#:Y)=b^_NXl~PiUz+f9("> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="^(jUURUiw5,Cvew8{fmq"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.illuminance</field> </block> </value> <value name="B"> <block type="math_number" id="CD]0fABoz:.gXq1SPAbH"> <field name="NUM">10</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="9jXY`Oxr80;5XuP|2Nsw"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="4t3A4L:fpeYfT_iJyQ/~"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.occupancy</field> </block> </value> <value name="B"> <block type="logic_boolean" id="2*O1_obmYeccPsc`a;K~"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="iHv869c9U9eN:2fhg,`9"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="rBOR0|tu+AutbU,R1tc3"> <field name="OP">OR</field> <value name="A"> <block type="time_compare_ex" id="jBK?o!T{vx7U{X1yVM#u"> <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="6=Ne8MRvr)L?Iev@wI|C"> <field name="TEXT">15:00</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="V4Kfm*va+Ec$s0w5I{nX"> <field name="TEXT">16:59</field> </shadow> </value> </block> </value> <value name="B"> <block type="time_compare_ex" id="@O:ZFaI3tvlu(*xVFk/("> <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="M_[SD`3N[Xs`LA/|wnNE"> <field name="TEXT">22:00</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="G%%I7PSJ;.LNLy{6G)hy"> <field name="TEXT">08:00</field> </shadow> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id="c_wn^w4OBF9R,|o}lDQ/"> <field name="NAME">LichtAus1</field> <next> <block type="control" id="yCJ5DvPBE.IQ*FIe`$2p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="+c#263D-YY]RV-F^V8|a"> <field name="NUM">90</field> </block> </value> <next> <block type="timeouts_settimeout" id="1lmW;hW},3!ij~*~|Oc8"> <field name="NAME">LichtAus1</field> <field name="DELAY">90</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="/H-un@O|MQ[?Ea@t3#y)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="`vAw^^l]4=wJLbrx3IaH"> <field name="NUM">0</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="time_compare_ex" id="JW_4nmHC8tf%dh2w5Iuu"> <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="2X[e[BtaP^dx^r/O|5#$"> <field name="TEXT">17:00</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="7`KU2H^fW@c^{(w$Q~WP"> <field name="TEXT">21:59</field> </shadow> </value> </block> </value> <statement name="DO1"> <block type="timeouts_cleartimeout" id="Q=:9%r|*KVNN;}pW@{MG"> <field name="NAME">LichtAus2</field> <next> <block type="control" id="#my7$-2t)jY5yQ`6Dq7X"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="jh|.84gn/XY/3G70tFyR"> <field name="NUM">90</field> </block> </value> <next> <block type="timeouts_settimeout" id="{/i0=gc{p+Ak@F;eda*d"> <field name="NAME">LichtAus2</field> <field name="DELAY">90</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="#mqdfp.~i=F3T2l$N)Q~"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="qO3U1:zzXc;|g}m{GoKF"> <field name="NUM">15</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_operation" id="HYM_wmqs8b2{Iieme`cg"> <field name="OP">AND</field> <value name="A"> <block type="time_compare_ex" id="hIdwIUYHyxsyouQx3.s,"> <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="W#E50~5yNYL--L6KF#IU"> <field name="TEXT">8:01</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="eC8|4`Bk_Y.s6BC~d{XF"> <field name="TEXT">15:00</field> </shadow> </value> </block> </value> <value name="B"> <block type="logic_compare" id="=83sW15aY*Ng2Re:eK~|"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="}=.?S_k4uAYJfL0;8Qz8"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.illuminance</field> </block> </value> <value name="B"> <block type="math_number" id="2rjc0mL}_r`A([nb{x6."> <field name="NUM">10</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="t}22ChHIe`k.q_?2#a+p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="#wwrctPB/DD_bf:A.oe%"> <field name="NUM">0</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="schedule" id="AlH#6eV,9ODUxKcCfmc%"> <field name="SCHEDULE">{"time":{"exactTime":true,"start":"17:00"},"period":{"days":1},"valid":{"from":"24.03.2023","to":""}}</field> <statement name="STATEMENT"> <block type="controls_if" id="iD]d;H`_F6m-R6]*uPd2"> <value name="IF0"> <block type="logic_compare" id="?|f:]xFe$r$nHXliw$B#"> <field name="OP">EQ</field> <value name="A"> <block type="logic_compare" id="EOKU].CrYnP6fE5l[`Pt"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="6+A)=,OkP2^v*~Y:nk(h"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.illuminance</field> </block> </value> <value name="B"> <block type="math_number" id="d~^~N;h,C-7Z:jeZ[LW!"> <field name="NUM">10</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="gz}t6Pj2_jna8]y=Bm$/"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="nZ4Y$Tq$w]IO2#%!lV5k"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.occupancy</field> </block> </value> <value name="B"> <block type="logic_boolean" id="4#)@eRHd(%5qYs+k;;z9"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="si;`W)Cm$QFY~FO/qZiU"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="|].,BGAJ0(CL`(HFkRz;"> <field name="TEXT">17:00 Schalte Hoflicht Wert 15</field> </shadow> </value> <next> <block type="control" id="]%?!Lv4Ik_9P;sSU5N-p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="VALUE"> <block type="math_number" id="(2|JA))3bHGuQ{q:Y^QS"> <field name="NUM">15</field> </block> </value> </block> </next> </block> </statement> </block> </statement> <next> <block type="schedule" id="A(4EK5!i).ev?7V*6|%N"> <field name="SCHEDULE">{"time":{"exactTime":true,"start":"22:00"},"period":{"days":1}}</field> <statement name="STATEMENT"> <block type="controls_if" id="y:Z[LyqZnYK2[RDi-sBq"> <value name="IF0"> <block type="logic_compare" id="Lv3AhQ9*|JROkYrrGp#6"> <field name="OP">EQ</field> <value name="A"> <block type="logic_compare" id="Dj9cKRG#;QRSVa~nyrNs"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="?W4CAgkaAu0.6s-nY*[U"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.illuminance</field> </block> </value> <value name="B"> <block type="math_number" id="tamHf4nPZ9d.T~FS~$f6"> <field name="NUM">10</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="mwIhksUH13KJ|1:6IEYQ"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=":SL,Xf12~NDXuSYyW=TS"> <field name="ATTR">val</field> <field name="OID">zigbee.1.001788010bd1f703.occupancy</field> </block> </value> <value name="B"> <block type="logic_boolean" id="jQbZdA]3S4jRhuNx!54|"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="-71E8QO;;vQbC))2s2L3"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="!z+2Y**c~dp~U|D|5TCK"> <field name="TEXT">22:00 Schalte Hoflicht Wert 0</field> </shadow> </value> <next> <block type="control" id="~C|h5a1WioXxFO,!Tpr]"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">zigbee.1.f082c0fffe32e705.brightness</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="VALUE"> <block type="math_number" id="!83[?ju1aI.O*gWd2xMl"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </xml>
-
@kuckkuck
Vereinfache mal den BWM-Trigger:und korrigiere die Zeitplan-Funktionen:
oder besser mit CRON:
-
Vielen Dank für deine Hilfestellung.
Habe das ganze mal aufgeräumt und verkleinert.
Macht natürlich Sinn wie Du es darstelltst.
Komme von Fhem und muss diesbezüglich noch ein paar Dinge lernen und probieren.Ob das ganze nun funktioniert wie gewollt werde ich heute Abend zur Dämmerung ab unter 10Lux und ab 22.00 Uhr sehen.
Vielen Dank bis hier her.
Grüße Sven
-