Open atechnical opened 4 years ago
I'm having the same error, although in my case the errors stop working until a restart the docker container from the docker daemon (vs. restarting home-assistant from inside the container)
I'm having the same error. I'm running HA on a Virtual Box VM. I've restarted HA from the UI as well as restarted the VM, but cannot get these sensors started again.
EDIT: Looks like @PierreScerri is having the same issue in #145
Same issue here. I'm running wyzesense on HA Core via Docker on Unraid. Tried restarting the docker container and still receive the error. Not sure what is causing the error but I just tried to add a sensor. HA notification said it was added but I don't see it in entities and I have this error in my logs:
Just got same error today.
Logger: custom_components.wyzesense.wyzesense_custom
Source: helpers/entity.py:407
Integration: wyzesense (documentation)
First occurred: 11:25:12 PM (1 occurrences)
Last logged: 11:25:12 PM
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 373, in _Worker
self._HandlePacket(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 346, in _HandlePacket
handler(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 271, 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 407, in schedule_update_ha_state
assert self.hass is not None
AssertionError
I have it too - I'm running on HA v0.114.4 on HassOS. My sensors are not working in my HA automations, neither through native HA or Node-Red.
ERROR (Thread-3) [custom_components.wyzesense.wyzesense_custom] 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 373, in _Worker self._HandlePacket(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 346, in _HandlePacket handler(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 271, 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 407, in schedule_update_ha_state assert self.hass is not None AssertionError
Same here.
[custom_components.wyzesense.wyzesense_custom] 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 373, in _Worker
self._HandlePacket(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 346, in _HandlePacket
handler(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 271, 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 422, in schedule_update_ha_state
assert self.hass is not None
Okay, I have a small update here.
I was able to get both my motion and door sensors working again by doing the following steps. Granted - this is a possible temporary fix.
Remove all sensors from your integration. I did this by adding the debug logging into the script, adding a few lines of code to see which MACs were registered, and removed them using wyzesense.remove
. The logging config can be found in README.md
, code is attached.
Replace the binary_sensor.py code with the attached file
Restart to reload the debug logging config and the new .py file
setup_platform
function; on_event
's parent._I readded all my sensors using wyzesense.scan
and it seemed to work, I'm able to use my sensors in automations again.
I'm not 100% sure if this will fix it long term, however I'll keep you updated.
This just happened to me as well.
Traceback (most recent call last):
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 373, in _Worker
self._HandlePacket(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 346, in _HandlePacket
handler(pkt)
File "/config/custom_components/wyzesense/wyzesense_custom.py", line 271, 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 422, in schedule_update_ha_state
assert self.hass is not None
AssertionError
I just had this happen to me on HA 0.115.5, ha-wyzesense 0.0.9 All sensors went unresponsive, a service scan did not fix the issue (but for some reason did reset the state of some sensors). I unplugged the dongle and restarted the VM twice to fix the issue - error gone and all sensors back. First time having any issue with any sensor or the integration.
Same here, had this integration running flawless for months, and I got this issue just now on HA 0.116.2, wyzesense 0.0.9 Unplugging/replugging the dongle and restarting HA also fixed it for me. No more errors, and the sensors all back in HA.
I have also been getting this type of error through several HA versions. All sensors working.
2020-12-06 11:41:03 ERROR (Thread-3) [custom_components.wyzesense.wyzesense_custom] 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 373, in _Worker self._HandlePacket(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 346, in _HandlePacket handler(pkt) File "/config/custom_components/wyzesense/wyzesense_custom.py", line 271, 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 422, in schedule_update_ha_state assert self.hass is not None AssertionError 2020-12-06 11:41:03 ERROR (Thread-3) [custom_components.wyzesense.wyzesense_custom] 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 356, in _Worker s += self._ReadRawHID() File "/config/custom_components/wyzesense/wyzesense_custom.py", line 321, in _ReadRawHID assert len(s) >= length + 1 AssertionError 2020-12-06 11:41:03 INFO (Thread-3) [custom_components.wyzesense.wyzesense_custom] LOG: time=2020-12-06T11:40:47.486000, data=b'14ff'
Not sure what it means, the sensors appear to be working. I can tell you just prior I was removing sensors add re-adding them after having restarted the Proxmox virtual machine.
Log Details (ERROR) Logger: custom_components.wyzesense.wyzesense_custom Source: helpers/entity.py:416 Integration: wyzesense (documentation) First occurred: 5:48:06 PM (21 occurrences) Last logged: 6:06:18 PM
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 416, in schedule_update_ha_state assert self.hass is not None AssertionError