Wyze sense sensor integrations

@thychubbz
I am using the gosense docker container. I use the following sensor to pull battery data from MQTT.

---

# Batteries
sensor:

  - platform: mqtt
    name: "Fridge Battery Level"
    state_topic: "gosense/7778F8F3"
    device_class: battery
    value_template: "{{ value_json.properties.battery }}"

Works perfectly

For battery and signal levels I’ve been using Node red. Just pulling both from the attributes and displaying on a dashboard for now but will set up an alert when I get a chance. Did have an issue this morning with sensors not showing up after update of hassio to the latest rev but they showed up again after 4 reboots.
Also having an issue with a Wyze motion sensor not sending any ‘on’ signal for the last few days, it shows as connected in node red but no state changes.

Were you eventually able to figure it out? If so I’d be curious what you had to end up doing.

Still cannot get wyzesense to install without errors. The sensors are working and visible in HA, but log shows errors setting up wyzesense. I do not get the integration of wyzesense.scan or remove in services. It worked on intitial install, but even on new install still no joy. The bridge has to be removed and paired with the sensors, then reinstalled on my system. HA will recognize them once they are activated. But I miss the ease of just doing a scan to add a new sensor.

*** Just done a complete reinstall of Hassio, on a another Pi 3B+, nothing but samba and ssh installed. Manually installed wyzesense into custom_components. Same error, bridge works, but no wyzesense.scan or wyzesense.remove. Error on setup of wyzesense. I’m at a loss

Having the same problem as many here with the sensor not working. I believe my issues is that the hidraw is changing or not initialize properly on my server (unraid HA docker). I’ve passed it through as hidraw0 but that may have changed after a reboot because my sensors aren’t working now when they where before.

Had to put on hold for the time being. Hopefully getting back on it in the next week or two. Will keep community posted if I find anything!

Which HA version? I’m on 0.96.5 and I cloned wyzesense on August 6th and it’s working fine. I have added another two more door sensors and a motion sensor.

You will need to provide more error than “Error on setup of wyzesense”.

Do you see similar line in /var/log/syslog when starting/booting Pi up?

Sep  2 16:43:09 raspberrypi kernel: [    2.708175] hid-generic 0003:1A86:E024.0001: hiddev96,hidraw0: USB HID v1.00 Device [HID 1a86:e024] on usb-3f980000.usb-1.5/input0

So random question… im guessing these wouldnt work witha zwave hub instead of the wyze supplied one. Both in the 900ish mhz and i was just wanting to not have another hub so similar

Seeing some strange behavior during the setup of this component and I’m unsure whether this is a user problem or an actual issue.

After installing the component via HACS but prior to a reboot, I was getting this error.

2019-09-04 15:38:08 ERROR (MainThread) [homeassistant.components.homeassistant] Platform error binary_sensor.wyzesense - No module named 'retry'

This prevented me from restarting HA via the UI. I added the binary sensor declaration to configuration.yaml and then restarted my VM. Upon reboot, I found this error in the logs.

2019-09-04 15:39:56 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform wyzesense
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/wyzesense/binary_sensor.py", line 82, in setup_platform
    ws = beginConn()
  File "</srv/homeassistant/lib/python3.6/site-packages/decorator.py:decorator-gen-2>", line 2, in beginConn
  File "/srv/homeassistant/lib/python3.6/site-packages/retry/api.py", line 74, in retry_decorator
    logger)
  File "/srv/homeassistant/lib/python3.6/site-packages/retry/api.py", line 33, in __retry_internal
    return f()
  File "/home/homeassistant/.homeassistant/custom_components/wyzesense/binary_sensor.py", line 80, in beginConn
    return Open(config[CONF_DEVICE], on_event)
  File "/home/homeassistant/.homeassistant/custom_components/wyzesense/wyzesense_custom.py", line 561, in Open
    return Dongle(device, event_handler)
  File "/home/homeassistant/.homeassistant/custom_components/wyzesense/wyzesense_custom.py", line 285, in __init__
    self.__fd = os.open(device, os.O_RDWR | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/hidraw1'

I have yet to associate any sensors with the bridge as I wanted to ensure I set up the component correctly before moving forward. Thoughts?

HA 0.98.3 running as a venv on an Ubuntu 18.04 VM via ESXi 6.0.

Replying to my own post - I missed the tidbit on the github page that solves the Permission Error above.

EDIT: It’s also worth noting that a system reboot may be required if implementing the 99-rules.com fix.

@daphatty @kevinvincent
Thanks for the excellent add-on - I just got my starter kit and got the sensor connected in no time. Some observations…

  1. My sensor is right next to the bridge (with extension usb cable) and my rssi is apprx -49 to -62; not sure why it’s not at a higher number.
  2. I was trying to pair the cam with the hub but it will not connect; does this mean I have to get another bridge just for wifi connectivity?

Would appreciate someone’s experience with a cam(s) setup/config.

Thanks

1 - While I’m not an expert on RSSI, I do know that a lot of factors go into signal strength, many of which have nothing to do with proximity to the hub. Google around and see if you can make heads or tails of it.

2 - I don’t believe the Camera is supported by the Wyzesense component. In fact, the Hub is supposed to plug in to the back of the Camera by design. The hub itself does not use Wifi for communicating with the Motion and Door sensor but rather a proprietary solution that runs on (IIRC) the 900Mhz band.

@ Mattyb8562
I think our problems are the same. If you look on the VirtualBox machine screen you will probably see the USB driver switching from “hiddev96/hidraw0” to “hiddev96/hidraw1” after each reboot.
My setup is Hassio on VirtualBox running on Windows10 (Core I5 @ 3Ghz, with 16 GB of DDR4).
That is what mine does. It regularly switches back and forth from “hiddev96/hidraw0” to “hiddev96/hidraw1”.
As I’m more of a Windows guy and I am not as good with linux yet. So I haven’t been successful in forcing the usb drive to stay put yet. So I ended up putting back into the Cam… for now any way.

What I found is after the VM boots up, plug in the hub and restart HA, it lands on hidraw1 every time. I only have to do this after a complete server reboot. I have a pretty solid battery backup so its very rare for the server to restart. The occasional updates or maintenance.

thanks I will try.

Anyone got this to working on Proxmox on a NUC yet? I can add the USB’s without any issues like I did with the Conbee II which worked great. When you add the WyzeSense it does not seem to detect it in the selection part. Just curious if anyone else has gotten it to work and how did they do it. Thanks

I have it running under ProxMox…not a NUC, but on a small form factor windows PC with an i5 processor. I am running both a TI CC2531 for Zigbee2MQTT, and the USB for the Wyze. I followed the direction exactly to get it to work.

Under ProxMox…I have the two USB devices. One says host=3-2, usb3=1 for the WYZE (Device 1a86:e024) but no label for Manufacturer or Product…they are blank for the WYZE device. The other one says host=0451:16a8 for the TI Device.

Under Home Assistant, My Host System Hardware says: /dev/ttyACM0 for the port for the Wyze.

My Configuration says:
hacs:
token: xxxxxxxxxxxxxxxxxxxxxxxxxx (my token number)

binary_sensor:

  • platform: wyzesense
    device: “/dev/hidraw1”

On my Community Store, I have the Wyze Sense Component version 0.0.5 and it is green.

Let me know what I can do to help you troubleshoot.

1 Like

Ok thanks I saw the same thing but was not 100% sure that was it under Host System Hardware.

Does anyone else have the issue where the sensor will be detected and put in the “On” state and never turn off?.

I constantly have the issue with my door sensors that say they are open, and they never close, and motion sensors detect motion and never turn off. or just don’t work at all.

I run HA on a VM, which is on a Windows machine. as of right now HA is version 99.2, and wyze sense is 0.0.5 I believe
Thanks.

I have now been thinking of going to the way of Gosensapp and reusing my Pi, and trying it that way, but I would need a good write up or video to know what I am doing.

This was happening to me on a few sensors. They had a poor connection to the hub. Moving the hub to a more central location in my house resolved the issue.