Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up failure - Will not recognize Wyze hub #91

Closed
clandestine-avocado opened this issue Jan 17, 2020 · 11 comments
Closed

Set up failure - Will not recognize Wyze hub #91

clandestine-avocado opened this issue Jan 17, 2020 · 11 comments

Comments

@clandestine-avocado
Copy link

Running HASSIO on Oracle VM; installed WyzeSense via HACS with no apparent issues. Files show up in the /config/custom_components folder

I had it set up a few weeks ago with no issues. VM crashed (unrelated issue) and I had to rebuild - and can't get WyzeSense to work now.

  • Error logs here: https://pastebin.com/gfNhGqXv
  • You will see three sets of logs; I changed the config three times for testing/logging purposes
  • Error log contains all three attempts, separate by comment blocks.
@kevinvincent
Copy link
Owner

kevinvincent commented Jan 19, 2020

Try changing "Auto" to "auto".

EDIT: Actually just kidding it should work either way. I'll continue taking a look.

@TimothyLeeAdams
Copy link

I'm having this exact same issue. Identical error logs and everything. I've been running this component for the past couple of months and it had been flawless up until yesterday. I'm running Home Assistant in Docker on an unRaid host. Have also tried all three of the following configs:

binary_sensor:
  - platform: wyzesense
    device: auto

binary_sensor:
  - platform: wyzesense
    device: "/dev/hidraw0"

binary_sensor:
  - platform: wyzesense
    device: "/dev/hidraw1"

Just to try and isolate the issue, I set up a fresh instance of Home Assistant with only HACS and WyzeSense component installed and am still having the same issue.

I updated to WYZESENSE v0.0.7 and Home Assistant 0.104.2 at the same time, so not sure it wasn't something that changed in Home Assistant that is causing the issue. I might try downgrading Home Assistant and/or WyzeSense versions to see if I can find a working combination and will report back here if I find anything.

@clandestine-avocado
Copy link
Author

Try changing "Auto" to "auto".

EDIT: Actually just kidding it should work either way. I'll continue taking a look.

I'll try anything at this point - tons of automations triggering off these sensors when I had them working a few weeks ago - appreciate you taking a look!

@kevinvincent
Copy link
Owner

Hmm so to me it looks like in all cases it’s unable to detect the dongle plugged into your host. Can you try sshing in (to both your host and the HA vm) and running ‘dmesg | grep hidraw‘ and post the output?

@TimothyLeeAdams
Copy link

I get the following output from my host:

root@Tower:~# dmesg | grep hidraw
[   10.524462] hidraw: raw HID events driver (C) Jiri Kosina
[   11.076451] hid-generic 0003:0764:0501.0001: hiddev96,hidraw0: USB HID v1.10 Device [CPS  CP 1500C] on usb-0000:00:14.0-10/input0
root@Tower:~# 

I'm not able to execute dmesg inside the docker shell, I don't think it's installed. Output result:

root@Tower:~# docker exec -it home-assistant-DEBUG-0.103.6 /bin/bash
bash-5.0# ls
automations.yaml      deps                  home-assistant_v2.db  secrets.yaml
configuration.yaml    groups.yaml           scenes.yaml           tts
custom_components     home-assistant.log    scripts.yaml
bash-5.0# dmesg | grep hidraw
dmesg: klogctl: Operation not permitted
bash-5.0# 

I do still have the USB device passed through to my docker instance, just as it was previously when it was working.

@clandestine-avocado
Copy link
Author

Hmm so to me it looks like in all cases it’s unable to detect the dongle plugged into your host. Can you try sshing in (to both your host and the HA vm) and running ‘dmesg | grep hidraw‘ and post the output?

I have a remote desktop connection with the host (Windows 10) and it's running a VM (Ubuntu with the Hassio VDI) on that host - I don't know how to SSH into the HA VM (haven't needed to up to this point), but I CAN get to the Hassio CLI thru the VM. But the available commands are pretty limited.

image

@TimothyLeeAdams
Copy link

Ahhh sorry, I didn't have the Wyze dongle plugged in when I ran that command. Here is the output of 'dmesg | grep hidraw' with it plugged in:

root@Tower:~# dmesg | grep hidraw
[   10.524462] hidraw: raw HID events driver (C) Jiri Kosina
[   11.076451] hid-generic 0003:0764:0501.0001: hiddev96,hidraw0: USB HID v1.10 Device [CPS  CP 1500C] on usb-0000:00:14.0-10/input0
[ 3054.856442] hid-generic 0003:1A86:E024.0002: hiddev97,hidraw1: USB HID v1.00 Device [HID 1a86:e024] on usb-0000:00:14.0-11/input0
root@Tower:~# 

@TimothyLeeAdams
Copy link

Okay, I think I've figured out what happened with my system. It seems that my Wyze USB receiver changed from /dev/hidraw0 to /dev/hidraw1, probably after I rebooted my server. Not sure WHY that happened, but it has. I apologize for not figuring that out before posting. In summary, what I did to get it working again (on latest version of Home Assistant and WyzeSense 0.0.7) was to change the passthough device for my docker instance to dev/hidraw1, and change my config to:

binary_sensor:
  - platform: wyzesense
    device: "/dev/hidraw1"

Unfortunately, this probably doesn't help with @ha14937 's problem, but I'm happy to help test further if needed.

@kevinvincent
Copy link
Owner

kevinvincent commented Jan 19, 2020

@TimothyLeeAdams It may periodically switch hidraw numbers on restart. The most bulletproof solution is to use the method described in this issue to give it a permanent /dev/ name and pass it into docker: #66

After that you can just set it to auto (or use the permanent /dev/ name) and it should work fine.

@ha14937 I'll continue trying to figure out whats going on with yours.

@clandestine-avocado
Copy link
Author

@kevinvincent: I'm embarrassed to say I figured it out. I messed up the USB pass through on the VM - which I swear I double checked. Anyway, I got it working; apologies for wasting your time!

@kevinvincent
Copy link
Owner

@ha14937 No worries! There are so many small details getting devices like this passed through. Beware that the hidraw device number may change across restarts and if you have it hardcoded I recommend following the steps in #66 to fix the /dev/ name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants