This seems like an easy problem but I cannot seem to solve it, I might be missing something simple here.
I’m trying to turn on my kitchen lights when motion is detected (with as little delay as possible) and then turn them off about 5-minutes after motion has stopped being detected. I have the following setup:
- Wyze Motion Sensor
- Kasa (TP-Link) Smart Light Switch (HS200)
- SmartThings Hub
- Google Home (not sure if this is at all useful here)
Wyze is not integrated with Kasa directly, and Wyze is also not integrated with SmartThings. So using IFTTT I was able to do something like:
- IF Wyze motion detected THEN turn on the Kasa Smart Light Switch
- IF Wyze motion clears THEN turn off the Kasa Light Switch
The problem is that if Wyze doesn’t detect motion for 30 seconds in the kitchen e.g. slowly stirring a pot, it will clear and turn the Kasa light switch off, so I wanted a longer period before it clears. The Wyze app actually offers a cool rules engine which includes the ability to set a configurable trigger for the length of for which the motion sensor is clear before an action is initiated…this is exactly what I’d want to control but that Wyze rules engine’s actions cannot reach externally to IFTTT or any other service, it can only trigger actions to its own Wyze bulbs, plugs, etc. and Wyze does not make bulbs yet that would fit the recessed lighting I have in my kitchen. Ideally Wyze would just add the ability for the rules action to hit an external service like IFTTT.
I feel like there might be some option to do something with virtual switches in SmartThings, but that seems slower and I still cannot figure out the logic there to get it right since the motion detected and 30-second clear notification are basically nearly immediate one-time events.
Alternatively, maybe the solution is to buy a SmartThings motion sensor or something directly compatible with Kasa, but I’m unfamiliar with those devices and whether it has the ability to have a configurable clear (no motion detected) period.
Anyways, looking forward to hearing any ideas people might have.
If you are using SmartThings you could try your hand at using something called WebCore, that allows you to do quite a bit more. If you search the SmartThings forum for Webcore you will find a lot of information. It does take a bit of work but there are a lot of helpful people over there also
You can do this with an Alexa routine. I know you didn’t mention an echo device but you don’t need a physical echo device to set up an alexa routine.
I also have a kasa switch. I would say it’s a fair bit faster than IFTTT. You can set the delay to whatever you like. You can also specify a duration to suppress the command. I.e. Motion detected turn on light suppress for 20 min so the next earliest time it can run is 20 min later.
I 2nd the Alexa comment, I have a bunch of TP link switches, plugs and bulbs and Alexa integrates them with my other smart devices seamlessly. For me, IFTTT had a long delay between the sensor picking something up and the device being triggered. With Alexa it is pretty much instantaneous. Plus it’s basically idiot proof, where it seems to me IFTTT and webhooks takes a lot of time and or effort to setup properly.
This is awesome, thank you so much for this solution, it’s working great now! You’re also right that it’s faster too. I definitely thought I needed an Amazon Echo (Alexa) device, so this is amazing that I can just use the Android (or iOS) mobile app to create routines. So I now have 2 simple routines:
WHEN Wyze Kitchen Sense detects motion
ALEXA WILL Power On the Kitchen Sink Lights
WHEN Wyze Kitchen Sense detects
no motion for 5 minutes
ALEXA WILL Power Off the Kitchen Sink Lights
This has also made me realize that IFTTT, although useful, just doesn’t make sense to use when compared to the faster and more robust Alexa skills for Wyze and Kasa switches/lights. I’ve since disconnected all my IFTTT triggers and moved them into Alexa routines and they all work, just faster!
I think that I’ll use WebCoRE for other things, so it’s a good call out and thanks for that info, but the Alexa Routine just works perfectly and faster in this instance.
No problem! Glad everything is working now. I was using ifttt before the Alexa integration was live and yea it’s just way more cumbersome. I was able to simplify like 10 applets into like 4 routines. Sometimes if there are server issues you can get delays on routines in the 10+min range but most of the time it works really well. If your already using Wyze Sense and are ok with smart speakers I would recommend getting an echo device. They are cheap and can automatically announce a custom phrase if there is motion somewhere or a door opens/closes.
Thanks for the heads up on the routine delays, seems pretty solid so far but I guess that’s bound to happen with any cloud service (IFTTT, Alexa, etc.). I’m so committed to speaking and playing music through all my Google devices (prior to getting other smart devices) that I’m having a hard time mentally considering buying an Echo device, but maybe a Dot or Flex because I’m not realizing how much better the Alexa integrations are across device manufacturers.
Yeah, I don’t even use IFTTT anymore. The delay is awful. I use mostly Smarttiings and Alexa routines now, you can do pretty much anything between the two of those. If your using google devices for music, then you must he using Google Assistant right? Can’t you use that instead of Alexa? Does Google Assistant see the motion sensors and contact sensors?
I did something very close to this but got wonderful instructions very clear from Utube. There is presenter there on aHomeshow who does a great job.