NEWS
Vereinfachung Skript LED mit Bewegungsmelder schalten
-
Hallo zusammen,
ich habe ein Skript für meine LED Leiste in der Küche erstellt. Ich würde gerne das Einschalten noch begrenzen auf bestimmte Monate (Januar-Mai) und (September-Dezember). Aktuell ist es nur auf die Uhrzeit eingeschränkt. Kann mir da vielleicht jemand einen Tipp geben?
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="osx6OHCt.i*d)3LAKUq~" x="263" y="112"> <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="]S}35ZN6[w_E_v#Q!KwP"> <field name="oid">deconz.0.sensors.00158d0007002995.presence</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="4MM2M|[u#|MH!nR~puzk"> <value name="IF0"> <block type="logic_operation" id="`o4?-PpUXY92O#:Q8_jK"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="USob}?{-oXmv^Q^xyjAg"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="`2C?*w:~`e.eBvV9nIRr"> <field name="ATTR">val</field> <field name="OID">deconz.0.sensors.00158d0007002995.presence</field> </block> </value> <value name="B"> <block type="logic_boolean" id="}91O5WvMVX//6BtgoR|H"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="time_compare_ex" id="z0CmIZ}(G3xz3`nYciKB"> <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">not between</field> <value name="START_TIME"> <shadow type="text" id="o|6*{U#a{+:t,Haa}Q^T"> <field name="TEXT">05:29</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="7{7S#jZs,f`+teDSuTm{"> <field name="TEXT">19:59</field> </shadow> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="_qdp8ILCq1c]uIRb+Q}P"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hs100.0.192_168_1_185.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="EUBf+oB,/JT`1T~p]/ni"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="c{iV%6z`+gnue+9M%%as"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="6c_U5V#bvGDNJU5#/h~N"> <field name="TEXT">Bewegungsmelder Küche Bewegung erkannt - Licht Küche an</field> </shadow> </value> <next> <block type="timeouts_cleartimeout" id="f2tvrrv{;sgPB=aOfnVB"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="sE8mL0nPF#wbLNd,Ga@;"> <field name="NAME">timeout</field> <field name="DELAY">2</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="fkz@Ztk]E/wHKTu09,=,"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hs100.0.192_168_1_185.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="sn_Zqr:;LUk+3]kk6|=4"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="GND4?U3;|mcH~+Am#j`_"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="Ak!@J8^tiU8k]mA_#dt?"> <field name="TEXT">Bewegungsmelder Küche keine Bewegung erkannt - Licht Kücheaus</field> </shadow> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </xml>
-
@surfer09 ob Du da auch noch einen Screenshot vom Blockly einstellen kannst?
-
@surfer09
hab leider nicht viel Ahnung
versuch doch mal Cron zeitplan<block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="Atv,TNuGTH_.~U+EJ`Wb" x="162.11111450195312" y="62.333328247070426"> <field name="SCHEDULE">{"time":{"start":"00:00","end":"23:59","mode":"hours","interval":1},"valid":{"from":"11.09.2022"},"period":{"months":"[1,2,3,5,9,10,11,12]"}}</field> </block>
-
@surfer09 sagte: begrenzen auf bestimmte Monate (Januar-Mai) und (September-Dezember).
-
@paul53 Danke Paul! Was ich hier aber nicht ganz verstehe ist das "ist größer als letztes" beim obersten Trigger. Er soll ja nur auslösen, wenn "wahr".
Gruß surfer
-
@surfer09 sagte: "ist größer als letztes"
Triggert nur bei Änderung false --> true. Trigger auf "ist wahr" könnte besser sein, wenn der Datenpunkt bei erneuter Bewegungserkennung nur aktualisiert wird.