Skip to content

Releases: jasonacox/tinytuya

v1.6.5 - Updated Payload Dictionary and Command List

07 Aug 04:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.6.4...v1.6.5

v1.6.4 - IRRemoteControlDevice and Read Improvements

14 Jul 02:59
Compare
Choose a tag to compare

What's Changed

# Example usage of community contributed device modules
from tinytuya import Contrib

ir = Contrib.IRRemoteControlDevice( 'abcdefghijklmnop123456', '172.28.321.475', '1234567890123abc' )

New Contributors

Full Changelog: v1.6.2...v1.6.4

v1.6.2 - Cloud, TuyaMessage & ThermostatDevice Improvements

07 Jul 03:11
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @Paxy made their first contribution in #151

Full Changelog: v1.6.1...v1.6.2

v1.6.1 - ThermostatDevice - User Contributed Device Module

03 Jul 05:21
Compare
Choose a tag to compare

What's Changed

# Example usage of community contributed device modules
from tinytuya import Contrib

thermo = Contrib.ThermostatDevice( 'abcdefghijklmnop123456', '172.28.321.475', '1234567890123abc' )

New Contributors

Full Changelog: v1.6.0...v1.6.1

v1.6.0 - Colorama for Terminal Color

15 Jun 04:10
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.6.0
  • Add colorama terminal color capability for all platforms including MS Windows and stdout redirects
  • Fix to allow setting socket options to existing open sockets by @uzlonewolf in #140
  • Add DPS table to README for a 24v Thermostat by @uzlonewolf in #141
  • BETA: Started standalone TinyTuya API Server (see here). No change to core library.

New Contributors

Full Changelog: v1.5.0...v1.6.0

v1.5.0 - Add "nowait" Option to Commands

05 Jun 04:20
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.5.0
  • Added an optional 'nowait' boolean setting (True/False) to functions to allow sending commands without waiting for a device response. (Issue #74)
  • Support optional version parameter by @dominikkarall in #127
  • Update README.md to reflect new DPs for v3.3 Plug by @manj9501 in #133
  • Some cleanup from pylint by @mafrosis in #135
  • Add Universal IR Controller DP instructions by @mont5piques in #137
  • Added robot mower data by @Whytey in #138

New Contributors

# Example use of nowait option
d.turn_on(nowait=True)
d.set_colour(r, g, b, nowait=True)
d.set_value(201, '9AEmAvQBJgL0ASYCQAYmAkAGJgJABiY', nowait=True)  # send IR command
d.set_value(25, '010e0d0000000000000003e803e8', nowait=True)      # set scene

Full Changelog: v1.4.0...v1.5.0

v1.4.0 - Updated Scanner Functions

11 Apr 06:07
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.4.0 - Minor Update to APIs (additional arguments and elements)
  • Debug - Updated debug output for payloads to formatted hexadecimal (pull request #98)
  • Scan - Terminal color fix for 3.1 devices.
  • Error Handling added for set_timer() function (Issue #87)
  • Add galaxy lamp example by @knrdl in #115
  • Add wizard capability to pull mac addresses from TuyaPlatform in devices.json (Issue #117)
  • Add wizard -force option to perform network scan for device IP addresses (Issue #117)
  • Added support to get the MAC address and local IP address in the Wizard by @frodeheg in #120
  • Separated scan functions into scanner.py file.
  • NEW: Added command line functions for scanning:
    • devices - Display and poll all registered devices for status (using devices.json). This will force a network scan for IP address changes and will create snapshot.json.
    • snapshot - Display and poll all devices as listed snapshot.json. This assume IP address are the same as the last snapshot.
    • json - Same as snapshot but respond with a JSON payload.
# Run wizard using brute force scan for IP addresses
python -m tinytuya wizard -force

# New Interactive Command Line Options
python -m tinytuya devices
python -m tinytuya snapshot

# Non-Interactive poll with JSON response
python -m tinytuya json

New Contributors

Full Changelog: v1.3.1...v1.4.0

v1.3.1 - TuyaCloud API Support

29 Jan 19:36
Compare
Choose a tag to compare

What's Changed

  • PyPi Version 1.3.1
  • Added TuyaCloud token expiration detection and renewal logic (Issue #94)
  • Update instructions, including screenshot for configuring datacenter by @cy1110 in #97
  • Displays raw data better. by @mores in #98

New Contributors

Full Changelog: v1.3.0...v1.3.1

v1.3.0 - TuyaCloud API Support

31 Dec 02:46
Compare
Choose a tag to compare
  • Code format cleanup and readability improvements (pull request #91)
  • Upgrade - Add TuyaCloud API support and functions (#87 #95)
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)

v1.2.11 - Updated Scan and Wizard Retry Logic

28 Nov 06:14
Compare
Choose a tag to compare
  • Added retries logic to wizard and scan to honor value set by command line or default to a value based on the number of devices (if known):
# Explicit value set via command line
python3 -m tinytuya wizard 50   # Set retry to 50 
python3 -m tinytuya scan 50     

# Use automatic computed value
python3 -m tinytuya wizard      # Compute a default
python3 -m tinytuya scan        

# Example output
TinyTuya (Tuya device scanner) [1.2.11]

[Loaded devices.json - 32 devices]

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