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

Jake's old code still exists on HPM. I have submitted a pull request to get the respitory link updated to mine. Not sure how long that normally takes. In the meantime, I would caution against installing / updating from HPM.

Personally, I would consider unmatching for now.

2 Likes

Thanks. I was having the same problem with HPM overwriting the corrected code.

FYI, to unmatch the app in HPM, you need to open HPM, then go to “Package Manager Settings” and then scroll down. Not obvious.

1 Like

Pull requests must be approved by the original coder @jakelehner, but since he is MIA I'm not sure this will happen anytime soon.

If you don't get any feedback from him, check the licence he used for his code and if you can, just rename everything, change the namespace in every file so that it does not interfere with the original, give it a new name or add version number at the end, give credit where credit is due then have a your new app added to HPM. Then you can start a new thread for discussing your new app.

Thanks. I did EXACTLY that ... glad to have my integration working again.

Jon ... I THINK I know the answer - but ... is there any way for this integration to turn off notifications -does that work? I tried it - and if I look at the device details it does appear to work ... but when I look at the settings for that same camera on my phone - nope, it doesn't do anything. PS this is with CAM PLUS. Also - I tried same on IFTTT doesn't work there either although it has a feature to do just that.

This has happened again:

Something seems to be causing the token to get invalid after a few days.

Should have clarified. I did submit to jake originally with not response. Hpm also requires a pull request to add a new respository to the directory (which i have also done).

2 Likes

Something may have changed with the refresh token. I am out of town for a few days but i will see if i can find anything later this week. Open to any ideas.

1 Like

Hi,

Does this allow you to turn "off" wyze cameras from within hubitat? Like the same way you can temporarily disable cameras from recording within the wyze app? I would prefer to automate this from hubitat so I can turn off certain cameras when we're home. I realize I could get a smart plug and just cut power to the camera via hubitat but I'd rather it'll utilize the built in controls.

Thanks!

Yes, switch on/off functions the same as on/off in the app.

If you just want to turn on/off notifications but still record..then there is an option to change the motion notification (true/false).

2 Likes

Yes! Here's what I do when HSM is armed away:
image

1 Like

New here and to Hubitat :wave:

I didn't get the original app to work (auth issue with login), and with the latest tweaked app I was ablentologin and see my devices (2ncolor bulbs), but ran into issues and couldn't add them. I got the following error message in the log:


2023-09-15 10:40:42.970 AMerrorcom.hubitat.app.exception.UnknownDeviceTypeException: Device type 'WyzeHub Color Bulb' in namespace 'jakelehner' not found on line 796 (method pageMenu)
app:302023-09-15 10:40:42.884 AMinfo[WyzeHub] Adding device type MeshLight with mac 7C78B2328DC5

I was however able to make my wyze bulbs turn on by an aqara motion sensor by creating a virtual switch that was toggled by the aqara motion sensor. I was able to import the virtual switch device into Google Home and make the wyze bulbs turn on/off by the state of the virtual switch.

Cheers

Do you have the color bulb driver installed in addition to the app?

I think i've found the issue. No idea why/how but lines 1060 and 1094 validateApiResponse(response) is commented out for some reason.

That is the where we check for a valid auth token and call refreshAccessToken() if needed.

My setup seems stable if someone else is willing to update and log results. The initial auth token is only valid for 2 days per the wyze site.

1 Like

I noticed that line was commented out and meant to ask about it. I'll uncomment them and see if that helps.

So if you remove the comment tags from those lines and save the code will that update it? Or does it need to be "reinstalled"

Yes.

(Assuming you are running the code @fieldsjm posted a month ago)

1 Like

My github files have also been updated.
https://raw.githubusercontent.com/fieldsjm/Hubitat-2/master/WyzeHub/apps/wyzehub-app.groovy

Additionally, the updated package is also available on HPM. Search WyzeHub.

3 Likes

Hey, now that you're sort of maybe hopefully can I buy you a coffee taking this on...would you consider adding sensor functionality? (contact, motion, water)

Seems like there are a few python project that have accomplished this, so it might be possible...

I don't have any other these so testing this may be difficult. I will do some additional research but it looks like it may pull events the same way I currently do for the cams.

The issue will always be in terms of polling. It will never be real-time data unless you are constantly refreshing and will most likely hit a rate limit.