kevinvincent / ha-wyzesense

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

hidraw device not created after reboot without physically re-plugging the wyze hub #77

Closed scottfuhrman closed 4 years ago

scottfuhrman commented 4 years ago

Anyone else having this issue? I don't believe it is directly related to this project, but if I reboot my computer with the Wyze hub plugged in, when it comes back up there is not a /dev/hidrawX device created. If I unplug the Wyze hub then plug it back in, the device is created.

This means if my HA server reboots, I physically have to replug the device, then restart HA again to get the Wyze sensors functional. If anyone has experienced this or has a solution I'd love to hear about it.

bschatzow commented 4 years ago

I have never had this issue. I have done several updates to my Hassio installation which a reboot was needed ( the latest was yesterday for a a HACS update). The Wyze components have always worked.

scottfuhrman commented 4 years ago

Thanks, wonder if it is something unique to my hardware (Supermicro E300-8D).

scottfuhrman commented 4 years ago

BTW I found the solution to my problem. Putting this here in case someone else runs into the same issue.

Environment:

Symptoms:

Solution:

Put the following line in /etc/modprobe.d/options (and reboot to test)

options usbcore use_both_schemes=y

Reasoning: Key is the -71 error when doing a read/64 to the device. Maybe Debian has a different default than others for usbcore? Dunno, but it works now.

Reference & credit to these guys: See detailed explanation: https://www.spinics.net/lists/usb/msg02644.html Also credit to https://urukrama.wordpress.com/2009/01/27/usb-drive-not-recognised-error-71/