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 and added entity toggles #607

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KyGuy2002
Copy link
Contributor

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 depend on changes made in SecKatie/wyzeapy#91

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.

@carverofchoice
Copy link

I can't tell you how excited I am to get some of these changes added!!!!! The floodlight pro updates are something I've been dying for since Wyze launched them. THANK YOU KyGuy2002 for figuring these out! This is EXTREMELY appreciated! I hope we get a new update with these in them soon!

@brg468
Copy link
Collaborator

brg468 commented Jun 15, 2024

@KyGuy2002 this is awesome, thank you for all this work! I’ll take a look and test the devices that I have soon.

@KyGuy2002
Copy link
Contributor Author

Thanks both of you! I am happy to help out :D

@mikefrantz
Copy link

I can toggle the Wyze notifications in the Home Assistant app and it does not turn on the alarm notifications in the Wyze app. I can do a reverse way turning the Wyze notifications on or off in the Wyze app and it does not affect the way the toggle is in the Home Assistant app either, I cannot automatically toggle the Wyze notifications through Home Assistant since about March or April.

@terryhonn
Copy link

I'm not a developer and am relatively git-ignorant.... is there a way that I can use the changes in this PR and it's dependent so that I can take advantage of these additional functions? I've got a few of the Floodlight v2 cams and would really like to be able to control the lights from HA. Thanks!

@KyGuy2002
Copy link
Contributor Author

I'm not a developer and am relatively git-ignorant.... is there a way that I can use the changes in this PR and it's dependent so that I can take advantage of these additional functions? I've got a few of the Floodlight v2 cams and would really like to be able to control the lights from HA. Thanks!

Unfortunately it's not super simple to do so. You would need to fork this repo, make some changes to directly reference the updated commits in the dependent library, and then uninstall the current wyze integration and add this one, which may cause you to loose your devices config (not sure).

I think these PRs should be merged so users can take advantage of all the changes, and we can work on the other issues mentioned here without holding up these changes.

@terryhonn
Copy link

I'm not a developer and am relatively git-ignorant.... is there a way that I can use the changes in this PR and it's dependent so that I can take advantage of these additional functions? I've got a few of the Floodlight v2 cams and would really like to be able to control the lights from HA. Thanks!

Unfortunately it's not super simple to do so. You would need to fork this repo, make some changes to directly reference the updated commits in the dependent library, and then uninstall the current wyze integration and add this one, which may cause you to loose your devices config (not sure).

I think these PRs should be merged so users can take advantage of all the changes, and we can work on the other issues mentioned here without holding up these changes.

Thanks for the quick response! I was able to copy the changes in the changed files in this PR and update those files in the HA custom_components/wyzeapi folder, but when I tried to do the same with the changed files in 91, I found that I couldn't locate those files in my installation.

I've managed also to fork this repo, so if there are steps outlined somewhere on how to make those changes to directly reference the updated commits in 91, I could give that a shot.

Thanks again for your responsiveness!

@brg468
Copy link
Collaborator

brg468 commented Jul 26, 2024

@terryhonn you can download the files for the dependency update (91) and just place the new wyzeapy folder from that directly in your config folder. HA will use that over what’s currently installed.

@mikefrantz
Copy link

Thanks for all your hard work and getting this working. I have never downloaded the dependency files. If you can point me or send me a link on how to get to them I’ll download them and get them put in and test it. Thanks again for all your help.

custom_components/wyzeapi/switch.py Outdated Show resolved Hide resolved
custom_components/wyzeapi/siren.py Show resolved Hide resolved
custom_components/wyzeapi/siren.py Outdated Show resolved Hide resolved
custom_components/wyzeapi/siren.py Show resolved Hide resolved
Reword comment to show only V1 Campan not having a siren

Signed-off-by: Brian Rogers <[email protected]>
brg468
brg468 previously approved these changes Sep 4, 2024
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 few devices I have. No issues. 👍

Will let @SecKatie take a final look before merging.

@brg468 brg468 linked an issue Sep 4, 2024 that may be closed by this pull request
@mikefrantz
Copy link

I’m just checking but is the global notification toggle in Home Assistant fixed with this version? So if I toggle it on or off, it will either put a line through the bell in the app or take it away?

@brg468
Copy link
Collaborator

brg468 commented Sep 4, 2024

@mikefrantz no the switch is still broken. It's unclear at this point if its fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Motion detection switches aren't working for doorbell Add support for Wyze OG Camera
5 participants