Control Wyze from HE

I keep hearing that folks are connecting to Wyze through IFTTT, even getting cam feeds on their dashboards. I am new to Hubitat, but not very new to the whole smart home world. That said, I am having the hardest time figuring out how to setup the three things to work together. I can create applets to control HE devices from IFTTT, but cannot see how to control Wyze devices from HE through IFTTT.
Any help is greatly appreciated.

What you'll need to do is create virtual devices, expose them to IFTTT via Hubitat's integration, then do an applet on the IFTTT side do make them "talk to each other." For example, to get motion from Wyze cameras into Hubitat:

  1. Create a new virtual device on Hubitat with type "Virtual Switch," and call it whatever you want.
  2. Ensure this switch is exposed to IFTTT via Hubitat's integration.
  3. Create some applet on IFTTT like "If motion is detected on Wyze camera, turn on Hubitat virtual switch."

But wait, it gets trickier! Wyze (last time I checked, at least) doesn't have a way to trigger anything in IFTTT when motion goes inactive, so you have to guess. I think I make mine turn off immediately (using the auto-off option in the virtual switch device) and just ensure that I use extra-long timeouts in motion-based automations to account for this unknown (and hope that motion doesn't sustain for longer than that any time I care or that the device will trigger a new motion event). And you'll note that I'm using a virtual switch, not a virtual motion sensor. That is because IFTTT can't change the state of a motion sensor, but it can manipulate switches. I'm technically using a custom "virtual switch with motion" driver that converts on/off switch events to active/inactive motion events, though there are lots of ways you could handle that conversion if needed.

So...not ideal. The best thing would just be to have something Hubitat supports natively; second best would probably be Wyze's IFTTT skill being able to trigger on "motion inactive." But if you want to use it, there is at least some way to do so.

I'm not as sure about the video feeds. I know Wyze has a more or less unsupported RSTP firmware, which you could then use software to convert into something you could display on a webpage (which is all a Dashboard is), but unless I'm missing something I don't see how you could do it with Wyze's standard firmware given that access is basically restricted to just their app.

If you're talking about the cameras for motion alerts, then you would need IFTTT.

If you're talking about WyzeSense, then you can use [RELEASE] Alpha WyzeSense Integration

My recommendation is to use tinyCam. I've started using this for my Arlos now that it supports them and it's crazy good. It also supports Wyze cameras I believe (but YMMV). Set the app up on a tablet or suchlike in the house and it will provide a webserver which allows you to stream your video out to a dashboard. It works really well. Even better than that it has a Webhook which gets triggered on motion (which is sensed directly in the app, so no camera or cloud functionality is needed) and this can be used to trigger (via the HE Maker API) a virtual presence sensor you can set up for each camera in HE. The really nice thing about it is that tinyCam sends an active Webhook on motion and an inactive one later when motion stops. So it can dynamically activate your virtual presence sensor. I've been working with Alex the writer of the app to try to find a way to extend this to the face, vehicle, pet and person sensing that the app has and he is thinking this through. This would make it even better in the future. It takes a bit of effort to set up but it works very well and has been worth the effort for me.

Dont forget to let the community know which route you take and how it goes!

5 Likes

TinyCam is a great choice, I use that for my cams. I also found if you create a camera group in the Wyze app, you get a live feed when you go into the app. If you have a Pan Cam, you can click to control (unlike in TinyCam where you can't since it's rtsp)

Thanks for this info! Would you share your Maker API code to help me understand how you did this? The documentation is pretty thin.

In tinyCam, in the individual camera settings panel, you can define a Webhook to trigger on-motion. So I used this to trigger a virtual motion sensor that I set up in HE, as per the example below...

The great thing about his app is it also sends a Webhook when motion stops. It works perfectly. I'm trying to get him to add similar webhooks for his functionality for pet, vehicle, human and face recognition or at least some way for us to access these into Maker API or via an HE driver. That would be really cool.

2 Likes

Thanks for the tip. My son-in-law was asking for this today and I thought I was going to have to use the RTSP firmware on all of his camera and IP Cam Viewer.

Thanks Angus, I almost have it working. I am getting the active on, but does webhook send an inactive, or just a second active on? The switch doesn't turn off when motion stops.

Hiyah. My assumption was it was automatically sending an inactive webhook because mine were triggering back off again automatically. I didn't need to do anything or set anything up. It just happened as if by magic (which I'll admit was a real surprise)...

If it's not working for you I will have to check mine again. Busy with other aspects right now. Or you could potentially set up a timeout after a while if the motion doesn't continue to get triggered.

Also, from my experience, do bear in mind that using cameras to trigger actual motion detection is a problem. They really respond to a change in the image not infra-red motion. So for example, if the lights in a room get turned on, then the camera will say there is motion (because the image changed significantly). So I've found for triggering, for example, lights on with presence they are pretty useless. But to keep lights on with motion, they work quite nicely - they add another element to the equation to make the lights stay on along with your motion sensors.

1 Like

Thanks for helping me get started on Maker API! I had been using the 15 second auto timeout to turn off my virtual switch, but wanted to take advantage of the 'inactive' message if it worked. Thought I might have it coded wrong.

I have been planning to add PIR motion since I am using it outside where headlights and shifting shadows will trigger. I wish tinycam had a way to define a motion sense zone like Wyze. I am not interested in motion that occurs in the other half my image but haven't been able to find any mention of that.

1 Like

Yes, tinyCam does have motion zones. There is an option to select which parts of the image it will use for motion sensing and it works fine...

Seek & yee shall find. It really is an amazing app.
Hope it's what you are looking for!

d-oooh! Helen Keller could have found that!! Thanks! :roll_eyes:

1 Like

ooo, i might have to rethink how i have my cams connected. i currently have them via RTSP

Yeah, this is better IMO.