Can you try this one (import code block in event editor and change device ID's to names)rolandtwilt wrote: ↑Thursday 04 March 2021 13:36 I understand what you mean and I have adjusted this. but unfortunately the script still doesn't work
Code: Select all
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="domoticzcontrols_ifelseif" id="2K$G[sT^I,Ke2-LU{3?)" x="-601" y="238"><mutation elseif="4"></mutation><value name="IF0"><block type="logic_operation" id="LY2J+I2odJz|@j][+jl]"><field name="OP">AND</field><value name="A"><block type="logic_operation" id="z?Bu3w(_1z+$Mw.-A0SA"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="N.kE,xqA9WyRg|8F*7($"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="(E77M$43KTQS-z(srWSB"><field name="Switch">3520</field></block></value><value name="B"><block type="logic_states" id="$QAI`r2|B7;bn}Hr2Rl$"><field name="State">On</field></block></value></block></value><value name="B"><block type="logic_compare" id="v15X^ZWxN|+J;(5|+0@3"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="PwNlm:FVZSA;OA+aBCJ#"><field name="Switch">3519</field></block></value><value name="B"><block type="logic_states" id="|Rqic~2y|W2uOtHFKj6!"><field name="State">On</field></block></value></block></value></block></value><value name="B"><block type="logic_compare" id="?f4*5K?m3*zyTc}p;^q)"><field name="OP">EQ</field><value name="A"><block type="switchvariablesSZ" id="`cC6gAzkrn5K*ZM(,8q="><field name="Switch">3521</field></block></value><value name="B"><block type="logic_states" id="D,5p+m^3=M1SoU+2@h!P"><field name="State">Off</field></block></value></block></value></block></value><statement name="DO0"><block type="writetolog" id="+d`WM_3k][?eIoH${)%D"><value name="writeToLog"><block type="text" id="9aNd1tCXm]16oqs1-7:d"><field name="TEXT">All conditions true; switching schijnwerper on for 1 minute.</field></block></value><next><block type="logic_setdelayed" id="eIF^{X!royl~6}IDVY2J"><value name="A"><block type="switchvariablesSZ" id="sUz]k*wPQ`*V42qX-~f("><field name="Switch">3521</field></block></value><value name="B"><block type="logic_states" id="5y@ryJ9/)W}t0L?,_:;;"><field name="State">On</field></block></value><value name="C"><block type="math_number" id="mlQ?J]ixflRG=fDq7-D2"><field name="NUM">1</field></block></value></block></next></block></statement><value name="IF1"><block type="logic_operation" id=".`Os6DS@g$8FlCDmk6!="><field name="OP">AND</field><value name="A"><block type="logic_compare" id="2w]=))Kko6rb!Cx,@#;5"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id=",9%Cfm0w9nxitrGxei-*"><field name="Switch">3520</field></block></value><value name="B"><block type="logic_states" id="HsiM*`_xkRp*q-BJ]Jx{"><field name="State">On</field></block></value></block></value><value name="B"><block type="logic_compare" id="3{Mgdhel1:gmxsOAiDKW"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="$0ps4Ct^I#Z3?hrqDQrQ"><field name="Switch">3519</field></block></value><value name="B"><block type="logic_states" id="^KS8]{x]Xz:NVd!@^886"><field name="State">On</field></block></value></block></value></block></value><statement name="DO1"><block type="writetolog" id="G{Tc`k`dv-;u#Pj0Z,Dj"><value name="writeToLog"><block type="text" id="+6}6UYulQvs^EIuO{MLB"><field name="TEXT">Motion and time conditions true; schijnwerper already on</field></block></value></block></statement><value name="IF2"><block type="logic_operation" id="J4`h0j^5RK;6$.6}?V:/"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="*`K7EgfkY#SIR)`ouFJ,"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="M?xlPdbjm*emj@IXO1]Q"><field name="Switch">3520</field></block></value><value name="B"><block type="logic_states" id="|IDu@Y5Ii|q.Z1NCe6P/"><field name="State">On</field></block></value></block></value><value name="B"><block type="logic_compare" id="%nqLXAYjOP]YPuOE)E|C"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="]e,OQmGBw]nrjk/u{Xs#"><field name="Switch">3519</field></block></value><value name="B"><block type="logic_states" id="Bx+@rrgWQb$@!1TtpkmV"><field name="State">Off</field></block></value></block></value></block></value><statement name="DO2"><block type="writetolog" id="7)w(~BwIU1e?rvHLQ,5%"><value name="writeToLog"><block type="text" id="xS(V.F6e--:wpc:hQ~Nt"><field name="TEXT">Time condition true but no motion detected; no action needed</field></block></value></block></statement><value name="IF3"><block type="logic_operation" id="Kz,.$Ei|AGJ,?IO=;DZA"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="~MN.-Kw{%[eW[yal2Ep;"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="fzrHFIE:tHz:!oVDg,#="><field name="Switch">3520</field></block></value><value name="B"><block type="logic_states" id="ctTjnWT|T!_h82OV|aBF"><field name="State">Off</field></block></value></block></value><value name="B"><block type="logic_compare" id="AUwEB7[lzk#g@%=Q?93*"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="1p4mTA|~KK$a-7mX5yWV"><field name="Switch">3519</field></block></value><value name="B"><block type="logic_states" id="qXo/zDpZ=1}=TZ8N@1O#"><field name="State">On</field></block></value></block></value></block></value><statement name="DO3"><block type="writetolog" id="S~r1n]fbtM=u3Pm${;{X"><value name="writeToLog"><block type="text" id="S7dxLHC1R1e;MOa}qWxT"><field name="TEXT">Motion active but time condition false; no action needed</field></block></value></block></statement><value name="IF4"><block type="logic_operation" id="qXv68U}hr*UAj|}C*9DW"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="+g7AFJ2mm@E}aQy55aFm"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="cYW2HEDMIs{@GOnPL+;Q"><field name="Switch">3520</field></block></value><value name="B"><block type="logic_states" id="N|TF=h5JUW|,,6s3!O]~"><field name="State">Off</field></block></value></block></value><value name="B"><block type="logic_compare" id="n0pP+30R`*C{heM^t17!"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="jwMb2P4~a9NGQOV.a{!="><field name="Switch">3519</field></block></value><value name="B"><block type="logic_states" id="^-H]*]$~#@:7Q5?UFO^d"><field name="State">Off</field></block></value></block></value></block></value><statement name="DO4"><block type="writetolog" id="Z8Xu3c,Ow#XNQ^N8[z~4"><value name="writeToLog"><block type="text" id="-f?#)6TtNG~}p7bTo0~`"><field name="TEXT">All conditions false; no action needed</field></block></value></block></statement></block></xml>