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.

2 Likes

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!

9 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)

1 Like

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.

Update: the functionality to trigger on object detection and send relevant Webhook is now added to tinyCam. Check out my other posts on this and the HE app we built for it...

3 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!

1 Like

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.

With IFTTT going paid, are there any other alternatives? I need to figure out a way to link my Hubitat VSs with Wyze triggers.

I just checked to see if the Alexa skill for Wyze added motion support, but it didn't exactly. However, I do see that it added "Person detected" support that you can use as a trigger for an Alexa routine (assuming you pay for either Cam Plus or Person Detection as soon as this becomes a paid service for most users in the next month or so). In some ways, this is nicer: I really only want to consider it motion if it's likely to be a person, anyway. In others, it's worse: this adds a processing delay to the time the event takes to get reported, so the motion will likely be long gone by the time it matters for tasks like turning on a light. But at least the Alexa integration is still free-ish. :slight_smile:

If you're using the WyzeSense devices then I'd highly recommend checking out [RELEASE] Alpha WyzeSense Integration [Code no longer being updated]. I use this and it works flawlessly

2 Likes

Also looking for IFTTT alternatives, but for Wyze cams. Currently doing the following through HE using IFTTT:

  • reboot all cameras
  • record and upload a video for a given camera (for example: when contact sensor opens)
  • enable/disable motion detection on all cameras (when location mode switches from/to Away)
  • if camera detects motion, turn on a HE switch.

Has anyone been able to achieve any of it without IFTTT?

I have with alexa made a virtual rgb light and a virtual motion in hubitat made rules so that when bulb on motion detected and when motion off then motion clears. after exposed them in alexa made routines so when motion detects turn bulb on and when motion clears turn bulb off and voila motion in hubitat works with motion apps and all no ifttt use the same to make contact control my smart life ceiling fan light wifi controller and my Xiaomi wifi fans as well if you can control it in routines via alexa it can then be exposed in hubitat with secondary virtual bulbs and virtual sensors for anything