ha-wyzeapi icon indicating copy to clipboard operation
ha-wyzeapi copied to clipboard

Fixed and added entity toggles

Open KyGuy2002 opened this issue 1 year ago • 9 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 depend on changes made in https://github.com/SecKatie/wyzeapy/pull/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.

KyGuy2002 avatar Jun 15 '24 05:06 KyGuy2002

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!

carverofchoice avatar Jun 15 '24 06:06 carverofchoice

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

brg468 avatar Jun 15 '24 12:06 brg468

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

KyGuy2002 avatar Jun 15 '24 17:06 KyGuy2002

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.

mikefrantz avatar Jul 22 '24 20:07 mikefrantz

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!

terryhonn avatar Jul 25 '24 16:07 terryhonn

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.

KyGuy2002 avatar Jul 25 '24 16:07 KyGuy2002

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!

terryhonn avatar Jul 25 '24 16:07 terryhonn

@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.

brg468 avatar Jul 26 '24 15:07 brg468

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.

mikefrantz avatar Jul 26 '24 16:07 mikefrantz

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?

mikefrantz avatar Sep 04 '24 20:09 mikefrantz

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

brg468 avatar Sep 04 '24 20:09 brg468