kevinvincent / ha-wyzesense

A Home Assistant Component to interface with the WYZE Sense hub and sensor system
369 stars 100 forks source link

Add support for the Wyze Sense v2 Door and Motion Sensors #211

Closed skilau closed 3 years ago

skilau commented 3 years ago

This commit adds support for both, the Wyze Sense v2 Door sensor and the v2 Motion sensor products.

Yes, both v2 sensors works with the existing USB dongle!

Someone mentioned this in the AMA Reddit thread a few days ago, so I ordered a pack of 3 door sensors, to see if I could get them into the Home Assistant driver. As you can tell, it is trivial to do.

This driver should now have some new life, as long as we continue to keep our USB dongles. The fatal MAC/battery issue on the v1's should not be present on the v2's.

zheroz00 commented 3 years ago

This commit adds support for Wyze Sense - Door sensor v2.

Yes, the v2 sensor works with the existing USB dongle!

Someone mentioned this in the AMA Reddit thread a few days ago, so I ordered a pack of 3 door sensors, to see if I could get them into the Home Assistant driver. As you can tell, it is trivial to do.

NOTE: I did NOT buy one of the Motion Sensors (v2), so I can't verify those will work as well, but my guess would be, is that they will work with a minor addition like we see in this patch.

This driver should now have some new life, as long as we continue to keep our USB dongles. The fatal MAC/battery issue on the v1's should not be present on the v2's.

Any chance you could let me know how to update my existing add-on to this version? I have some v2 sensors I'd like to configure. I tried running the scan and it detects it and provides an entity ID, but it does not seem to be showing up in HA anywhere. Thanks for your work.

skilau commented 3 years ago

Any chance you could let me know how to update my existing add-on to this version? I have some v2 sensors I'd like to configure. I tried running the scan and it detects it and provides an entity ID, but it does not seem to be showing up in HA anywhere. Thanks for your work.

Until this gets merged, you can either fork my (forked) repo, or if you would like, you can just edit the file on your system directly. The patch is extremely small, so putting it in my hand is pretty easy.

You would need to go to your local file: \YOUR_LOCAL_HA_IP\config\custom_components\wyzesense

And edit "wyzesense_custom.py"

Go to about line 258, which will look like: if alarm_data[0] == 0x01: Change it to: if alarm_data[0] == 0x01 or alarm_data[0] == 0x0E:

Save it, and reboot.

When back up, do the "scan" again. This time it should be brought in, and should show up in your "Configuration -> Entities".

PS: I ordered a v2 motion sensor that should arrive here in a couple days. I will submit another pull request to add support for that one as well, assuming it plays nice with the existing driver.

zheroz00 commented 3 years ago

Change it to: if alarm_data[0] == 0x01 or alarm_data[0] == 0x0E:

This worked after changing it to 0x0E: Thanks!

The first sensor I tried was before the update you provided and it still will not show up. The other new ones I had not tried do though. Is the first one saved somewhere that I can delete and retry? Thanks again.

dorgan commented 3 years ago

This is amazing!! Just ordered 4 motion sensors to replace the failing v1 motion sensors I have