Wyze sense sensor integrations

For what to work?

There might be a way to trick it, but as far as I know it is an “accessory” and it doesnt connect directly to Wi-Fi, because it will use too much battery power, so there is a thing that plugs into the USB port on the Wyze Cam, uses wifi from the camera, and it communicated to the wyze sensors like that: https://youtu.be/rlp5f5jJPSk?t=140
They probably couldve done this a different way but they want us to buy wyze cams, lol. It should work with wyze cam sense too.

You should read the rest of this thread.

Apparently the USB communication of the wyze sense accessory to the wyze cam was reverse engineered and encapsulated in a python API. Thus, this HA tool simply requires the wyze sense receiver to be plugged into the USB on the raspberry PI. No camera required.

I’ve been following this thread with great interest because the cloud component disqualified wyze sense for me. This project fixes everything and my wyze sense should get here in a few days.

1 Like

Wow, Thanks, Now i can finally buy some lol

@sobachatina & @shanem, I am curnetly running this setup without an issue. I will attach a picture of my hub and a screen shot of my sensor’s. I do have a wyze camera that uses the rstp stream for home assistant but the fact the hub works without is awesome.

Wyze

@kevinvincent & @dariopb, thank both you for your hard work on getting this integrated into home assistant. I know you will pass the buck to the ones that reverse engineered the code but you gave us the bridge to the library.

3 Likes

HOW TO INTEGRATE WYZE SENSE WITH HOME ASSISTANT
For anyone just getting to this thread I’d like to summarize the work that has been done and the solutions available. There are now 2 ways of connecting Home Assistant with WYZE Sense. Both work without the camera, just the WYZE sense kit.

  1. https://github.com/dariopb/ha-gosenseapp (Docker and MQTT based)
  2. https://github.com/kevinvincent/ha-wyzesense (Home Assistant component based)

Just click through to the links above and follow their respective instructions!

You can purchase the necessary sensors to get started here: https://www.wyze.com/wyze-sense/
Be sure to get the starter kit first so you have the USB hub device. You can then add on individual sensor packs. They are insanely affordable (max $6 each) and their speed and performance are stellar.

19 Likes

@kevinvincent, this isn’t a issue as zwave has the same problem. Is there a way to store the last know state besides using the recorder component?

@MediaCowboy Theres a couple ways of doing it I think (that or pickle to store some state on the filesystem). I want to store the full last state (including device type). Gonna work on that later today. (Good reason to install using HACS for those sweet sweet updates).

@kevinvincent, HACS integration is being installed as I type this.

1 Like

How is the range from the Hub on those things?

I haven’t done must testing there as Im in a small studio but there’s some threads about that on the wyze forumns. Here’s a handful but there may be more:

To summarize, according to wyze a standard house should only need one. If that doesn’t work for you you could use ha-gosenseapp (linked above) and have multiple raspberry pi’s around with multiple hubs. They would all publish to the same mqtt server.





2 Likes

thanks for the links, I am planning on putting one like 750 feet away, maybe I’ll use some kind of wireless usb extenstion thing if needed.

@MediaCowboy Entity state restoring has been added. Just update with hacs. I’m not certain on this but you may have to restart twice when upgrading (first to load the new code that saves states, then mess with sensors, leave one open etc, then restart the second time to see that restoring works). Internally it uses the recorder. Check the github page for how to selectively disable restoring for certain sensors (by setting an inital_state) if you’d like to do that also.

I had been away for a few days and just had a chance to install this. It works great! Thanks for your efforts and continuing to push on this. Game changer :grinning:

1 Like

This seems great, thanks for making it.

My starter kit should be arriving today and I have a question on how exactly this works. Directions seem easy enough, plug it directly into the USB port on my Raspberry Pi. But this means the sensors wouldn’t also work in the Wyze app (which requires it to be plugged into a WyzeCam). Am I correct in this assessment?

Is there a way to have it work in both? Maybe connect the hub to a Wyze camera initially and pair all the devices, then plug the hub into my Pi instead?

@kevinvincent, looks like your new code does what I was wanting. I even noticed that before the reboot motion was detected. After the reboot, which took a couple seconds, motion came back clear. Perfect.

Unfortunately there’s no way of making it work with both. Only the device that has the hub plugged in will be able to communicate with the sensor.

Now I wonder if its possible to pair a sensor to two hubs… thats definitely a thought haha.

1 Like

Great! Yeah most of the time restarts don’t take very long (the component starts up way before the UI has reconnected) so you usually won’t miss sensor events. Im glad it does what you were wanting :slight_smile:

1 Like

Guys, you can vote on home assistant first party support here: http://bit.ly/2LYu8ML

1 Like

Okay everyone these are simple automation’s but they work thanks to this component.

- alias: Refrigerator   
  trigger:
    platform: state
    entity_id: binary_sensor.77787a2b
    to: 'on'
    for: '00:05:00'
  action:
    - service: notify.sms
      data:
        message: "Warning! The Refrigerator Is Open. Warning!"
        target:
          - !secret kevins_cell
    - service: notify.ios_leisas_iphone
      data:
        title: "Home Assistant"
        message: "Warning! The Refrigerator Is Open. Warning!"

This is because my kids have a habit of not getting the refrigerator door shut all the way.

- alias: Desk Cabinet   
  trigger:
    platform: state
    entity_id: binary_sensor.7778793f
    from: 'off'
    to: 'on'
  condition:
    condition: template
    value_template: "{{ not is_state('person.kevin', 'home') }}"
  action:
    service: notify.sms
    data:
      message: 'Your Desk Cabinet Is Open And Your Not Home'
      target:
        - !secret kevins_cell

This is one for my desk cabinet where I keep important documents.

This component and these cheap sensors are awesome. I am already looking at buying more contact sensors. Now to figure something out with the motion.

1 Like