kevinvincent / ha-wyzesense

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

HA WyzeSense stopped working #153

Open DesertDwellerEv opened 4 years ago

DesertDwellerEv commented 4 years ago

Update to latest Home Assistant 0.111.4 and get the following: Log Details (ERROR) Logger: custom_components.wyzesense.wyzesense_custom Source: helpers/entity.py:426 Integration: wyzesense (documentation) First occurred: June 23, 2020, 7:44:58 AM (1 occurrences) Last logged: June 23, 2020, 7:44:58 AM

Ignoring non-OSError in worker thread. Please share the error logs with the developers. Traceback (most recent call last): File "/config/custom_components/wyzesense/wyzesense_custom.py", line 371, in _Worker self._HandlePacket(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 344, in _HandlePacket handler(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 269, in _OnSensorAlarm self.__on_event(self, e) File "/config/custom_components/wyzesense/binary_sensor.py", line 110, in on_event entities[event.MAC].schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 426, in schedule_update_ha_state self.hass.add_job(self.async_update_ha_state(force_refresh)) AttributeError: 'NoneType' object has no attribute 'add_job'

RoldyBuffalo commented 4 years ago
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

Interesting, mine won't reinstall after a failure, enabling logs now. I'll compare to mine.

sasanasit commented 4 years ago

I’m getting the same error

desertblade commented 4 years ago

I am getting a similar error on 0.112 on startup

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 416, in schedule_update_ha_state assert self.hass is not None

Believe its due to the new faster loading the components are not ready.

Here is a work around:

  1. Wait till Home Assistant is fully loaded
  2. Goto Developer Tools->Services
  3. Call wyzesense.scan

Sensors are now reporting. Probably need to add a delay on startup or something.

seayworld commented 4 years ago

Your work around did the trick. After a scan all devices resumed reporting.

Hopefully an easy fix in the initialization code.

DesertDwellerEv commented 4 years ago

Clean restart. Waited for UI to catch up. Ran Wyze Scan service Still not working. Do I have to put Wyze sensors in pairing mode?

On Fri, Jul 3, 2020, 12:49 PM Ben Williams notifications@github.com wrote:

I am getting a similar error on 0.112 on startup

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 416, in schedule_update_ha_state assert self.hass is not None

Believe its due to the new faster loading the components are not ready.

Here is a work around:

  1. Wait till Home Assistant is fully loaded
  2. Goto Developer Tools->Services
  3. Call wyzesense.scan

Sensors are now reporting. Probably need to add a delay on startup or something.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kevinvincent/ha-wyzesense/issues/153#issuecomment-653662899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2ZDBAZ5LKQAOATHE2U6BLRZYY4LANCNFSM4OG3S27Q .

desertblade commented 4 years ago

Maybe you have a different issue. I did not have to repair the devices, kicking off the scan restarted the service. When I fired off the rescan my home assistant was up for at least 30 minutes.

DesertDwellerEv commented 4 years ago

Bounced it one more time. Scan again. Then activated each sensor. They're now working. Thanks

On Fri, Jul 3, 2020, 3:46 PM Ben Williams notifications@github.com wrote:

Maybe you have a different issue. I did not have to repair the devices, kicking off the scan restarted the service. When I fired off the rescan my home assistant was up for at least 30 minutes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kevinvincent/ha-wyzesense/issues/153#issuecomment-653690887, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2ZDBHD2IGHIISDOG5ADNLRZZNTTANCNFSM4OG3S27Q .

desertblade commented 4 years ago

I have had 2 upgrades (currently 0.112.3) and 1 restart, each time the WYZE sensors are working fine.

DesertDwellerEv commented 4 years ago

Yeah, seems to be working fine now.

On Tue, Jul 7, 2020 at 10:30 AM Ben Williams notifications@github.com wrote:

I have had 2 upgrades (currently 0.112.3) and 1 restart, each time the WYZE sensors are working fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kevinvincent/ha-wyzesense/issues/153#issuecomment-655013681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2ZDBB5FGSUPDACAGJPY3LR2NLTTANCNFSM4OG3S27Q .