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

Make it easier to collect info for new devices #2419

Open
3 tasks done
make-all opened this issue Oct 20, 2024 · 0 comments
Open
3 tasks done

Make it easier to collect info for new devices #2419

make-all opened this issue Oct 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@make-all
Copy link
Owner

make-all commented Oct 20, 2024

Description

Now that an iot.tuya.com account is no longer needed to get local keys, users do not have a good source of info for dps info for new devices. This has led to a regression in quality of reports, which often don't contain the needed enum/integer range info, and sometimes not even dp ids, making the report useless.

Steps to reproduce

  1. Login with QR code method
  2. Try to add a device which is unsupported
  3. Try to gather what info you can without a Tuya developer account

Expected behaviour

Now that cloud functionality is available, we could try to pull in all the info needed and log it, so we just need to send users to the log file for gathering info.

Additional context

No response

Confirmation

  • I am sure this is a bug, or improvement that is well enough described that it can be implemented

  • If this is for a specific device, the device config is mentioned above, or diagnostics are included.

  • This is not requesting addition of a new device

@make-all make-all added the enhancement New feature or request label Oct 20, 2024
make-all added a commit that referenced this issue Oct 20, 2024
Log product id and QueryThingsDataModel result if cloud is available.

Issue #2419
make-all added a commit that referenced this issue Oct 20, 2024
Because the QueryThingsDataModel comes through as a string attribute
on the json response rather than actual json data, we need to parse
and reformat it to have it readable.

Actually we probably want to condense it with custom formatting, but as a
first step use the json features in Python.

Issue #2419
make-all added a commit that referenced this issue Oct 21, 2024
make-all added a commit that referenced this issue Oct 21, 2024
make-all added a commit that referenced this issue Oct 21, 2024
Since the QueryThingsDataModel API is not working with the QR auth,
try the GetDeviceSpecificationAndAttribute API call instead.

This gives the most important info, but sometimes does not match
the local protocol where enum values differ between cloud and local
representation, and is often missing some diagnostic dps.

Issue #2419
make-all added a commit that referenced this issue Oct 21, 2024
As the result is the same with both functions, revert to the preferred
one for future reference, and disable the logging code that
unsuccessfully tried to use it.

- device: add an asyncio.sleep to the async generator so that it is
async on every iteration.

Issue #2419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant