Tinytuya

Latest version: v1.13.2

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

Scan your dependencies

Page 14 of 16

1.2.6

* PyPi Version 1.2.6
* Added `wizard` handling to capture and display Tuya API server error responses (PR 45)
* Added better error handling for BulbDevice `state()` function to not crash when dps values are missing in response (PR 46)
* Added async examples using `send()` and `receive()`
* Updated scan output to include device Local Key if known (PR 49 50)
* Fixed print typo in examples/devices.py (PR 51)

1.2.5

* PyPi Version 1.2.5
* Added raw mode `send()` and `receive()` function to allow direct control of payload transfers. Useful to monitor constant state changes via threads or continuous loops. This example opens a Tuya device and watches for state changes (e.g. switch going on and off):

python
import tinytuya

d = tinytuya.OutletDevice('DEVICEID', 'DEVICEIP', 'DEVICEKEY')
d.set_version(3.3)
d.set_socketPersistent(True)

print(" > Send Initial Query for Status < ")
payload = d.generate_payload(tinytuya.DP_QUERY)
d.send(payload)

while(True):
See if any data is available
data = d.receive()
print('Received Payload: %r' % data)

Send a keyalive heartbeat ping
print(" > Send Heartbeat Ping < ")
payload = d.generate_payload(tinytuya.HEART_BEAT)
d.send(payload)

1.2.4

* PyPi Version 1.2.4
* Added detect_available_dps() function
* Fixed bug in json_error() function
* Updated instruction for using Tuya iot.tuya.com to run Wizard
* Added option to disable deviceScan() automatic device polling
* Added better error handling processing Tuya messages (responses) Issue 39
* Fixed display bug in Wizard device polling to show correct On/Off state

1.2.3

* PyPi Version 1.2.3
* Added `set_dimmer()` to OutletDevice class.
* Added `set_hsv()` to BulbDevice class.
* Updated `set_brightness()` in BulbDevice to handle *white* and *colour* modes. Issue 30
* BulbDevice determines features of device and presents boolean variables `has_colour`, `has_brightness` and `has_colourtemp` to ignore requests that do not exist (returns error).

1.2.2

* PyPi Version 1.2.2
* Fix bug in set_white_percentage(): added missing self. PR 32
* Fixed set_white_percentage: colour temp was incorrectly computed for B type Bulbs. PR 33
* Moved setup **Wizard** out of module init to standalone import to save import load.

Command line mode is still the same:
python
python3 -m tinytuya wizard


Import now requires additional import to run Wizard programmatically:
python
import tinytuya
import tinytuya.wizard

tinytuya.wizard.wizard()

1.2.1

* PyPi Version 1.2.1
* Fixed header for 0x12 Update DPS Command (see issue 8)

Page 14 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.