Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed toggles and properties for many camera models #91

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

KyGuy2002
Copy link
Contributor

@KyGuy2002 KyGuy2002 commented Jun 15, 2024

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: SecKatie/ha-wyzeapi#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.

@CLAassistant
Copy link

CLAassistant commented Jun 15, 2024

CLA assistant check
All committers have signed the CLA.

@SecKatie
Copy link
Owner

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.

@KyGuy2002
Copy link
Contributor Author

KyGuy2002 commented Jun 21, 2024

Using

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

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

@KyGuy2002
Copy link
Contributor Author

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.

@brg468
Copy link
Collaborator

brg468 commented Jun 27, 2024

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.

@mikefrantz
Copy link

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.

@brg468
Copy link
Collaborator

brg468 commented Jul 26, 2024

It does not fix the notification switch.

@mikefrantz
Copy link

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

@KyGuy2002
Copy link
Contributor Author

KyGuy2002 commented Jul 26, 2024 via email

@mikefrantz
Copy link

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

@KyGuy2002
Copy link
Contributor Author

KyGuy2002 commented Jul 29, 2024 via email

@SecKatie
Copy link
Owner

SecKatie commented Sep 1, 2024

@KyGuy2002 is this ready to go in?

@SecKatie SecKatie added the bug Something isn't working label Sep 1, 2024
@KyGuy2002
Copy link
Contributor Author

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.

Copy link
Collaborator

@brg468 brg468 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the devices I have (which of all the changes here is really only the V3 cam) but nothing obviously breaks. Thanks!

Copy link
Owner

@SecKatie SecKatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thank you!

@SecKatie SecKatie merged commit 3f59ab2 into SecKatie:main Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants