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

Add Cloud IR example, update docu, and allow an optional initial token to Cloud #288

Merged
merged 3 commits into from
Feb 25, 2023

Conversation

uzlonewolf
Copy link
Collaborator

The 1-2 second delay every time I called tinytuya.Cloud() was annoying me, so I added an option to pass in an initial auth token. The existing code should auto-regenerate it if it has expired however I have not tested this.

Documentation for d.set_multiple_values() has been added to close #275

A new example for Cloud IR sending has been added based upon the example I posted in #283

@@ -466,6 +466,7 @@ def getconnectstatus(self, deviceid=None):
def getdevicelog(self, deviceid=None, start=None, end=None, evtype=None, size=0, max_fetches=50, start_row_key=None, params=None):
"""
Get the logs for a device.
https://developer.tuya.com/en/docs/cloud/0a30fc557f?id=Ka7kjybdo0jse
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I both love including this and worry that they will change the URL over time. 🤷 Worth keeping.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just figured you could always pull it out of the Internet Archive should it disappear. https://web.archive.org/web/20230225125428/https://developer.tuya.com/en/docs/cloud/0a30fc557f?id=Ka7kjybdo0jse

@@ -26,6 +26,8 @@
set_retry(retry=True) # retry if response payload is truncated
set_status(on, switch=1, nowait) # Set status of switch to 'on' or 'off' (bool)
set_value(index, value, nowait) # Set int value of any index.
set_multiple_values(index_value_dict, nowait)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@jasonacox jasonacox merged commit 4b4e56e into jasonacox:master Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new function in class 'DEVICE'
2 participants