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

Device can't be found after period of time. #4

Open
mcclown opened this issue Mar 7, 2019 · 3 comments
Open

Device can't be found after period of time. #4

mcclown opened this issue Mar 7, 2019 · 3 comments
Assignees

Comments

@mcclown
Copy link
Owner

mcclown commented Mar 7, 2019

This is tested with a client that is querying the SUD once every 30 mins. When it fails I'm seeing the error shown before.

Platform Hass.io 0.87.0 on Raspberry Pi

2019-03-07 22:39:57 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.seneye_nh3 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
await self.async_update()
File "/config/custom_components/sensor/seneye.py", line 148, in async_update
await self._data.async_update()
File "/config/custom_components/sensor/seneye.py", line 164, in _async_update
device = SUDevice()
File "/config/deps/lib/python3.6/site-packages/pyseneye/sud.py", line 527, in init
if dev.is_kernel_driver_active(0):
File "/config/deps/lib/python3.6/site-packages/usb/core.py", line 1061, in is_kernel_driver_active
self._ctx.managed_open()
File "/config/deps/lib/python3.6/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/config/deps/lib/python3.6/site-packages/usb/core.py", line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File "/config/deps/lib/python3.6/site-packages/usb/backend/libusb1.py", line 786, in open_device
return _DeviceHandle(dev)
File "/config/deps/lib/python3.6/site-packages/usb/backend/libusb1.py", line 643, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/config/deps/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 19] No such device (it may have been disconnected)

@mcclown
Copy link
Owner Author

mcclown commented Mar 7, 2019

Uptime:

March 05 - 1:56 - March 7th 22:09 (about 68 hours) - Restart OS fixed it.
March 07 - 23:21 - Mar 10th 22:05 (about 69.5 hours) - Restart OS fixed it

@mcclown
Copy link
Owner Author

mcclown commented Jun 25, 2019

Moved system to HASS OS with HA 0.93 and it's even more unstable now. It is only managing to get an hour or two of reads before falling over now. Still investigating.

I've tried simulating this on a Raspbian system and have had uptimes of a couple of weeks, with no issues. I suspect this is related to the Hass.io and HASS OS images/OSes.

@joakimsk
Copy link

I have seen this on a Raspbian system as well, I had the program running for around a week without problem, and then it stops talking to the seneye. I have not yet figured out why, but I restart the raspberry pi manually when this happens. I will try to investigate next time it happens.

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

2 participants