dhallgb / Seneye-MQTT

Read Seneye USB Device and transmit readings via MQTT
MIT License
14 stars 7 forks source link

Doesn't seem to launch #4

Closed thepotoo closed 4 years ago

thepotoo commented 4 years ago

Ubuntu 18.04 Used pip to install files, created file in my home directory called seneye.py Added my user to the plugdev group, added the udev rules and activated the udev rules following the instructions.

chomod +x seneye.py, then ./seneye.py returns: ('device >>>', <DEVICE ID 24f7:2204 on Bus 002 Address 004>) Traceback (most recent call last): File "./seneye.py", line 129, in main() File "./seneye.py", line 120, in main sensor = read_sud(device, interface) File "./seneye.py", line 33, in read_sud if dev.is_kernel_driver_active(interface): File "/home/user/.local/lib/python2.7/site-packages/usb/core.py", line 1061, in is_kernel_driver_active self._ctx.managed_open() File "/home/user/.local/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper return f(self, *args, **kwargs) File "/home/user/.local/lib/python2.7/site-packages/usb/core.py", line 120, in managed_open self.handle = self.backend.open_device(self.dev) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 786, in open_device return _DeviceHandle(dev) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 643, in init _check(_lib.libusb_open(self.devid, byref(self.handle))) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Pretty sure I added myself to the plugdev group right and the rules are active. Just in case... sudo ./seneye.py gives me: ('device >>>', <DEVICE ID 24f7:2204 on Bus 002 Address 003>) ('configuration>>>', <CONFIGURATION 1: 250 mA>) ('interface >>>', <INTERFACE 0: Human Interface Device>) ('endpoint in >>>', <ENDPOINT 0x81: Interrupt IN>) ('endpoint out >>>', <ENDPOINT 0x1: Interrupt OUT>) ('HELO ret code>>>', 8) ('HELO hex >>>', (<type 'array.array'>, 64, '88:01:01:03:30:4e:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00')) ('READ ret code>>>', 7) Traceback (most recent call last): File "./seneye.py", line 129, in <module> main() File "./seneye.py", line 120, in main sensor = read_sud(device, interface) File "./seneye.py", line 74, in read_sud ret=dev.read(epIn,epIn.wMaxPacketSize,1000) File "/home/user/.local/lib/python2.7/site-packages/usb/core.py", line 988, in read self.__get_timeout(timeout)) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 851, in intr_read timeout) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 936, in __read _check(retval) File "/home/user/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 110] Operation timed out

This is an activated device that works fine on Windows. Any ideas what I'm doing wrong?

dhallgb commented 4 years ago

I was going to suggest you try sudo then saw you'd already done that. Sorry, I have no idea what might be going on. I no longer have a Seneye device nor even an aquarium, so this code is no longer being developed.