NEWS
Bewegungsmelder mit drei Trigger
-
Ich habe eine Lichtsteuerung, mit einem Hue Bewegungsmelder.
Die zu Steuernde Lichtquelle kommt von Tuya.
Wie bewerkstelligt man es das nach dem 1. Trigger 60 sek True ist, nach dem zweiten trigger 5 min true ist und nach dem dritten trigger wieder 60 sek true danach aus.
Da mein Roborock Adapter nichts anzeigt, kann ich den nicht mit in die Steuerung nehmen.
Die Datenpunkte des Roborock zeigen nichts wichtiges an.
Meine simple Steuerung sieht so aus.<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="Nj(te{x3$e6!~{f@69xR" x="-837" y="-837"> <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="c%l5fWgvmI!,g`p~4n;j"> <field name="oid">hue.0.Bad_Motion_Sensor.presence</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="3OM+RMIf]vu-^~n|dKUn"> <field name="oid">tuya.0.bf15a2489964bff33bavvv.1</field> </shadow> </value> <statement name="STATEMENT"> <block type="debug" id="-,p_/V`6t=CYBp)ju!_o"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="M2oMY%M)9{AV(Z;_2{qU"> <field name="TEXT">Bad Bewegung erkannt</field> </shadow> </value> <next> <block type="controls_if" id="v%91paFmpsDs~u$16I*j"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_multi_or" id="y?g`p~+]o5+PL|.?PX1!"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="logic_compare" id="DGg=BVr/KMI3zYgmWWYK"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="+YT7FtsKaa*oQiK*IAP["> <field name="ATTR">val</field> <field name="OID">hue.0.Bad_Motion_Sensor.presence</field> </block> </value> <value name="B"> <block type="logic_boolean" id="`vYr(:m9rX@y^Sf,6rhX"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="OR1"> <block type="logic_compare" id="tgq4|PpCwtiv/UX/:#=h"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="DgD*Q0qDe!`f_1d4VRlx"> <field name="ATTR">lc</field> <field name="OID">tuya.0.bf15a2489964bff33bavvv.1</field> </block> </value> <value name="B"> <block type="math_number" id="}Y27gXrB.a5Kw9![s@`6"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="j?7(Fp{-}?,%mB.fxC^`"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.bad_deckenlampe.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="2z-cxu^{UVe{ePvV=a={"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="(EUC)LT~MuT5k#W$grTf"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="_0$mr||2p`H%wjnCH:_F"> <field name="TEXT">Licht Bad ist an</field> </shadow> </value> <next> <block type="telegram_call" id="9G3^ixErf|^tIt3qU09f"> <field name="INSTANCE"></field> <field name="LANGUAGE"></field> <field name="REPEATS">1</field> <field name="LOG"></field> <value name="MESSAGE"> <shadow type="text" id="3IJ49}Fpmth);Noox%}c"> <field name="TEXT">text</field> </shadow> <block type="text" id="~#]6!f84PvCz[YEoyF_X"> <field name="TEXT">Licht Bad ist an</field> </block> </value> <value name="USERNAME"> <shadow type="text" id="XNu@~H6!:zs;Z2V%[!h="> <field name="TEXT"></field> </shadow> </value> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_settimeout" id="Sl7]EUvd]q9gXk%bteLN"> <field name="NAME">timeout</field> <field name="DELAY">50</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="m|A:PzDnfvu95fRcW=_L"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.bad_deckenlampe.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="k!b54}gJD~x8VPTW#Wsb"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="/2njKeH:uVhFB|K6pf*|"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="U=bU!6+k/@-4*;I|-ugI"> <field name="TEXT">Licht Bad ist aus</field> </shadow> </value> <next> <block type="telegram_call" id="j:X,|g*{b9g+gkSFibOJ"> <field name="INSTANCE"></field> <field name="LANGUAGE"></field> <field name="REPEATS">1</field> <field name="LOG"></field> <value name="MESSAGE"> <shadow type="text" id="3IJ49}Fpmth);Noox%}c"> <field name="TEXT">text</field> </shadow> <block type="text" id="oau+hb*9lF70aK6[6U[f"> <field name="TEXT">Licht Bad ist aus</field> </block> </value> <value name="USERNAME"> <shadow type="text" id="RO2hx`Qbk$n-B}X`^Ia8"> <field name="TEXT"></field> </shadow> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </statement> <next> <block type="timeouts_cleartimeout" id="Zbw-y?`R?n}TqCVr8eS?"> <field name="NAME">timeout</field> </block> </next> </block> </xml>
-
@aphofis sagte: Meine simple Steuerung sieht so aus.
Korrigiere sie erst mal:
Was ist der Datenpunkt "tuya.0.bf15a2489964bff33bavvv.1"?
@aphofis sagte in Bewegungsmelder mit drei Trigger:
nach dem 1. Trigger 60 sek True ist, nach dem zweiten trigger 5 min true ist und nach dem dritten trigger wieder 60 sek true danach aus.
Was soll das bewirken?
-
@paul53 sagte in Bewegungsmelder mit drei Trigger:
<xml xmlns="https://developers.google.com/blockly/xml">
Das ist der zweite Bewegungsmelder im Bad, da mein Badezimmer sehr groß ist, deckt dieser nicht so zu sagen Vorraum und das Bad ab.
Das soll beweirken, wenn sich jemand länger als 60 sek. im Bad aufhält, das dann der zweite Trigger für 5 min an bleibt. Besser wäre erster trigger 60 sek. zweiter trigger 60 sek und dritter dann 5 min. da ich auch oft durchs Bad ins Büro gehe, und auch wieder zurück gehe und oft nur etwas aus dem Büro hole. Wäre 2 x 60 sek und dann dritter erst 5 min. -
Ich finde für mich ist das schon eine sinnige Steuerung. Nur kann ich sowas nicht zusammenstellen bzw programmieren.
und ich glaube der zweite Bewegungsmelder braucht den wert 1 für true und 0 für false.
Ist das relevant oder reagiert der trigger auf beides als Änderung !?
Ich wüsste nicht mal ansatzweise wie man sowas bewerkstelligt.
Wie sagt man der Steuerung trigger 1 60 sek dann auf das zweite true dann 60 sek und auf das dritte true dann 5 min. !? -
Also habe das Script jetzt so am laufen, nur reagiert die Steuerung nicht auf den Tuya Motion Sensor.
Auf den Hue Sensor reagiert die Steuerung sofort.
Das Licht bleibt auch so lange an wie man sich im Bewegungsmelder befindet.
Demnach ist eine zweite und dritte true Steuerung im Script nicht nötig.<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="QnW[`;@/$OE[/o?R?9KO">Bad_Zeit</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="variables_set" id="ij5A!B~ZvKB}2g7CJ@rZ" x="-1412" y="-1712"> <field name="VAR" id="QnW[`;@/$OE[/o?R?9KO">Bad_Zeit</field> <value name="VALUE"> <block type="math_arithmetic" id="Fh.5L+OJV/kES0=%)|n*"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="8u?[9nc+)A)5Z~OOXl/e"> <field name="NUM">1</field> </shadow> <block type="get_value" id="_}MK~gqwd;]^J]]l.(qS"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Aqua_Control.0.Lichtsteuerung.Bad_Zeit</field> </block> </value> <value name="B"> <shadow type="math_number" id="uEqjb5kJmvM]BY*ggl^m"> <field name="NUM">1000</field> </shadow> </value> </block> </value> <next> <block type="on_ext" id="Nj(te{x3$e6!~{f@69xR"> <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="c%l5fWgvmI!,g`p~4n;j"> <field name="oid">hue.0.Bad_Motion_Sensor.presence</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="JMXkf*G;~!l?^1xx7[-M"> <field name="oid">tuya.0.bf15a2489964bff33bavvv.1</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="v%91paFmpsDs~u$16I*j"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_multi_or" id="38xc5!X2GPCNpnQji5IX"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <value name="OR0"> <block type="get_value" id="+YT7FtsKaa*oQiK*IAP["> <field name="ATTR">val</field> <field name="OID">hue.0.Bad_Motion_Sensor.presence</field> </block> </value> <value name="OR1"> <block type="get_value" id="_b|n]g~z2%MxG=2=njM("> <field name="ATTR">val</field> <field name="OID">tuya.0.bf15a2489964bff33bavvv.1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_cleartimeout" id="Zbw-y?`R?n}TqCVr8eS?"> <field name="NAME">timeout</field> <next> <block type="controls_if" id="RRHwVb3uk;YhL$h{z9ih"> <value name="IF0"> <block type="logic_negate" id="qeh{!QXeIw0siry8~QcI"> <value name="BOOL"> <block type="get_value_var" id="i4k=;%0p((Qh7o7!x=b)"> <field name="ATTR">val</field> <value name="OID"> <shadow type="field_oid" id="(KIF75}+6Mkg+jw3;c)u"> <field name="oid">ID auswählen</field> </shadow> <block type="text" id="0D(AniBb=!_AI~ff3KC@"> <field name="TEXT">sonoff.0.bad_deckenlampe.POWER</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="j?7(Fp{-}?,%mB.fxC^`"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.bad_deckenlampe.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="2z-cxu^{UVe{ePvV=a={"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_settimeout_variable" id="%IO%(rYDgtZ[cou8h;de"> <field name="NAME">timeout</field> <value name="DELAY_MS"> <shadow type="math_number" id="2FV%[9uG6hfTxJv(1^Mu"> <field name="NUM">1000</field> </shadow> <block type="variables_get" id="tc];X{v`Y6eBmBkM.Fs6"> <field name="VAR" id="QnW[`;@/$OE[/o?R?9KO">Bad_Zeit</field> </block> </value> <statement name="STATEMENT"> <block type="control" id="m|A:PzDnfvu95fRcW=_L"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.bad_deckenlampe.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="k!b54}gJD~x8VPTW#Wsb"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </xml>