@Dr-Bakterius Dr-Bakterius genau diese Information habe ich gesucht. Danke.
@Asgothian 1. Ja das mit dem Intervall war Blödsinn. Da hab ich einfach den falschen Baustein erwischt xD Eigentlich sollte das ein timeout für 60sek sein (das dimmen dauert 60sek).
2. und 3. Ich hatte keine Anung von programmieren und hab mich einfach ausprobiert bis etwas geklappt hat. Seither mache ich das so. aber danke für den Vorschlag. Das ist viel übersichtlicher, von jetzt an werde ich es so machen. Hat das auch sonst noch irgendwelche Vorteile, oder geht es nur um die Übersicht?
Also mit der Reset-Variable möchte ich verhindern, dass nicht unnötig bei jeder Bewegung ein "on" Befehl an die Lampe geschickt wird wenn diese bereits an ist. Jedoch muss der "on" Befehl gesendet werden, um das herunterdimmen reseten zu können.
Oder würdet ihr sagen das ist komplett egal, ob dauerhaft ein on befehl gesendet wird? ich möchte einfach nicht unnötig viel last auf den Raspi bringen.
<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="undefined" id="timeout">timeout</variable>
<variable type="" id="fC@}0jz^-yO6}HBMi_s4">Reset</variable>
<variable type="undefined" id="timeout3">timeout3</variable>
<variable type="undefined" id="timeout2">timeout2</variable>
</variables>
<block type="on_ext" id="}^%9y/XWsoa[1f.iO]]y" x="1388" y="13">
<mutation items="1"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="YEMz=lpsi5YvZ]?rz+#~">
<field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002e99be3.state</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="debug" id="E{;UI)@SVArawevNQP">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="@nb1/sgYheVJ]AVude?R">
<field name="TEXT">is aktiv</field>
</shadow>
</value>
<next>
<block type="controls_if" id="at(s0ZCDOMQqLedJlNL">
<value name="IF0">
<block type="logic_operation" id="REV!7j1t}C|T!~w^67e," inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="B)[(L^}3,=cw?3n6#nUy">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="+N/np(x[bkz9-CSslgQ">
<field name="ATTR">val</field>
<field name="OID">javascript.0.Benutzerdefiniert.ioBroker_Modes.AtHome_Joshua</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="pKHfD|7K@2Y;d
u:qQAK"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="y}A3^{}d~(NcrhU0WFK^" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="QmdCEM;wVRQJpSTnz9}{"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="K4h@Q.Ae{bq|@Ngxb~f["> <field name="ATTR">val</field> <field name="OID">javascript.0.Benutzerdefiniert.Bewegungsmelder.is_activ_-_Badezimmer</field> </block> </value> <value name="B"> <block type="logic_boolean" id="@4Fjq[*LwOhZscjvW?#y"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="0Ms(pmM1Lwg3:OeHHVvE"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="jJpsBgP)tOzsS53-%3C%"> <field name="ATTR">val</field> <field name="OID">mihome.0.devices.sensor_motion_aq2_158d0002e99be3.state</field> </block> </value> <value name="B"> <block type="logic_boolean" id="X]l%Il~1tKAF,pV1$fTG"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="yj1(o@eq00G;}uJxsmN}"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="Tu4xXaD#GS/DOttn=?Ob"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="cVTb9(9,lnmGBvC4@c@}"> <field name="ATTR">val</field> <field name="OID">javascript.0.Benutzerdefiniert.ioBroker_Modes.Nightmode</field> </block> </value> <value name="B"> <block type="logic_boolean" id="?{Fq]z*.maDebPyh_08["> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="Q^aCizqbz9dE!r:#?CR)"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="#_4yD^*qIJuMC=Uf{uJs"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="~NouN6InNC:VFVXSSZyE"> <field name="ATTR">val</field> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="wM~=kG4BN!FC(myJ.Xx|"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="-Lo[~
(0BZH#MF:5h1wM"><value name="IF0">
<block type="logic_compare" id="p%%Cc:1cb*^?@^lmSFyd">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="QxPS7-Zbw}IX2a{2JdZK">
<field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="dC7[0WLx;
bsB_W^HRJl"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="ERhYA5)2kMU4GNZORF}*" collapsed="true"> <value name="IF0"> <block type="logic_compare" id="(^YlMG[Bo[).tmT:j7Lr"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="@B2}?O}e6sDx-.LZ^fd#"> <field name="ATTR">val</field> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.effect</field> </block> </value> <value name="B"> <block type="text" id="Op$OYcr
lgq_)LPG=DHA"><field name="TEXT">colorloop</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="LXqCM[#MECoLko^IqWf$">
<mutation delay_input="false"></mutation>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="$g$i$;GB:0YG#eCG%Gq?">
<field name="TEXT">{"effect":false}</field>
</block>
</value>
</block>
</statement>
<next>
<block type="control" id="CsyzDF/sCZF1u4%j]Wj{">
<mutation delay_input="false"></mutation>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="4+{nKq*%c/e~w.gaOu%~">
<field name="TEXT">{"on":true}</field>
</block>
</value>
<next>
<block type="variables_set" id="
g[CaM8/o][1S^?i/$(O"> <field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field> <value name="VALUE"> <block type="logic_boolean" id="kb,On26W9sGNww)W6E$E"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="L0c4Rl^Sz}:R;7j*G13
" collapsed="true"><value name="IF0">
<block type="logic_compare" id="1D2WPlV]zf}i.SSEf;UI">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="h+)|pP4Z%3_2[#5#CbKa">
<field name="ATTR">val</field>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.effect</field>
</block>
</value>
<value name="B">
<block type="text" id="MUIH-!m9K:^w8u1K+L)?">
<field name="TEXT">colorloop</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="d-ufj6!wNbr}Hz$
EkG6"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="qU8I,5?Bx]2,C)K_(Gf!"> <field name="TEXT">{"effect":false}</field> </block> </value> </block> </statement> <next> <block type="control" id="5o/!GCE9]lYT!Y)
@-V"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="vCRZxiW^8+,-+5Nu]V]_"> <field name="TEXT">{"on":true}</field> </block> </value> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="%*[0y_68RI/Ee*IOxM5X"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="i1MBtvfHgB*Nt3_LCX@T"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="IM,{nrxM^(Hd.K?GgHZl"> <field name="ATTR">val</field> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="Cz7EU]P?VLu)D%-u:$|F"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="$09ihIkVIcsYl~z+(S3]"> <value name="IF0"> <block type="logic_compare" id="i5{}BF3l=6P1o$(+qt^a"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="W?h_4TNiR8gnt)NcExGv"> <field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field> </block> </value> <value name="B"> <block type="logic_boolean" id="Q=;Ne4Dnjt_7v1k*H!H="> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="~7HfUzwL$n/Fl)GzOzTo" collapsed="true"> <value name="IF0"> <block type="logic_compare" id="0YAi|*IUTj*j}m/|g@4?"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="A.Bv1VZEfOEJE-6Hkyn1"> <field name="ATTR">val</field> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.effect</field> </block> </value> <value name="B"> <block type="text" id="Pf~Ra[tF]4f%9,VbDyz("> <field name="TEXT">colorloop</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="cck_wDVYrZJ7+S8,c#IU"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Kh}8MU6,Y)YvU!78iwuu"> <field name="TEXT">{"effect":false}</field> </block> </value> </block> </statement> <next> <block type="control" id="e9koop}(6
?+M1Eq[;fI"><mutation delay_input="false"></mutation>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="?Nd=K-?4i==nEJSb|txL">
<field name="TEXT">{"bri":64}</field>
</block>
</value>
<next>
<block type="variables_set" id=":s6u,y(hx=ilUiBL3=:g">
<field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field>
<value name="VALUE">
<block type="logic_boolean" id="bs7b5(a]/RYh6M(3^;i">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id=":7;q20M
Arr$+[mp.#Vu" collapsed="true"> <value name="IF0"> <block type="logic_compare" id="
h4#H38M(Biw%Xzpk49"><field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="]He;4jrk.I8(-Xw4FlfR">
<field name="ATTR">val</field>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.effect</field>
</block>
</value>
<value name="B">
<block type="text" id="l?;0s,,
g?an_c|rh1:
"><field name="TEXT">colorloop</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="iVSDch|{l_X(!hpS+GRi">
<mutation delay_input="false"></mutation>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="j1?Ak(M_n(
?3h3qd|9}"> <field name="TEXT">{"effect":false}</field> </block> </value> </block> </statement> <next> <block type="control" id="{RgymUjP5H5SEuHi;y.G"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="1Jx|_TDr_rDFjGu1FqA!"> <field name="TEXT">{"bri":64}</field> </block> </value> </block> </next> </block> </statement> </block> </statement> <next> <block type="timeouts_settimeout" id="r.[:t|vI/^YV.6XJc=B:"> <field name="NAME">timeout</field> <field name="DELAY">15</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="variables_set" id="OJ=*jMw--vo}8pny^QV1"> <field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field> <value name="VALUE"> <block type="logic_boolean" id="bBcSz~w9cO]j?^
WZ@$X"><field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="timeouts_settimeout" id="B+,]qjQ]]7sGem1DCwx">
<field name="NAME">timeout3</field>
<field name="DELAY">5</field>
<field name="UNIT">min</field>
<statement name="STATEMENT">
<block type="controls_if" id="y0SuDI]pobu_}W=dVtx" collapsed="true">
<value name="IF0">
<block type="logic_compare" id="6e#=z,83}N({4a$G|[[Y">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="Y(q:Q5ib;d1Be._DXNh">
<field name="ATTR">val</field>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.effect</field>
</block>
</value>
<value name="B">
<block type="text" id="Ie$%y!2?Pi,j6@t,RJF">
<field name="TEXT">colorloop</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="k[z1v-
;@tciKhWTlrC/"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="
qR,N5G8D9By9M-z(pj0"><field name="TEXT">{"effect":false}</field>
</block>
</value>
</block>
</statement>
<next>
<block type="control" id=",lq|k{@:S3Qy@L;$^Pa]">
<mutation delay_input="false"></mutation>
<field name="OID">hue.0.Philips_hue.Lampe_Badezimmerdecke.command</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="K3x1%?|SmjpF3IkqbK`B">
<field name="TEXT">{"on":false,"transitiontime":600}</field>
</block>
</value>
<next>
<block type="timeouts_settimeout" id="7~hwY/Lb~#_:$ch}m*0~">
<field name="NAME">timeout2</field>
<field name="DELAY">60</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="variables_set" id="PXq(Mgy]seFmUzo;Qu8Q">
<field name="VAR" id="fC@}0jz^-yO6}HBMi_s4" variabletype="">Reset</field>
<value name="VALUE">
<block type="logic_boolean" id="b?q[MSw/429(r#G-|S~)">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</xml>