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

Seneye USB timeouts #1

Open
mcclown opened this issue Feb 25, 2019 · 1 comment
Open

Seneye USB timeouts #1

mcclown opened this issue Feb 25, 2019 · 1 comment
Labels

Comments

@mcclown
Copy link
Owner

mcclown commented Feb 25, 2019

In some cases this error is thrown. I've updated the code to open and close the USB device in the update statement, which works fine when the device is only reading every 30 mins but is overkill for when light readings are implemented. Leaving here for tracking, for when that change is introduced.

usb.core.USBError: [Errno 19] No such device (it may have been disconnected)
2019-02-25 11:16:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.seneye_temperature 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 144, in async_update
await self._data.async_update()
File "/config/custom_components/sensor/seneye.py", line 161, in _async_update
resp = self._device.action(Action.SENSOR_READING)
File "/config/deps/lib/python3.6/site-packages/pyseneye/sud.py", line 584, in action
self._write(cdef.cmd_str)
File "/config/deps/lib/python3.6/site-packages/pyseneye/sud.py", line 557, in _write
return self._instance.write(self._ep_out, msg)
File "/config/deps/lib/python3.6/site-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/config/deps/lib/python3.6/site-packages/usb/backend/libusb1.py", line 842, in intr_write
timeout)
File "/config/deps/lib/python3.6/site-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
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 mcclown added the seneye label Feb 25, 2019
@mcclown
Copy link
Owner Author

mcclown commented Mar 7, 2019

I think the issue is in the underlying implementation, so I'm opening the issue there. mcclown/pyseneye#4

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

No branches or pull requests

1 participant