Releases: jasonacox/tinytuya
Releases · jasonacox/tinytuya
v1.9.1 - Minor Bug Fix for Cloud
- 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
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
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 paramscloudrequest(url, ...)
and fetch connection statusgetconnectstatus(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
Full Changelog: v1.7.2...v1.8.0
v1.7.2 - Fix Contrib Devices Bug
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
- @erathaowl made their first contribution in #199
Full Changelog: v1.7.1...v1.7.2
v1.7.1 - Auto-IP Detection Enhancement
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
- @TheOnlyWayUp made their first contribution in #184
- @fr3dz10 made their first contribution in #189
Full Changelog: v1.7.0...v1.7.1
v1.7.0 - Tuya Protocol v3.4 Device Support
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
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
- @Felix-Pi made their first contribution in #167
- @pawel-szopinski made their first contribution in #169
Full Changelog: v1.6.5...v1.6.6
v1.6.5 - Updated Payload Dictionary and Command List
What's Changed
- PyPI 1.6.5
- Reworked payload_dict and realigned the command list to match Tuya's API by @uzlonewolf in #166
- Changed socket.send() to socket.sendall() in _send_receive() by @uzlonewolf in #166
- Created TuyaSmartPlug-example.py by @fajarmnrozaki in #163 and #165
New Contributors
- @fajarmnrozaki made their first contribution in #163
Full Changelog: v1.6.4...v1.6.5
v1.6.4 - IRRemoteControlDevice and Read Improvements
What's Changed
- PyPI 1.6.4
- Separates read retries from send retries by @uzlonewolf #158
- IRRemoteControlDevice - New community contributed device module for IR Remote Control devices by @ClusterM in #160 - See example: examples/IRRemoteControlDevice-example.py
# 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
What's Changed
- PyPI 1.6.2
- Add getconnectstatus() function to Cloud class by @Paxy in #151
- Improve TuyaMessage Header processing for mulit-payload messages by @uzlonewolf in #153
- More verbose debug logging on decode error by @uzlonewolf in #155
- Add schedule editing to Contrib/ThermostatDevice and various fixes by @uzlonewolf in #157
New Contributors
Full Changelog: v1.6.1...v1.6.2