I want to use SmartThings/Wyze motion sensor to turn off a few lights


#1

1) Give a description of the problem
I want to use Wyze motion sensor to turn off a few lights connected to ST

2) What is the expected behaviour?
turn off a few lights when no motion is detected for 5 minutes.

3) What is happening/not happening?
Noting complete noob! I have WebCore and IFTTT and ST linked together.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Can you see your motion sensor in Webcore?

if so, here is your first piston:

IF motion sensor changes to ACTIVE
Then 
With 
Lights do turn ON

IF motion sensor stays INACTIVE 5 minutes
Then
With 
Lights do turn OFF

#3

No, I can’t see any Wyze devices in Webcore. I do see them in Ifttt.


#4

If your Wyze is a camera, as far as I know, it is currently not compatible with Smartthings.
(which is likely why you are resorting to IFTTT)

Unfortunately, if you cannot get SmartThings to see the devices, then webCoRE cannot communicate with them either… (or respond to any of their changes)


For those following along, Wyze is a prime example of what I mentioned earlier:


A common temporary hack would be to let IFTTT be the middle man… Passing info from Wyze > IFFFF > webCoRE… and then letting webCoRE handle what happens next.

A long term solution might be attained by contacting Wyze, and telling them your desire to make it SmartThings compatible.


Pro Tip:

For future reference, I never buy any new devices until after I have confirmed compatibility with SmartThings…


#5

Hey @nyx

I’m doing this exact thing using IFTTT, Wyze and the Webcore Webhooks:


In ifttt.com/create, pick wyze, select “Motion sensor senses motion”. In the “Then” section, pick Webhooks and paste in the URL you get from the “IFTTT Executes” line on webcore (in my piston, line 18). It looks like this:

Now do the same for the motion clear event.

This may be easier: IFTTT, if integrated with smartthings, can turn off and on light bulbs for you. You can create “If Wyze Motion Senses Motion, then turn on a device in smartthings”. The only downside to this is that there is no delay with the Wyze sensors, so the “off” event will turn your lights off almost instantly. Hence, I think the piston option is the best.

This may be more or less complicated: You can create a “Simulated light” for IFTTT to turn off and on. Then you can watch that simulated bulb in webcore or other smartthings automations.

Someday, I’d like to make a combo simulated switch/motion sensor so I can use IFTTT to “turn off/on” the motion sensor. Another post posted this for a contact sensor, and I like the integration, and copied the idea for some other things.

Does this answer your question?

@ike2018 and @wcmore, Wyze sells a kit for roughly $20 that contains 2 magnet contact sensors and a motion sensor (and a USB dongle for a wyzecam as a ‘hub’). They’re crazy cheap, seem to work, but are a bit slow.


#6

Thank you so much for the example, I’m trying to do the exact same thing. I haven’t implemented/tested this yet, but does your piston cause the light to turn off if motion clears on the sensor but motion starts again within the wait period? For example, sensor motion happens at 1:00pm so the light turns on, motion clears at 1:03pm, then sensor motion begins again at 1:04pm and this time the motion doesn’t clear until 1:15pm. Would the lights still turn off at 1:09pm based on your 6 minute wait? This is the issue I keep running into because I need the piston to remember that the motion is already active, and if it activates again to reset the wait time.


#7

If IFTTT executes “active” during the 6 minutes, it will start execution at the very top.

If IFTTT executes “active” during the fade, it will start execution at the very top, but I believe the fade will continue.


Pro Tip:

I often use SimSwitches when using IFTTT. Maybe something like:

Piston #1

IF IFTTT executes 'active'
    Then Turn on SimSwitch
END IF

IF IFTTT executes 'clear'
    Then Turn off SimSwitch
END IF

Piston #2

If SimSwitch changes to on
    Then Set Bulb 2 & Bulb 4 level to 100%
END IF

If SimSwitch STAYS OFF for 6 minutes
    Then Turn off Bulb 2 & Bulb 4
END IF

With this method, as long as IFTTT keeps sending ‘active’ commands, the bulbs will not turn off.

Note: Do not try to combine these into a single piston.