wyzeapy icon indicating copy to clipboard operation
wyzeapy copied to clipboard

Fixed toggles and properties for many camera models

Open KyGuy2002 opened this issue 1 year ago • 13 comments

I tested and fixed many of the control entities in this integration. I also added some that were unavailable and removed some that are not applicable to the device they are on.

Note: These changes were made to facilitate changes made to the ha-wyzeapi integration. PR: https://github.com/SecKatie/ha-wyzeapi/pull/607

Note: I squashed all my commits into one. This is the first major HA contribution I made so I wanted to clean up all the commits where I was troubleshooting the HACS integration installation stuff.

Changes

  • Implemented Battery Cam Pro Spotlight
  • Fixed Battery Cam Pro Notification Toggle
  • Fixed Battery Cam Pro Event Recording (Motion) Toggle
  • Fixed Battery Cam Pro Power
  • Fixed Battery Cam Pro Siren
  • Fixed Floodlight Pro Floodlight
  • Fixed Floodlight Pro Notification Toggle
  • Fixed Floodlight Pro Event Recording (Motion) Toggle
  • Fixed Floodlight Pro Power
  • Fixed Floodlight Pro Siren
  • Removed Motion Detection Toggle from Video Doorbell Pro (Didn’t work, can’t fix)
  • Removed Power Toggle from Video Doorbell Pro (Device does not have that function)
  • Removed Siren Toggle from Video Doorbell Pro (Device does not have that function)
  • Fixed OG Cam Notification Toggle
  • Fixed OG Cam Event Recording (Motion) Toggle
  • Fixed OG Cam Power
  • Fixed OG Cam Siren
  • Implemented V4 Cam Lamp Socket Accessory (Didn’t test with v3, but should work)
  • Removed Floodlight Toggle fromV3 Cams without Floodlight Accessory
  • Fixed Wyze Cam Outdoor Notification Toggle
  • Fixed Wyze Cam Outdoor Event Recording (Motion) Toggle
  • Fixed Wyze Cam Outdoor Power
  • Fixed Wyze Cam Outdoor Siren

Not Working (Proprietary/Tutk Communication Protocol)

  • V4 Cam Internal Spotlight
  • V3 Pro Cam Internal Spotlight
  • OG Cam Internal Spotlight

Could Not Get Working/Needs Testing

  • Video Doorbell Pro Notification Toggle unavailable
    • I can confirm the API works, but the toggle appears grayed out in HA. The device.available attribute is False in HA. Suggestions?
  • V3 Cam Lamp Socket Toggle
    • Don’t have one setup to test.
  • Video Doorbell Pro Motion Toggle
    • Request does not appear in proxy… Not sure what i'm missing.
  • OG Cam siren is stateless
    • Not sure the names of the properties for the OG cam. The app makes a request to get iot props for the other devices using the devicemgmt api (FLP, BCP), so I can see the list of possible properties, but the OG does not do this. Other notification and motion detection properties are the same, but siren returns None.
  • Some toggles revert their state after toggling, causing a desync between the device and HA.

KyGuy2002 avatar Jun 15 '24 05:06 KyGuy2002

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 15 '24 05:06 CLAassistant

Does the video doorbell return something weird when we pull its status? Maybe the API is lying about its availability or the prop doesn't exist for some reason.

SecKatie avatar Jun 20 '24 23:06 SecKatie

Using

await camService.update(cam)
print(cam.available)

on wyzeapy returns True, but in HA the switch entity is "Unavailable"

KyGuy2002 avatar Jun 21 '24 06:06 KyGuy2002

After digging deeper, it looks like the VDBP device is never getting updated.

In the HA logs it never logs the "Updating Device" for that camera.

KyGuy2002 avatar Jun 21 '24 21:06 KyGuy2002

After digging deeper, it looks like the VDBP device is never getting updated.

In the HA logs it never logs the "Updating Device" for that camera.

I wonder why that would be, it’s just added as a camera right? I don’t have one of those to play around with.

brg468 avatar Jun 27 '24 16:06 brg468

Does this also fix the Wyze notifications toggle switch? I used to be able to use it to turn on notifications in the Wyze app and turn them back off again. The switch is still available in Home Assistant but it doesn’t matter what I do. It does not change the Wyze app bell whether it has a line through it or not. Thanks for all your help on all this.

mikefrantz avatar Jul 26 '24 18:07 mikefrantz

It does not fix the notification switch.

brg468 avatar Jul 26 '24 19:07 brg468

Thanks for your quick reply. Is there anyway to fix the notification switch or is that something you’re working on?

mikefrantz avatar Jul 26 '24 19:07 mikefrantz

We are looking into that but currently stuck, so not sure when or if that will work.

On Fri, Jul 26, 2024 at 2:04 PM mikefrantz @.***> wrote:

Thanks for your quick reply. Is there anyway to fix the notification switch or is that something you’re working on?

— Reply to this email directly, view it on GitHub https://github.com/SecKatie/wyzeapy/pull/91#issuecomment-2253314187, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASCYKZKROJRS5CGYQGIBQ6LZOKMTXAVCNFSM6AAAAABJLMOAACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJTGMYTIMJYG4 . You are receiving this because you authored the thread.Message ID: @.***>

KyGuy2002 avatar Jul 26 '24 19:07 KyGuy2002

My assumption is they’ve changed the app at the beginning of this year so now in order to turn it off, you have an option. That may be why we are having issues with it. See screenshot below. IMG_1738

mikefrantz avatar Jul 29 '24 15:07 mikefrantz

Yes. I was able to find the api endpoints and what data to send, but it seems to use a different authentication scheme than the others, so that’s where I’m stuck.

On Mon, Jul 29, 2024 at 9:17 AM mikefrantz @.***> wrote:

My assumption is they’ve changed the app at the beginning of this year so now in order to turn it off, you have an option. That may be why we are having issues with it. See screenshot below. IMG_1738.png (view on web) https://github.com/user-attachments/assets/bd2b2505-9523-482f-8a61-f08c894b4a3c

— Reply to this email directly, view it on GitHub https://github.com/SecKatie/wyzeapy/pull/91#issuecomment-2256217962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASCYKZNKJ7JCRI5Y7OTO7ELZOZMITAVCNFSM6AAAAABJLMOAACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGIYTOOJWGI . You are receiving this because you authored the thread.Message ID: @.***>

KyGuy2002 avatar Jul 29 '24 16:07 KyGuy2002

@KyGuy2002 is this ready to go in?

SecKatie avatar Sep 01 '24 03:09 SecKatie

Yes, everything that was listed in the original PR description is working, except the stuff I noted (that does not degrade the current functionality so should be fine).

I do not know how to fix those things, so me in the future or someone else can do those separately.

KyGuy2002 avatar Sep 01 '24 04:09 KyGuy2002