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

Unable to find devices in wizard #323

Closed
job2310 opened this issue Apr 11, 2023 · 9 comments · Fixed by #324
Closed

Unable to find devices in wizard #323

job2310 opened this issue Apr 11, 2023 · 9 comments · Fixed by #324
Labels
bug Something isn't working tuya_iot_cloud Support questions for getting local key and Tuya Cloud APIs.

Comments

@job2310
Copy link

job2310 commented Apr 11, 2023

Hi, I've been using tinytuya for a while but after upgrading to the latest version, I'm unable to find my devices using the wizard. All of my details have stayed the same but it's returning 0 devices found (in the cloud). If I run the local scan it finds all 8 devices. I've double and triple checked my API key, Secret and example DeviceID but nothing seems to help.

Wondering if you might have any advice?

Many thanks,
Josh

@uzlonewolf uzlonewolf added bug Something isn't working tuya_iot_cloud Support questions for getting local key and Tuya Cloud APIs. labels Apr 11, 2023
@uzlonewolf
Copy link
Collaborator

That's odd, I'm seeing this too. Seems the API we are calling suddenly stopped returning devices. I'm looking into it now.

@uzlonewolf
Copy link
Collaborator

Hmm, it seems this API is now requiring a Content-type: application/json header or it won't return anything. I'll try to release an update to fix this later today.

@job2310
Copy link
Author

job2310 commented Apr 11, 2023

Many thanks. Very odd that they would change that particular requirement at this point.

@Frefdt
Copy link

Frefdt commented Apr 11, 2023

I've encountered this same issue, glad its been caught so fast

@uzlonewolf
Copy link
Collaborator

I have a PR in to fix this, though I like having @jasonacox look things over before I merge things just to make sure I didn't do something stupid. In the meantime, as a temporary workaround you can copy or download tinytuya/wizard.py and after line 141 add cloud.use_old_device_list = True

    else:
        cloud = tinytuya.Cloud( **config )

        # on auth error getdevices() will implode
        if cloud.error:

to

    else:
        cloud = tinytuya.Cloud( **config )
        cloud.use_old_device_list = True

        # on auth error getdevices() will implode
        if cloud.error:

and run it with python wizard.py

@Frefdt
Copy link

Frefdt commented Apr 11, 2023 via email

@job2310
Copy link
Author

job2310 commented Apr 11, 2023

Thanks so much for looking at this so quickly.

@jasonacox
Copy link
Owner

Release fix as v1.12.3.

pip install --upgrade tinytuya

Please report any issue.... Thanks all! 🙏

@uzlonewolf
Copy link
Collaborator

It seems Tuya made the API we were using private and is now returning a "permission deny" error instead of returning an empty list. The fix in #324 still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tuya_iot_cloud Support questions for getting local key and Tuya Cloud APIs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants