Tinytuya

Latest version: v1.13.2

Safety actively analyzes 630602 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 16

1.3.0

* PyPi Version 1.3.0
* Code format cleanup and readability improvements (pull request 91)
* Upgrade - Add TuyaCloud API support and functions (87 95)

python
import tinytuya

c = tinytuya.Cloud(
apiRegion="us",
apiKey="xxxxxxxxxxxxxxxxxxxx",
apiSecret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
apiDeviceID="xxxxxxxxxxxxxxxxxxID")

Display list of devices
devices = c.getdevices()
print("Device List: %r" % devices)

Select a Device ID to Test
id = "xxxxxxxxxxxxxxxxxxID"

Display DPS IDs of Device
result = c.getdps(id)
print("DPS IDs of device:\n", result)

Display Status of Device
result = c.getstatus(id)
print("Status of device:\n", result)

Send Command - This example assumes a basic switch
commands = {
'commands': [{
'code': 'switch_1',
'value': True
}, {
'code': 'countdown_1',
'value': 0
}]
}
print("Sending command...")
result = c.sendcommand(id,commands)
print("Results\n:", result)

1.2.11

[Loaded devices.json - 32 devices]

Scanning on UDP ports 6666 and 6667 for devices (47 retries)...

1.2.10

* PyPi Version 1.2.10
* Added ability to disable device auto-detect (default vs device22) via `d.disabledetect=True`.
* Wizard: Added new data center regions for Tuya Cloud: (Issues 66 75)

Code | Region | Endpoint
-- | -- | --
cn | China Data Center | https://openapi.tuyacn.com
us | Western America Data Center | https://openapi.tuyaus.com
us-e | Eastern America Data Center | https://openapi-ueaz.tuyaus.com
eu | Central Europe Data Center | https://openapi.tuyaeu.com
eu-w | Western Europe Data Center | https://openapi-weaz.tuyaeu.com
in | India Data Center | https://openapi.tuyain.com

1.2.9

* PyPi Version 1.2.9
* Added Error Handling in class Device(XenonDevice) for conditions where response is None (Issue 68)
* Added edge-case handler in `_decode_payload()` to decode non-string type decrypted payload (Issue 67)

1.2.8

* PyPi Version 1.2.8
* Added additional error checking for BulbDevice type selection
* Added TinyTuya version logging for debug mode
* Fix bug in scan when color=False (Issue 63)

1.2.7

* PyPi Version 1.2.7
* Updated setup `wizard` to support new Tuya Cloud signing method (Issue 57)
* Added Bulb type C and manual setting function `set_bulb_type(type)` (PR 54)
* Wizard creates `tuya-raw.json` to record raw response from Tuya IoT Platform
* Fixed device22 bug on retry - Now returns ERR_DEVTYPE error, status() includes auto-retry (56)

Page 13 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.