kevinvincent / ha-wyzesense

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

TimeoutError DoCommand #72

Open martyouel opened 4 years ago

martyouel commented 4 years ago

Hi,

Hassio running in docker on UBuntu 18.04 host in an ESXI environment. HomeAssistant version 0.102.3 Wyze Sense Component version 0.0.6

The hub is correctly connect to the Ubuntu host and the light on the hub is blue. I confirmed that the hub is detected as hidraw1 so here's my configuration.

binary_sensor:

and

Here's the log : https://pastebin.com/8xSViNjr

Hope you can help thanks for your work

genem2 commented 4 years ago

Same exact issue, all of a sudden. Wonder what changed. Hope this is fixable; really miss my motion automations. Tnx.

HA: 0.102.3

Here's the log : https://pastebin.com/2A2QDadL

genem2 commented 4 years ago

Wonder what changed.

Ok, I think I know! After review the log I posted above, I thought it strange that it reported: 4 sensors reported, waiting for each one Um, I only have three that I know of.

Reading elsewhere that these pairings are stored in the Wyse Sensor Bridge, I wondered if mine needed a reset (hold the button for 8 seconds, the Blue LED turns Yellow). After getting out a ladder to re-register each sensor, it appears all is fixed. No log error, all sensors are alive-and-well after a restart.

The other day I removed a reed-switch from one of the sensors to hardwire it to a better reed-switch. When done, it registered with MAC 00000000. After fixing that, I suspect the bridge was remembering that bogus entry.

@martyouel You might check as well; I see your log is reporting 4 sensors as well. @kevinvincent You might look at dealing with the condition that the hub might be lying to you. Maybe if you get timeouts, you can consider non-reported devices as bogus.

martyouel commented 4 years ago

Yup i discovered the same thing. 4 sensors found even if I have only 3. So the timeout occurs on the fourth one because it do not exists. So I edited the python script to force a « -1 » to the count of discovered sensors and voila all works good now.

mattyb8562 commented 4 years ago

The fix for this was updated in the git 4 days ago. You'll need the new binary_sensor.py file.

kevinvincent commented 4 years ago

Hi all. Please update to the latest 0.0.7 through HACS or the master branch.

You'll also need to set the device to "auto" instead of "/dev/hidraw1"

CorneliousJD commented 4 years ago

The other day I removed a reed-switch from one of the sensors to hardwire it to a better reed-switch. When done, it registered with MAC 00000000. After fixing that, I suspect the bridge was remembering that bogus entry.

Sorry to necro an old thread but this is still listed as an openi ssue. How did you fix it registering with MAC 00000000 as this seems to be an on-going problem and I have multiple sensors that are doing it (well I broke one trying to fix it so now I only have one) but just invested more money into these sensors and would like to keep using them long-term without the fear of it showing w/ a 00000000 MAC after the battery dies.

genem2 commented 4 years ago

I think I resolved this by simply inserting a fresh battery, and in Home Assistant, started the service: wyzesense.scan. Per the doc: Call this service and then within 30 seconds, insert a pin into the hole on the side of a sensor and push until the red led flashes three times. The sensor will now be bound and show up in your entities. You should also see a notification in the HA left side-bar. At worst, maybe I had to manually remove the old MAC 00000000 entry in the HA /config/entities page, but I'm not recalling.

CorneliousJD commented 4 years ago

Interesting, I was not able, after multiple fresh batteries, to get an older sensor working again, it always shows up w/ 00000000 MAC. Odd.