Hi all, I'm unable to maintain this component anymore due to time constraints. Unfortunately, there is a fatal issue with these sensors that has appeared over the year. They can die permanently if the battery gets too low, https://twitter.com/WyzeCam/status/1321147804610252800. Wyze is no longer selling wyze sense v1. If and when new sensors come out, I will try to create a component for those. Apologies to all who have bought these sensors, it seems like the sensors themselves are flawed, leading to a ton of issues after a year, and this component can't do much about it.
I recommend upvoting this thread on the wyze forums so that wyze knows we want an official wyzesense integration: https://forums.wyzecam.com/t/home-assistant-integration/3971
Special thanks to HcLX and his work on WyzeSensePy which is the core of this component. His reverse engineering talents and development of WyzeSensePy made it quite easy to connect with WYZE sense devices.
Are you a visual person? Here's a video walkthrough of the setup and configuration. Check this README for the most up to date information.
WARNING: This component does not work on Mac OSX, Synology DSM, or other OSs that don't have hidraw drivers.
https://github.com/kevinvincent/ha-wyzesense
as a custom repository as Type: Integration/custom_components/wyzesense
to your <config_dir>/custom_components/
directory
custom_components
folder if it does not exist/config/custom_components/wyzesense
/home/homeassistant/.homeassistant/custom_components/wyzesense
Add the following to your configuration file and restart Home Assistant to load the configuration
The custom_component will use the contents of /sys/class/hidraw
to determine which hidraw
device is the Wyze receiver dongle.
binary_sensor:
- platform: wyzesense
device: auto
You can also optionally specify the hidraw device to use:
binary_sensor:
- platform: wyzesense
device: "/dev/hidraw0"
Most likely your device will be mounted to /dev/hidraw0
. You can confirm the hidraw name of the device by running dmesg | grep hidraw
to find out what hidraw number the bridge grabbed. Be aware that sometimes on restarts the hidraw device number will change. You can permanently fix the name (ex. as '/dev/wyzesense' in order to passthrough in Docker) by following the simple steps in this comment
By default, the component will restore the last state of the entity prior to a restart. If sensors change state during a restart, the change may not be reflected in HA. In order to combat this you can optionally specify an initial_state for sensors (by mac address) that will be set upon a restart. Be sure to put quotes around "on" or "off" so that they are strings not booleans.
binary_sensor:
- platform: wyzesense
device: "/dev/hidraw0"
initial_state:
77793176: "on"
77793193: "off"
Call the services below to add and remove sensors from your WYZE Sense hub.
If you have already bound sensors to the hub (for example using the Wyze Cam and Wyze App), they will be automatically added when the sensor is first triggered.
Entities will show up as binary_sensor.wyzesense_<MAC>
for example (binary_sensor.wyzesense_777A4656
).
Notes on Individual Sensors
on
: Motion Detectedoff
: No Motion Detectedon
state for 40 seconds after the last motion is detected. This is non configurable, but in practice it isn't a big deal and usually makes automations simpler.on
: Sensor openoff
: Sensor closedoff
when the magnetized portion is within ~1 inch of the door sensor body.Notes on selected Sensor Attributes:
rssi
: This stands for received signal strength indicator. Higher values (closer to 0) mean a stronger signal.battery_level
: The sensor does a basic calculation with the battery voltage. Because of this, battery percentage may be higher than 100% when you first get a sensor. Enjoy the longer battery life :)For all services a persistent notification will be sent for both successes and failures.
wyzesense.scan
wyzesense.remove
777A4656
). You can find this in the entity's attributes in the developer section. Needs to be entered in this format mac: xxxxxxxx an example mac: 777A4656/etc/udev/rules.d/99-com.rules
on your machine and insert KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666"
logger:
default: info
logs:
custom_components.wyzesense: debug
wyzesense.gateway: debug
/<config_dir>/home-assistant.log