Tasmota - How To Automate A Light Using A Motion Sensor With Rules And Timers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i'm going to show you some basic tasmoto rules to create a motion detected light that will turn itself off so we first just need to access the motion sensor test motor device just log on to my router so i can find the ip that's assigned to it so once we've accessed it we'll then just add a host name to the tasmota device and use dhcp to get an ip address automatically using dhcp makes it easier to reference and it doesn't matter then if the ip address gets changed later on as we'll just continue to access it from the host name so from the main menu just click configuration and click configure wi-fi then at the bottom just type the hostname in the box so i'll just name this one my motion sensor then go back to the main menu and i just need to make sure my tasmoto device has got the correct template set up for it yours might already be set up for this so again from the main menu just click configure and then click other if you check the description in this video there's a link to a big database of all the templates of tasmania devices so you should be able to find yours on there so for mine i've got a toy alarm motion sensor so i'll just click that one so then if you just copy and paste the template string and then paste it into the template field from the test motor web interface also make sure the activate tick box is enabled it might be greyed out as well but just make sure it's still ticked then at the bottom just change the device name and friendly name as well so i'd do it to the same as a hostname so my motion sensor okay so click save and go back to the main menu on my specific device i've also got to enable a setting within the console so i'll just paste that in there so the motion sensor is set up now we just need to do the same for the smart plug so it's the same as before so go into configuration and configure wi-fi so for the host name on this one i'll i'll just put my light so once that's done go back to the main menu and i just need to set up the tes motor template for this device as well so if you click configuration and configure other again so back on the tasmoto database site if i click the smart plug device that i've got and then again just copy the template string and then paste it into the web interface in the template field make sure activate is ticked as well and just set the device name and friendly name again so for this i'm i'm using my light and then click save so at the moment i'm still accessing it via the ip address so you can test accessing it by the host name if you just type in the address bar so it's http colon slash and then my light and it should it should open the web interface again by that address so the smart plug should be set up now so i just need to go back to the motion sensor web interface i can then access this via the host name as well so it'll be http colon slash slash then my motion sensor on some routers sometimes like open wrt you have to add lan suffix to the end of it but i don't think on most routers you don't need to do that on the main menu click the console button and now we just need to write the main rule to control uh control the light in the video description you'll see the rule string listed so if you just paste that into the console and then press enter in this rule to turn the light on and off it's it centers my light so you can if needed you can replace this with the specific ip address of the device as well but as we're using the host names i'll just keep it as my light just to describe what the rule does the rule has two statements so the first section it asks when the motion sensor state is on and it says do backlog and backlog is just a queue of instructions or you can specify so the first instruction there is web send to my light power on and the second instruction starts a timer off for 20 seconds so you can put that to whatever you want but after 20 seconds when the time has elapsed it then sends another command to the light to power it off so back to the console after the rule has been entered just need to enable the rules so we just type rule one space one and press enter that should enable that rule so we can now see it working so if you just look for on the motion sensor when it turns blue at the top you should see the the rules kick in so it sends the command to the smart plug to turn on and in the console you can see where it says t1 which is the timer one that started so in the console if you just type rule timer one you'll see the time is there listed and if you keep typing rule timer one you'll see it counting down so when the timer completes it then sends another command to the lights to power it off that's the automated light all done there's so many possibilities with this so just check the tasmota commands link in the description as well where you can delve deeper into it i made this video as i found there's not that many simple examples out there for tasmania timers and rules so i hope you enjoyed this video thanks you
Info
Channel: Prime Tech Guides
Views: 13,000
Rating: undefined out of 5
Keywords: tasmota, motion sensor, tasmota rules, tasmota timer, tasmota timers, tasmota rule, tasmota commands, tasmota tutorial, tasmota guide, tasmota lights, tasmota smart plug, tasmota automated light, tuya motion sensor
Id: JwgiV7Ve8pE
Channel Id: undefined
Length: 5min 57sec (357 seconds)
Published: Wed Jul 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.