NEWS
Bewegungsmelder script
-
Hoffentlich erzeugt die Beleuchtung mit 60 % nicht mehr als 8 lux.
Doch
-
@paul53 das scheint zu funktionieren

-
@paul53 das Script läuft soweit sehr gut. Ich habe jedoch eine Frage. Zur Zeit kommt die Meldung "Bewegung im Flur erkannt und Licht ein 90%" bei jedem Auslösen der BWM, dass ist mir dann doch zu viel im Log. Ich habe das nun so gelöst, ist das OK oder hab ich mal wieder Mist gebaut ?

EDIT:Hab die Pause entfernt
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="Ki;~ht{XC[36A7nTpX).">Licht</variable> <variable type="timeout" id="timeout">timeout</variable> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="comment" id="M#Itf%?w)g;W_NV:LrCD" x="-88" y="-338"> <field name="COMMENT">Flur</field> <next> <block type="on_ext" id="XZShE%!^7aSwliAf9~Rx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="_eW).)0ak/qQ]I)8oZf+"> <field name="oid">alias.0.Bewegungsmelder.BWM_Flur_1</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="e5R|Fz:I{^S^I#^du1vO"> <field name="oid">alias.0.Bewegungsmelder.BWM_Flur_2</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="-o[:H+Vc~AA]-;M?d`fq"> <field name="NAME">timeout</field> <next> <block type="timeouts_cleartimeout" id="c-fK;]?st(uLsht=EZmG"> <field name="NAME">timeout2</field> <next> <block type="variables_set" id="X~~()0b4f5^g-@=;e]r="> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> <value name="VALUE"> <block type="get_value" id="U8%fW,6].@.#:{gTj7hI"> <field name="ATTR">val</field> <field name="OID">deconz.0.Lights.17.on</field> </block> </value> <next> <block type="controls_if" id="e@LN;c0-3IiQ3mPlWpKL"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="z;D)/5u|-o-N}_N|ndX7" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="get_value" id="WZUFWc?0xqDDjauMNm7?"> <field name="ATTR">val</field> <field name="OID">alias.0.Bewegungsmelder.BWM_Flur_1</field> </block> </value> <value name="B"> <block type="get_value" id="VxmjwsU7=sU/5=tLA+|U"> <field name="ATTR">val</field> <field name="OID">alias.0.Bewegungsmelder.BWM_Flur_2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="Gtwhg_5_[.Q3lEy[1xJF"> <value name="IF0"> <block type="logic_operation" id="u.br91Z]Z+):/-SH.%OC" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="variables_get" id="-58,11$JZhGLH1FQ_n:E"> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> </block> </value> <value name="B"> <block type="logic_operation" id="lAs1ZtwzRH*wrOb7./k6" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="%T/s}$FaX/uFYFc0LC[v"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="FCFLcJR}^XbHwn~JC9Ss"> <field name="ATTR">val</field> <field name="OID">deconz.0.Sensors.56.lux</field> </block> </value> <value name="B"> <block type="math_number" id=")NyCG[9Ipr1v|1W5BECh"> <field name="NUM">4</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="]=28h`rTm$3f{q:+;l+4"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="|gl@dK7IzR^K=THAf698"> <field name="ATTR">val</field> <field name="OID">deconz.0.Sensors.57.lux</field> </block> </value> <value name="B"> <block type="math_number" id="4(9}7g/r,W7JD5A,1tF5"> <field name="NUM">5</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Q*`*h)o:/SGiva1Za0|-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.level</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="x~/-RaK}$!}O-GD!W;{@"> <field name="NUM">90</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="variables_get" id=".GW6/2x,|s.%U{NB@NJ)"> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> </block> </value> <statement name="DO1"> <block type="timeouts_settimeout" id="yCutu!$pMQ|(uT+cjX(N"> <field name="NAME">timeout</field> <field name="DELAY">120</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="3F$zNDNTUs96o?l2yPd9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.level</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="kojHU,.ECX=6`@6~f+9;"> <field name="NUM">60</field> </block> </value> <next> <block type="debug" id="Gl=/gGlpBZb|z?2(uk@W"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="]*s_**1STaopKhmRh/zw"> <field name="TEXT">Flur Level 60%</field> </shadow> </value> <next> <block type="timeouts_settimeout" id="nxgzo.Tbn9DT_26m*7ic"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="thUBa[KJYQESB.xnvQRi"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="DV!:2{702SQ/wlV;8P:T"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="^)xQO:[DFWEzgGy-N.Qq"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="(%kz+5#ovVDvdf67O@Mk"> <field name="TEXT">Keine Bewegung im Flur erkannt und Licht aus</field> </shadow> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> <block type="on_ext" id="8$a}c%5@D9k-eJ|Rga$M" x="688" y="-313"> <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="Ve8M8-Vr7Zz+Z!(oDt}G"> <field name="oid">deconz.0.Lights.17.level</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_wait" id="JiPJ=D^{{jECzyffQURP"> <field name="DELAY">2</field> <field name="UNIT">sec</field> <next> <block type="controls_if" id="3QbUytwsjrWnF14SN8Qz"> <value name="IF0"> <block type="logic_compare" id="iRb;!hZ+Gf;!tp~;$xS$"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="=WuT{|{*u;}4bVsNJKK#"> <field name="ATTR">val</field> <field name="OID">deconz.0.Lights.17.level</field> </block> </value> <value name="B"> <block type="math_number" id="73-4)}!4O?qqFp?~2Muf"> <field name="NUM">90</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="t{tcabMV%zgl:VxJ{+U;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="2ef,,:9LWc*WJdg@di*I"> <field name="TEXT">Bewegung im Flur erkannt und Licht ein 90%</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml> -
@paul53 das Script läuft soweit sehr gut. Ich habe jedoch eine Frage. Zur Zeit kommt die Meldung "Bewegung im Flur erkannt und Licht ein 90%" bei jedem Auslösen der BWM, dass ist mir dann doch zu viel im Log. Ich habe das nun so gelöst, ist das OK oder hab ich mal wieder Mist gebaut ?

EDIT:Hab die Pause entfernt
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="Ki;~ht{XC[36A7nTpX).">Licht</variable> <variable type="timeout" id="timeout">timeout</variable> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="comment" id="M#Itf%?w)g;W_NV:LrCD" x="-88" y="-338"> <field name="COMMENT">Flur</field> <next> <block type="on_ext" id="XZShE%!^7aSwliAf9~Rx"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="_eW).)0ak/qQ]I)8oZf+"> <field name="oid">alias.0.Bewegungsmelder.BWM_Flur_1</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="e5R|Fz:I{^S^I#^du1vO"> <field name="oid">alias.0.Bewegungsmelder.BWM_Flur_2</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="-o[:H+Vc~AA]-;M?d`fq"> <field name="NAME">timeout</field> <next> <block type="timeouts_cleartimeout" id="c-fK;]?st(uLsht=EZmG"> <field name="NAME">timeout2</field> <next> <block type="variables_set" id="X~~()0b4f5^g-@=;e]r="> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> <value name="VALUE"> <block type="get_value" id="U8%fW,6].@.#:{gTj7hI"> <field name="ATTR">val</field> <field name="OID">deconz.0.Lights.17.on</field> </block> </value> <next> <block type="controls_if" id="e@LN;c0-3IiQ3mPlWpKL"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="z;D)/5u|-o-N}_N|ndX7" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="get_value" id="WZUFWc?0xqDDjauMNm7?"> <field name="ATTR">val</field> <field name="OID">alias.0.Bewegungsmelder.BWM_Flur_1</field> </block> </value> <value name="B"> <block type="get_value" id="VxmjwsU7=sU/5=tLA+|U"> <field name="ATTR">val</field> <field name="OID">alias.0.Bewegungsmelder.BWM_Flur_2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="Gtwhg_5_[.Q3lEy[1xJF"> <value name="IF0"> <block type="logic_operation" id="u.br91Z]Z+):/-SH.%OC" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="variables_get" id="-58,11$JZhGLH1FQ_n:E"> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> </block> </value> <value name="B"> <block type="logic_operation" id="lAs1ZtwzRH*wrOb7./k6" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="%T/s}$FaX/uFYFc0LC[v"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="FCFLcJR}^XbHwn~JC9Ss"> <field name="ATTR">val</field> <field name="OID">deconz.0.Sensors.56.lux</field> </block> </value> <value name="B"> <block type="math_number" id=")NyCG[9Ipr1v|1W5BECh"> <field name="NUM">4</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="]=28h`rTm$3f{q:+;l+4"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="|gl@dK7IzR^K=THAf698"> <field name="ATTR">val</field> <field name="OID">deconz.0.Sensors.57.lux</field> </block> </value> <value name="B"> <block type="math_number" id="4(9}7g/r,W7JD5A,1tF5"> <field name="NUM">5</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Q*`*h)o:/SGiva1Za0|-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.level</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="x~/-RaK}$!}O-GD!W;{@"> <field name="NUM">90</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="variables_get" id=".GW6/2x,|s.%U{NB@NJ)"> <field name="VAR" id="Ki;~ht{XC[36A7nTpX).">Licht</field> </block> </value> <statement name="DO1"> <block type="timeouts_settimeout" id="yCutu!$pMQ|(uT+cjX(N"> <field name="NAME">timeout</field> <field name="DELAY">120</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="3F$zNDNTUs96o?l2yPd9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.level</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="kojHU,.ECX=6`@6~f+9;"> <field name="NUM">60</field> </block> </value> <next> <block type="debug" id="Gl=/gGlpBZb|z?2(uk@W"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="]*s_**1STaopKhmRh/zw"> <field name="TEXT">Flur Level 60%</field> </shadow> </value> <next> <block type="timeouts_settimeout" id="nxgzo.Tbn9DT_26m*7ic"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="thUBa[KJYQESB.xnvQRi"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.Lights.17.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="DV!:2{702SQ/wlV;8P:T"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="^)xQO:[DFWEzgGy-N.Qq"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="(%kz+5#ovVDvdf67O@Mk"> <field name="TEXT">Keine Bewegung im Flur erkannt und Licht aus</field> </shadow> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> <block type="on_ext" id="8$a}c%5@D9k-eJ|Rga$M" x="688" y="-313"> <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="Ve8M8-Vr7Zz+Z!(oDt}G"> <field name="oid">deconz.0.Lights.17.level</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_wait" id="JiPJ=D^{{jECzyffQURP"> <field name="DELAY">2</field> <field name="UNIT">sec</field> <next> <block type="controls_if" id="3QbUytwsjrWnF14SN8Qz"> <value name="IF0"> <block type="logic_compare" id="iRb;!hZ+Gf;!tp~;$xS$"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="=WuT{|{*u;}4bVsNJKK#"> <field name="ATTR">val</field> <field name="OID">deconz.0.Lights.17.level</field> </block> </value> <value name="B"> <block type="math_number" id="73-4)}!4O?qqFp?~2Muf"> <field name="NUM">90</field> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="t{tcabMV%zgl:VxJ{+U;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="2ef,,:9LWc*WJdg@di*I"> <field name="TEXT">Bewegung im Flur erkannt und Licht ein 90%</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml>@michael-schmitt sagte: das Script läuft soweit sehr gut.
... ist mir dann doch zu viel im Log.Wenn das Skript funktioniert wie gewünscht, kann man die Debug-Blöcke deaktivieren / löschen, denn sie dienen eigentlich dazu, Fehler zu finden und zu beseitigen.
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden
