How to create an automated motion controlled light using Tasmota Rules and Timer commands.
Instructions Click More Below...
New rule as reports previous rule can cause motion loop
RuleTimer2 is a buffer to prevent the light turning off triggering another turn on event.
****************************************************
Rule1 ON System#Boot DO Var1 1 ENDON
Rule2 ON Power1#state=1 DO Backlog0 WebSend [mylight] Power %Var1%; RuleTimer1 20 ENDON
ON Rules#Timer=1 DO Backlog0 Var1 0; WebSend [mylight] Power OFF; RuleTimer2 4 ENDON
ON Rules#Timer=2 DO Var1 1 ENDON
Rule1 1
Rule2 1
****************************************************
Old Rule used in video:
Rule1 ON Power1#state=1 do Backlog WebSend [mylight] Power On; RuleTimer1 20 ENDON ON Rules#Timer=1 DO WebSend [mylight] Power OFF ENDON
Tasmota Device Templates:
templates.blakadder.com/
Accessing device via hostname
mymotionsensor
mymotionsensor.lan
Tasmota Commands:
tasmota.github.io/docs/Commands/
Note: The Tuya motion sensor would need flashing to Tasmota, these devices are not pre flashed.
templates.blakadder.com/CT61W...
How To Flash Motion Sensor With Tasmota - • Tasmota Firmware - Fla...
12 июл 2022