[RELEASE] WyzeHub - Wyze Device Integration (minimal cam support)

Hello all. I've been working on an app to control Wyze Devices and have it at a point where it is "release ready".

Devices Supported:

  • Color Bulb
  • Plug
  • Outdoor Plug
  • Camera (limited)

There is discussion and some work being done on camera support. Still pretty early on that.

Hopefully adding to Hubitat Package Manager soon.

7 Likes

Oh wow, very nice, thank you. I don't have any wyze bulbs or plugs yet because there was no integration. I do have cameras. The vacuum also will be pretty nice, but the door lock will be awesome.

Is this local or Cloud?

Thanks for creating this.

I have only about three Wyze plugs, bought on a whim as an experiment. They're not quite as reliable as my Z-wave stuff, but are in non-critical uses. Still, will be nice to integrate them into the borg that is my HE system.

Cloud

1 Like

The lock should be easy to add. It's been done for Homebridge so it's just a matter of reproducing that functionality. I'll add it if I get my hands on one (not super keen on spending the $100 tho) or someone else can feel free to add.

Also a note on the bulbs. This will only work for the color bulb right now. The CT bulbs use different commands. Easy to implement but since I don't have one I didn't want to add code without being able to test it.

Cloud. It just makes calls to the undocumented Wyze API.

FYI ... found a bug with the refresh token logic (in that it doesn't work). Will post a fix soon.

In the meantime if your wyze connection stops working, re-login by editing your login settings and that should resolve the issue.

This is great. I'll be able to kick IFTTT to the curb now.
I was scratching my head why I couldn't get the Wyze Plugs to show up in the Simple Automation Rule app as something I could control. I then took a look at the driver code for the Plug and Plug Group. There isn't the Switch Capability.
Once I added capability "Switch" to the code they now work anywhere a Switch works in apps.

1 Like

Want one? I've been trying to get rid of it but nobody in Bismarck wants it lol.

1 Like

Hm. I'll look in to this. Or if you don't mind, you could submit a PR back to the vNext branch.

Update on this. Turns out it wasn't a refresh token issue, it was a rate limit issue. Apparantly refreshing my 19 devices every 10 seconds tripped some rate limit eventually. It took multiple days of refreshing ever 10 seconds though, so that's weird. Getting a new Access Token / Refresh token pair resolved the issue though.

Going to rethink the refresh logic. Maybe just have the devices refresh less often and assume folks aren't updating their devices from Wyze often once they add them to Hubitat.

Two pull requests sent, Plug and Plug Group.

1 Like

Thanks so much. I will try to review this evening.

Actually, I didn't realize it was just one line, ha. Merged both. I will likely merge this in to the main branch soon along with a few bug fixes.

Thanks again for doing the work to figure this out and also to submit the change!

1 Like

Haha, I saw you updated a driver the other day also, I wanted to say something funny about my wife but it was no sense at all, but I can take the risk to die and test some wize bulbs lol

1 Like

I know you have your hands full but whenever you want me to send that camera for you to work with i will be more than glad so you can work on it. I also have a bunch of motion sensors and the window/door sensors that if you want to work on.

The one i will really will like is the doorbell and vacuum integration i don't care about anything else from wyze as i disconnected everything except vacuum and doorbell.

Thanks. I'll hit you up on DM. I've been able to get a v3 cam and another user has implemented some early cam control.

I may be interested in working on some of the home security items and/or the door bell. That will mostly depend on how things progress over the next week or so. Wyze's API is being difficult to say the least. Posting an update shortly.

Hey all. A few quick updates:

  • User @fieldsjm graciously did some initial work on Camera support! His PR has been merged in to the vNext branch.
  • My plan is to bundle his updates along with the Outdoor plug in to a v1.1 hopefully this week.
  • Unfortunately, I'm starting to have a lot of trouble interacting with the Wyze API. I am getting "429 Too Many Requests" errors, suggesting I'm hitting some rate limit. The issue is, I get this error after getting an access token then hitting the API twice in 5 minutes. Like literally ... twice in 5 minutes. I'm no longer polling the API for device status constantly, so there's no way any actual rate limit is being triggered other than some incredibly strict limit Wyze has set up to be a D.
  • I've found a number of other forum posts discussing issues with the Wyze API. One being from the guy who maintains the HomeAssistant package. I may reach out to him soon.
  • Depending on how these "429" issues go this week, I may or may not make more progress on this over the next few days. As an API engineer myself, this is too frustrating to deal with.

I will probably reach out to Wzye support over the next day or two and attempt to start some sort of conversation with their API team. I design and interact with APIs for a living, so hopefully they'll be willing to be work with the community and start a meaningful dialog.

Otherwise I'll be getting rid of the SEVENTEEN damn color bulbs I have in my living room and finding a manufacturer that is supportive of the community.

1 Like

As far as RTSP feeds for cams. Someone turned me on to this package and I'm going to try and get this working with my v3 as time and motivation allows. If that works we can likely pull the image/feed in to Hubitat without the Wyze API.

Feel free to beat me to it :wink:

2 Likes

Download the Hubitat app