-
Notifications
You must be signed in to change notification settings - Fork 174
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
Auto address detection fails for older device versions in TinyTuya 1.12.9 #478
Comments
I'm speculating, but from looking at the output of Atsushi |
Hi @yokoyama-flogics ! It is the device which sends UDP broadcasts, TinyTuya only passively listens for them. Looking at the code it would seem I broke find_device() at some point for the older v3.1 devices. I'll try to get that fixed soon. |
Re-reading it I see my last post wasn't very clear. Both |
Hi @uzlonewolf, Thank you for looking into this. I will also try to review the code more closely when I have the time. As a current workaround, I'm using Atsushi |
Hmm, looking at this a bit more, I'm actually not seeing a problem anywhere. I tested with the 3 v3.1 devices I have and all 3 of them are working fine with address=Auto. Can you run a scan with debug turned on ( |
Hi @uzlonewolf, I tried it out. Will this information be helpful?
Atsushi |
Atsushi, are you still ale to get "Auto" to work on 3.3 devices? And, are you by chance running your script in a container (e.g. docker)? |
Yes, I've confirmed that with the same Python environment (using pyenv), I can get a response with "Auto" for devices that are version 3.3.
However, it was necessary to include
I tried adding For your reference, here is the output of
Python version is 3.9.11. Atsushi |
Thank you for the wonderful software.
I have a simple question.
Previously, I was able to successfully use the call
tinytuya.OutletDevice(dev_id=..., address="Auto", local_key=..., version=3.3)
with devices of version 3.3 (with auto detection of the address).However, when I attempt the same call with a slightly older device (version 3.1), I receive the following error and cannot connect:
However, everything works fine when I specify the actual IP address:
Yet, when I use
python -m tinytuya scan
, I can correctly detect the device as follows:What is the fundamental difference here? Why does
python -m tinytuya scan
work, buttinytuya.OutletDevice(..., address="Auto", ...)
does not?I am using tinytuya version 1.12.9.
Atsushi
The text was updated successfully, but these errors were encountered: