Wyze sense sensor integrations

Got my Wyze Sense starter kit today and easily integrated it into Home Assistant thanks to this awesome custom integration.

Setup was a breeze even without ever touching the Wyze app. I simply installed this integration through HACS, copied and pasted the config from Github, plugged the Wyze hub into the USB port on back of my RPi3B+ and restarted HA. Then called the wyzesense.scan service and pressed the pin on the device and it was added to HA immediately with the correct device_class: door and everything. Speed is absolutely instant.

One very small user experience suggestion I have is that maybe after the wyzesense.scan successfully adds a device, it could send a persistent_notification to Home Assistant? Something along the lines of “Successfully added a Wyze Contact sensor with entity ID: binary_sensor.wyzesense_7788b219” Just an idea.

Immediately ordered a bunch more once I saw how well this worked. Not only is the hardware a fraction of the price - you can’t beat $5 - but it’s also a fraction of the size of most everything else too. The door sensor is incredibly tiny, basically the size of a single piece of Starburst candy, means you can place it anywhere and it’ll be super discreet.

Great job @kevinvincent , looking forward to this eventually becoming a standard integration.

2 Likes

I’m glad the setup was smooth for you. Also good call on the persistent notification. I’ll add that in tomorrow :slight_smile:

1 Like

Nice…I’m tempting to replace my temperature diff between garage area and current temp to alert garage door is open and use these sensors instead.

Can’t wait for their water sensor!!!

@quattr0, water sensor?

@SeanM Persistent notifications for successes and failures of service calls have been added.

3 Likes

That was fast :slight_smile: Thank you. Just paired my motion sensor with it for the first time and it worked great, the notification was helpful!

One very minor thing is that the persistent notification said Sensor found and added as: binary_sensor.7789B9D4 yet the actual entity id was binary_sensor.wyzesense_7789b9d4 So basically it was missing the wyzesense_ prefix part.

@SeanM Well that’s weird. They show up as just binary_sensor.777b242c in entities for me. Can anyone else let me know how it shows up for them? It could just be mine (home assistant just restoring it to the same name as the first time it saw it, when I had an older version of the code).

Detect water leak fr water heater, freezer etc. I don’t think they have one out yet.

I only used this for the very first time on Friday night, and the two door sensors I added were also prefixed with “wyzesense”. I never paired them with the Wyze app first if that matters, just plugged the hub into the Pi and ran the scan service.

@MediaCowboy @quattr0 If you’re handy with electronics a diy water sensor like this is really easy to do with the contact sensors: https://www.youtube.com/watch?v=4uSBha_JngM

Could also solder on this water sensor on it instead of leaving the wires out like he does in the video.

1 Like

@kevinvincent, that’s a pretty simple solution. Maybe wyze will pick up on it.

So, I finally got some time last night to give this a go. I chose @kevinvincent “Home Assistant component based” method as it just looked like a simpler install.

I got a cup coffee, rolled my sleeves up, 3 minutes later the install was complete and my sensors populated. Very easy install! THANK YOU!!!

I am seeing a couple issues. Not all my sensor are triggering reliably. They definity triggered the first time as the device class was assigned but they don’t seem to be triggering now. The strange thing is others are hitting 100%.

Another problem, When I reboot my machine the sensors go offline and/or don’t update the state until I unplug the wyze hub and reinsert it. Then I have to manually mount it on the vm and restart HA. My current set up is a Ubuntu VM - Docker on a windows machine (VirtualBox).

Same here, it shows up as binary_sensor.77xxxx in the message under notification. I cloned the git rep yesterday.

My guess is you’re running through VB. I don’t have any issues you listed.

@Mattyb8562

The second problem at least sounds like a VM problem with the device not being mounted on reboot. You can check this by restarting the machine and then running ls /dev/hidraw* in the Ubuntu VM and seeing if anything shows up. If nothing shows up that means the vm is not automatically mounting it at boot.

The first problem is a bit interesting. Just to rule out signal strength issues can you try triggering them from near the usb dongle? There’s not really anything in the code that should lead to some sensors working well and others not.

If you’d like to debug this further, please follow the reporting an issue steps at the bottom of the Github README. That has instructions on how to enable debug logging and submit a report with that log as a Github issue. That will give me a pretty good idea of whats going on and if any errors are occuring with communicating with the hub.

2 Likes

Thanks for pointing me in the right direction! The sensors that don’t consistently trigger signal strength are in the 60’s while the others are high 90’s. I’ll move the server to more central location this evening and see what happens.

You’re correct. the hub isn’t being mounted when the vm boots. Its very rare the machine gets rebooted so that’s not a deal breaker either way. Thanks

update: All good here! Moving the server fixed the connection problem.

1 Like

Thank you for the work you did for this! It is a tremendous improvement over using the IFTTT integration. Responsiveness of the sensors is magnitudes better running this locally, as would be expected. I only wish I had checked back on this thread earlier. I saw it in it’s early stages and wasn’t aware how quickly you had come up with a solution.

I implemented @kevinvincent 's solution since it seemed straight forward on hass-io and the instructions were clear and worked well. The binary sensors seemed to use a different name ‘(binary_sensor.wyzesense_[mac address])’ which is easy enough to figure out and a good naming convention. I see this was pointed out by someone else in this thread as well. I had all of the sensors paired to the bridge already and just moved it from a Wyze cam to the USB on HA. I did have to reboot HA a few times before the sensors came back after the initial discovery and modifying the names away from the mac addresses to something more user friendly. I haven’t tested further reboots yet to see if that recurs.

I still plan on pushing for an official integration from Wyze as there a few things this solution doesn’t address like being able to use multiple bridges in different locations to access sensors that are too far away. Since the bridge is using USB locally I guess I would need to setup a second bridge on a pi with MQTT in the middle or something. It would also be good to have one integration for the motion sensing from the Wyze cams, sense product line, camera feeds, bulb control, and the upcoming switch outlets all through the network that HA is on.

Again, I am very impressed with the work done to make this happen and thank you all for the work you put in.

I would think that additional hubs could been set up with raspberry pi’s and the docker image with mqtt support.

@Mattyb8562 Great, im glad it was just an issue with auto mounting on startup and with the positioning of the server. In the future if you’d like to move the server and run a seperate pi in a more centralized location you can check out this method of integrating wyzesense using mqtt

1 Like

Hey @kevinvincent, I was playing around and looking at the attributes of the sensors and I think the signal strength is flipped. My motion sensor and my desk cabinet sensors are within maybe 4 feet of the hub but the strength, at least to me, looks like it is horrible. 0% being bad and 100% being good.