Skip to content

Commit

Permalink
Merge pull request #468 from unit-404/patch-1
Browse files Browse the repository at this point in the history
Our purpose needs custom port + reduce delay when connection
  • Loading branch information
jasonacox authored Feb 25, 2024
2 parents a287564 + 6676d8d commit d13c71a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Makes some tweaks to the recently-added Contrib/PresenceDetectorDevice by @mrioan and Deprecates Contrib/__init__.py by @uzlonewolf in https://github.com/jasonacox/tinytuya/pull/466
* And adds a note about QR code scanning with Dark Reader to the README. #463
* Add option to specify port in XenonDevice class by @unit-404 in https://github.com/jasonacox/tinytuya/pull/468

## v1.13.1 - Cryptography Version

Expand Down
4 changes: 2 additions & 2 deletions tinytuya/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def assign_dp_mappings( tuyadevices, mappings ):

class XenonDevice(object):
def __init__(
self, dev_id, address=None, local_key="", dev_type="default", connection_timeout=5, version=3.1, persist=False, cid=None, node_id=None, parent=None, connection_retry_limit=5, connection_retry_delay=5 # pylint: disable=W0621
self, dev_id, address=None, local_key="", dev_type="default", connection_timeout=5, version=3.1, persist=False, cid=None, node_id=None, parent=None, connection_retry_limit=5, connection_retry_delay=5, port=TCPPORT # pylint: disable=W0621
):
"""
Represents a Tuya device.
Expand All @@ -891,7 +891,7 @@ def __init__(
self.connection_timeout = connection_timeout
self.retry = True
self.disabledetect = False # if True do not detect device22
self.port = TCPPORT # default - do not expect caller to pass in
self.port = port # default - do not expect caller to pass in
self.socket = None
self.socketPersistent = False if not persist else True # pylint: disable=R1719
self.socketNODELAY = True
Expand Down

0 comments on commit d13c71a

Please sign in to comment.