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

No support for the vacuum yet. From the initial glance I took at the Python library it looked like adding support would be fairly involved. Lots of functionality to support there including maps and routes and such.

Not to say it won't be done, but I am very unlikely to get one myself (don't have the right floors for it) so a member of the community would need to do the work.

You may want to pull that collection down as it has some of your data in it.
Also, I attempted to get my setup up and running, but I seem to be making calls against your account, or may be, and did not want to proceed.

Just went in and tweaked the debug code to get the Model info, here's what I've found...

  • Model number returned:HL_LSLP
  • With the change, I can set the color/hue/saturation, as well as Color Temp and brightness level. So I have the same functionality as the color bulb.
  • The pro strip has 16 customizable segments that you can set to a different color/level/etc for each segment. The docs don't differentiate number of segments for the 16' (which I have) or 32' one, so I think they both have 16. You have to get into a special edit screen in the app to do the per-segment selection. To save it, you have to create a 'scene' after you've customized. Not sure the complex config is worth it, since otherwise it can just be treated like any other color bulb.
  • Pro Strip link: Wyze RGB LED Light Strip Pro | For Kitchen, TV, Bathroom, Outdoor and More
1 Like

Hm. Ok yeah thanks for the heads up. Thought I had everything set to variables. The Mac addresses I don’t really care about. Most of the devices I use through postman are “test” devices anyway.

I’ll post another update with better instructions later.

Ok so based on this information I think it will be best to create a new driver for the led strip. Sounds like it should have a parent device for the whole strip with child devices for all the segments.

It may be good enough to treat the strip like a group and the segments like mesh lights.

I’m willing to bet the segments show up as sub devices in the api response. This is similar to how the outdoor plug works.

Fantastic work!!!! Damn HPM wasnt pulling in updates on the wyzehub app. All working fine now, looking forward to getting my lightstrips into HE so I can finish the Xmas decorations! I'll add the line for the non pro version (that I have) just know that there is one when you add the new driver.

Those 2 capabilities would have to be there for Motion or Sound notifications to actually show on the driver.

The update doesn't work at all so far for my v2 camera to show Motion or sound notifications. The only thing so far that works if Switch on/off and Online status.

I manually updated the app and driver again and removed/readded it just to verify.

I have both V2 and V3.

The notification attributes simply pull the property data indicating whether that notification setting is enabled in the app. The respective commands were initially intended to activate/inactivate that propperty setting, however i've noticed some inconsistencies of late which is why i kept digging.

The latest PR that i believe @jakelehner has now updated includes a command to enable/disable motion recording completely. Instead of updating a property value, it actually sends an action similar to power on/off. More reliable in my testing but full disclosure, I haven't been working on this much since that PR (new baby at home, free time is dedicated to sleep :yawning_face:).

As far as events, I would love to use these as motion sensors but I have not been able to retrieve event data. I am assuming there is an API endpoint for events but I haven't found it. Even if we do find it, we will be at a disadvantage as this app is polling for data after the fact, events received in HE would not be in real-time.

FWIW, I avoid IFTTT at all costs so I use a combination
of tasker and webcore (requires a always on android device to intercept motion notifications).

1 Like

Oh gotcha, didn't realize it was just if the notifications are enabled/disabled. I never thought of Tasker, may have to try that route although so far IFTTT is actually pretty quick and motion & sound alerts show up within a few seconds max on my virtual device.

I added a trigger button on this driver to do a motion alert then use RM to trigger the button so the motion alert shows on this driver (same with sound).

Issues with HPM should be resolved now.

Glad IFTTT is working for you, extreme delays left a bad taste for me so when they moved to the new pay structure, I jumped ship.

I debated on adding the motion sensor capability with active/inactive commands for my own personal use (the backbone of the virtual motion device) but i already had the VM devices setup and functional before this app came about.

If you or anyone else is willing/able to look into the event endpoint, i'd be happy to build it into the device. I can think of a couple use cases even if data isnt realtime (i.e. rules based on time since last event).

A quick update; I was able to get everything up and running for the API testing. The PID is P1056 and value 2 is off and 1 is on.

1 Like

Found my Wyze Bulbs not working today after setup a couple days ago. Logs revealed:

app:2832021-11-28 04:18:37.685 pm errorgroovy.lang.MissingPropertyException: No such property: code for class: java.lang.String on line 985 (method deviceEventsCallback)

Ran update from HPM, reauthenticated, and it's working now. Any idea if I did something to make it drop the authentication?

Nothing you did ... this is a known issue with the package currently. It's not handling refresh tokens and/or rate limiting errors properly.

I think the 'code' error you're seeing is coming from a command running, the package not recognizing the response is an error, then calls the deviceEventsCallback with an invalid payload.

I imagine mine will break soon and will try to put some more effort into troubleshooting the issue. Re-authenticating is a temporary work around.

1 Like

Is this just that little LED light you can get to add on to the v3 cam or is this something else?

If the "floodlight" functionality is merged in with the cam driver, the light control buttons will show up for all cameras even if it doesn't have the light. Maybe that's ok.

There's also a minor conflict in that the "switch" functionality is hooked up to camera on/off. Are there any considerations that need to be given to allow the 'light' on the camera to be controlled by rules?

This is something different. It would be nice if the primary 'switch' was associated with the floodlights, but it is a wyze v3 "accessory".

"Wyze Cam Floodlight" Wyze Cam Floodlight

Edit

Perhaps a different device handler for cameras with those unless they don't have the property defined or as '0'?

Finally had the refresh token expire while the logs were up! I was able to confirm there's a bug in the refresh token flow ... which TBH is kinda hacky to begin with.

I think I found the (a) bug though. Have to wait for the refresh token to expire again to try it tho ...

In case it's of use, here's the debug log for mine. Authentication bugged out again on me. Was able to refresh auth and working great again.

app:2832021-12-01 07:09:19.060 pm errorgroovy.lang.MissingPropertyException: No such property: code for class: java.lang.String on line 985 (method deviceEventsCallback)

app:2832021-12-01 07:09:19.018 pm debug[WyzeHub] {"ts":1638403756248,"code":"1001","msg":"ParameterError","data":{}}

app:2832021-12-01 07:09:19.016 pm error[WyzeHub] API Response error!

app:2832021-12-01 07:09:19.006 pm debug[WyzeHub] validateApiResponse()

app:2832021-12-01 07:09:19.004 pm debug[WyzeHub] deviceEventsCallback() for device 7C78B218BB99

app:2832021-12-01 07:09:18.438 pm debug[WyzeHub] asyncapiPost()

app:2832021-12-01 07:09:18.422 pm debug[WyzeHub] [mac:7C78B218BB99, model:WLPA19C, actionList:[[pid:P3, pvalue:0]]]

app:2832021-12-01 07:09:18.417 pm debug[WyzeHub] apiRunActionList()

app:2832021-12-01 07:09:18.407 pm info[WyzeHub] [Computer desk] 'Off' Pressed

hi all! this sounds great, i have the drivers and app installed. i have a cam v1 or v2. but cant make it work on dashboard. i basically need motion or sound detection... how can i do it? i added my garage cam ok but it doesnt report anything

it says false on online but thats because i just restarted it...

See this post above:

This integration doesn't currently report actual Motion or Sound events, just if the notifications are enabled or disabled. I just use IFTTT for now to do this using a Virtual switch I hate to say for both Motion and Sound events although can use other ways like Tasker too.