Hello
Im still quite new to all of this, so bear with me please.
Ive learned quite a bit from this forum so far, but I’ve run into an issue I cant seem to figure out. Im confident that Im just missing something along the way, but I cant seem to sort it out.
I have a bunch of Wyze sensors that Im trying to set up to behave like true contact sensors in the eyes of the ST hub. Ive managed to use virtual switches to have them at least show up in ST, but as switches not as contact sensors. And as Im sure most of you know, switches and sensors allow for different functionality. That said, Ive found a few versions of DTHs that suggest they may work, but Ive had no success thus far.
Im sure this is simply my lack of experience, and that Im probably just missing something, but I just cant seem to set it to work. To me, it seems that even when I set up the DTH I must be missing where it gets tied to a sensor. Or maybe its doing that in the background, but I feel like the DTHs are basically ‘standalone code’ that once established you can use and reuse over an over, which is what leads me to the idea that I may not be properly assigning the DTH to a sensor, or Im not tying the physical sensor to the simulated sensor.
Sorry if Im not being clear, the terminology is still a bit new in some cases as well. But any help would be appreciated.
The Wyze sensors use a proprietary 900MHz wireless protocol to communicate and require the Wyze USB bridge, which we currently do not support. Because of this you’d have to rely on a separate platform for interfacing with the bridge/sensors that can bridge the connection to SmartThings.
Thanks for the info. I guess I wasnt specific enough. Yes I expected to need to port the signal through something else to get everyone talking to eachother. IFTTT seems like the most common way, and seems to work fine in my testing where Ive had them work as virtual switches.
If I understand what you’re asking, you can use a virtual device which will be defined as both a contact sensor and a switch to smartthings. When you turn on the switch, the sensor will look like it’s open. When you turn off the switch, the sensor will look like it’s closed.
That allows you to have the wise sensor turn on the switch part of the virtual device through Ifttt, which will then make the sensor part looks like it’s open to smartthings.
This is very commonly used for integration with echo routines (not smartthings routines) because of the present time they can only be triggered by a sensor, not a switch. So people turn the switch part on and off with any automation or even by voice and that then makes the sensor part open and close, triggering the echo routines.
It would be a similar idea in your case. And then you could include the virtual sensor in with other sensors or sensor-based automations like smart things Home monitor.
Take a look at the FAQ for the echo routine integration, it includes the code you would need for this type of virtual device.
Hmm. Sounds like a viable option, I’ll read the post and see if I can make the info work for me. Thanks!
So, Ive managed to get the sensors to show up natively in Alexa’s list of devices, and Alexa can acknowledge the sensor status. But I cant seem to get this status sent back into SmartThings where I want to use the information to trigger other things. It seems that Alexa is a weak system to be in the middle of all of this communication, and doesnt seem to want to play well with others. I feel like there has to be a way to get Alexa to update the status of a sensor in SmartThings. Somehow.
Maybe I’ll get lucky and Wyze will just develop ST integration. Since this seems like a lot of work arounds to get simple sensor status updates.
So I think Ive figured it out, though its a huge amount of effort that needs to be done for each sensor. actual sensor-to-alexa-to-virtual sensor… then you need to do both states, open and closed. Ive only done one so far, with about a dozen more to go. I’ll update more as I chip away at them.
I never suggested you use Alexa to update the sensor. Rather that you just use the combo virtual device From the echo FAQ with IFTTT as you had tried originally With a plain virtual switch. Use IFTTT to turn on the switch part and the sensor part will then look open to ST. No Alexa involvement.
That said, if you did want to use Alexa it’s the same method. Have Alexa turn on the switch part, not the sensor part.
I’d prefer not to have alexa in the middle, I just couldnt figure out how to get IFTTT to see the sensor status, whereas Alexa handles that with no intervention from me. I’ll try again to do without Alexa in the middle, I just couldnt seem to figure it out.
Wyze has an IFTTT channel. I know the motion sensor will show up there, does the contact sensor not show up?
Ok, so I got most of them working and activating properly in SmartThings now. A few arent quite right, but I assume its just something in the way my recipes started to blur together as I was cranking through all the the setup. Alexa is no longer in the middle, it just goes Wyze sensor to IFTTT to SmartThings.
I think the issue I was having had to do with the DTH code I had found originally. When I switched to the Simulated Alexa Switch DTH everything seemed to work properly. Thanks a million for the help!!
It looked like you already found a solution, but I thought I’d post anyway.
Hey, I found a useful article describing how to do this with MyQ sensor. The process works for me using other devices connected by IFTTT. The process described creating a virtual sensor that was both a contact sensor, and a switch. Switch off, contact closed. Switch on, sensor open. Anyhow, I posted the device handler that I’ve been using on my github page:
So, you can use the Wyze IFTTT channel to “turn on” and “turn off” your virtual contact sensor’s switch.