mcclown / pyseneye

A module for interacting with Seneye range of aquarium and pond sensors
Apache License 2.0
8 stars 4 forks source link

Seems to time out with SUD ver 4.0.4 #15

Closed joakimsk closed 3 years ago

joakimsk commented 3 years ago

Tested on Raspberry Pi 1 B with latest Raspbian distro, fully upgraded. Seneye SUD v 4.0.4@14200000.

After adding manual udev rule in /etc/udev/rules.d/10-usb.rules I got past USB access denied message:

ACTION=="add" \ , SUBSYSTEMS=="usb" \ , ENV{DEVTYPE}=="usb_device" \ , ATTRS{idProduct}=="2204" \ , ATTRS{idVendor}=="24f7" \ , GROUP="plugdev" \ , MODE="0777"

Then reloading udev config as root: udevadm control --reload-rules && udevadm trigger

I finally was able to use pyseneye interactively and get through these commands: from pyseneye.sud import SUDevice, Action d = SUDevice() d.action(Action.ENTER_INTERACTIVE_MODE)

Timing out at: s = d.action(Action.SENSOR_READING)

File "/home/pi/.local/lib/python3.7/site-packages/pyseneye/sud.py", line 608, in action

My foo is not strong enough to find the problem, but I wonder if there may have been some changes to how you should interpret the seneye from the version you made pyseneye for, and the version I am using?

joakimsk commented 3 years ago

Using the Seneye example code for C++ on Mac OS X with hidapi, I get: " Device: F50020C75B6DF2D6AF3620E813006001 v.4.0.4 Type: Home This device need to be connected to SCA or SWS"

Thus it seems that the computer can at least talk to the seneye, get its version string. I do not have the slide at hand to test it with that; but it may be that this is part of the problem. I will give the slide a try when I get to it, and try the C++ example again.

mcclown commented 3 years ago

I have heard reports that Seneye have introduced something into the firmware that cause the Seneye to stop working unless it has a new slide activated in the device online. That is something I haven't managed to work out how to replicate in this integration, as it looks like Seneye have encrypted these calls over the SUD interface.

I haven't verified this change myself though.

On Tue, Mar 30, 2021 at 10:58 PM Joakim Skjefstad @.***> wrote:

Using the Seneye example code for C++ on Mac OS X with hidapi, I get: " Device: F50020C75B6DF2D6AF3620E813006001 v.4.0.4 Type: Home This device need to be connected to SCA or SWS"

Thus it seems that the computer can at least talk to the seneye, get its version string. I do not have the slide at hand to test it with that; but it may be that this is part of the problem. I will give the slide a try when I get to it, and try the C++ example again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcclown/pyseneye/issues/15#issuecomment-810161609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6SUEB7REHLCRWVVQYMLDTGG4GJANCNFSM4ZRWLFFQ .

-- Stephen Mc Gowan.

joakimsk commented 3 years ago

The official example code in C++ from OS X works very well as long as I have a slide in the Seneye. I can imagine this being the issue at hand. I will proceed to test your python package on a raspberry pi, with the slide in.

joakimsk commented 3 years ago

No problems at all, without a slide in the device, it times out. Everything works fine with a slide in it, after it has been activated, so this issue is closed. Activation of slide must be done through standard seneye software.