Skip to content

Releases: jasonacox/tinytuya

v1.10.2 - Bug Fix for ThermostatDevice and Misc. Cleanup

10 Feb 05:20
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.10.2
  • Fix Contrib.ThermostatDevice.SetSetpoint() by @uzlonewolf in #273
  • Added command line -debug flag and code cleanup based on pylint by @jasonacox in #276

Full Changelog: v1.10.1...v1.10.2

v1.10.1 - Bug Fix for BulbDevice and Zigbee Devices

29 Jan 22:38
a95f8a9
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.10.1
  • Fix _process_message() missing parameters discovered via issue #266 by @jasonacox in #267
  • Removed bulb attribute conditional blocking in BulbDevice functions set_colour(), set_hsv() and set_colourtemp() as some devices do not correctly report capabilities. Conditional provides debug warning message instead by @jasonacox in #265

Full Changelog: v1.10.0...v1.10.1

v1.10.0 - Tuya Protocol v3.5 Device Support / Scanner Rewrite

17 Jan 06:07
Compare
Choose a tag to compare

What's Changed

TinyTuya [1.10.0]

Usage:

    python -m tinytuya <command> [<max_time>] [-nocolor] [-force [192.168.0.0/24 192.168.1.0/24 ...]] [-h]

      wizard         Launch Setup Wizard to get Tuya Local KEYs.
      scan           Scan local network for Tuya devices.
      devices        Scan all devices listed in devices.json file.
      snapshot       Scan devices listed in snapshot.json file.
      json           Scan devices listed in snapshot.json file [JSON].
      <max_time>     Maximum time to find Tuya devices [Default=18]
      -nocolor       Disable color text output.
      -force         Force network scan for device IP addresses.  Auto-detects network range if none provided.
      -no-broadcasts Ignore broadcast packets when force scanning.
      -h             Show usage.

New Contributors

Full Changelog: v1.9.1...v1.10.0

v1.9.1 - Minor Bug Fix for Cloud

03 Dec 05:49
Compare
Choose a tag to compare
  • PyPI 1.9.1
  • Fix logging for Cloud _gettoken() to prevent extraneous output. #229

Full Changelog: v1.9.0...v1.9.1

v1.9.0 - Zigbee Gateway Support

03 Dec 04:55
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.9.0
  • Add support for subdevices connected to gateway by @LesTR in #222
  • Rework Zigbee Gateway handling to support multiple devices with persistent connections by @uzlonewolf in #226
  • Add support for newer IR devices, and several IR format converters by @uzlonewolf in #228
  • Rework Cloud log start/end times, and update documentation by @uzlonewolf in #229
import tinytuya

# Zigbee Gateway support uses a parent/child model where a parent gateway device is
#  connected and then one or more children are added.

# Configure the parent device
gw = tinytuya.Device( 'eb...4', address=None, local_key='aabbccddeeffgghh', persist=True, version=3.3 )

print( 'GW IP found:', gw.address )

# Configure one or more children.  Every dev_id must be unique!
zigbee1 = tinytuya.OutletDevice( 'eb14...w', cid='0011223344556601', parent=gw )
zigbee2 = tinytuya.OutletDevice( 'eb04...l', cid='0011223344556689', parent=gw )

print(zigbee1.status())
print(zigbee2.status())

New Contributors

Full Changelog: v1.8.0...v1.9.0

v1.8.0 - Expanded Cloud Functions

22 Nov 22:37
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.8.0
  • Add AtorchTemperatureController by @Poil in #213
  • Add new Cloud functions to fetch device logs from TuyaCloud getdevicelog(id), make generic cloud request with custom URL and params cloudrequest(url, ...) and fetch connection status getconnectstatus(id) by @uzlonewolf in #219
  • Update README for new Cloud functions, and tighter deviceid error checking by @uzlonewolf in #220
import tinytuya
import json

c = tinytuya.Cloud()
r = c.getdevicelog( '00112233445566778899' )
print( json.dumps(r, indent=2) )

New Contributors

  • @Poil made their first contribution in #213

Full Changelog: v1.7.2...v1.8.0

v1.7.2 - Fix Contrib Devices Bug

01 Nov 00:02
Compare
Choose a tag to compare

What's Changed

  • Misc updates to find_device(), wizard, and repr(device) by @uzlonewolf in #196
  • Added socketRetryDelay as parameter instead of fixed value = 5. by @erathaowl in #199
  • Restore reference to 'self' in init() functions by @uzlonewolf in #207

New Contributors

Full Changelog: v1.7.1...v1.7.2

v1.7.1 - Auto-IP Detection Enhancement

07 Oct 23:24
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.7.1
  • Add Climate device module and simple example for portable air conditioners by @fr3dz10 in #189 and #192
  • Constructor and documentation updates by @uzlonewolf in #188
  • Get local key from devices.json if not provided by @uzlonewolf in #187
  • Rework device finding for auto-IP detection, and unpack_message() retcode fix by @uzlonewolf in #186
  • Standardize indentation for code snippets in the README by @TheOnlyWayUp in #184
import tinytuya 

# Specify only Device ID and tinytuya will scan for IP 
# and lookup Device Local KEY from devices.json

d = tinytuya.OutletDevice( '0123456789abcdef0123' )

New Contributors

Full Changelog: v1.7.0...v1.7.1

v1.7.0 - Tuya Protocol v3.4 Device Support

24 Sep 22:20
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.7.0
  • Add support for v3.4 protocol Tuya devices by @uzlonewolf in #179
  • API change with _send_receive() - now takes care of the packing and encrypting so it can re-encode whenever the socket is closed and reopened, and _get_socket() now takes care of negotiating the session key (v3.4)
  • Optimize detect_available_dps() by @pawel-szopinski in #176
  • Update ThermostatDevice by @uzlonewolf in #174
  • Add Pronto/NEC/Samsung IR code conversion functions to IRRemoteControlDevice by @uzlonewolf in #173
  • Added DoorbellDevice by @jonesMeUp in #162
  • Added ability to set version on constructor for more intuitive use:
d = tinytuya.OutletDevice(
    dev_id='xxxxxxxxxxxxxxxxxxxxxxxx',
    address='x.x.x.x',
    local_key='xxxxxxxxxxxxxxxx',
    version=3.4)

print(d.status())

Full Changelog: v1.6.6...v1.7.0

v1.6.6 - Updated Payload Dictionary and Command List

16 Aug 03:10
Compare
Choose a tag to compare

What's Changed

  • PyPI 1.6.6
  • Added support for 3.2 protocol Tuya devices
  • Added SocketDevice by @Felix-Pi in #167
  • Skip DPS detection for 3.2 protocol devices if it has already been set by @pawel-szopinski in #169
# Example usage of community contributed device modules
from tinytuya.Contrib import SocketDevice

socket = SocketDevice('abcdefghijklmnop123456', '172.28.321.475', '1234567890123abc', version=3.3)

print(socket.get_energy_consumption())
print(socket.get_state())

New Contributors

Full Changelog: v1.6.5...v1.6.6