-
Really am loving this library, but I can't seem to figure out how to quickly tell whether or not there is an error with a connection. I'm trying to make a very basic GUI that's either web based or Tkinter based, and I want to be able to quickly catch an error with connections if there is one. Here is my current code for a connection, with a version number (3.2) that is PURPOSELY wrong:
It takes a good minute and a half maybe 2 minutes still until device.status() returns the error. I purposely set all the socket-related functions to the lowest number that made sense. Am I missing a function to make this run faster and get to a conclusion of good/bad sooner? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @RYoder97 , try turning on debug and setting the timeout settings via initialization: import tinytuya
tinytuya.set_debug(True)
device = tinytuya.Device("id", "x.x.x.x", "key", version="3.3",
connection_timeout=1, connection_retry_limit=0, connection_retry_delay=0)
print(device.status()) |
Beta Was this translation helpful? Give feedback.
Hi @RYoder97 , try turning on debug and setting the timeout settings via initialization: