Skip to content

Commit c5c02a4

Browse files
committed
Update version to 1.17.0 and add release notes for BulbDevice rewrite
1 parent a2486e8 commit c5c02a4

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

RELEASE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# RELEASE NOTES
22

3+
## v1.17.0 - BulbDevice Rewrite
4+
5+
* Rewrite BulbDevice and rework set_multiple_values() @uzlonewolf in https://github.com/jasonacox/tinytuya/pull/617
6+
* Tool updates: pcap parse fix, new broadcast relay by @uzlonewolf in https://github.com/jasonacox/tinytuya/pull/612
7+
* Fix initialization bug with python2 (embedded devices) by @Ircama in https://github.com/jasonacox/tinytuya/pull/615
8+
9+
BulbDevice Example Usage
10+
11+
```python
12+
import time
13+
import random
14+
import tinytuya
15+
16+
d = tinytuya.BulbDevice(DEVICEID, address=DEVICEIP, local_key=DEVICEKEY, version=DEVICEVERS, persist=True)
17+
18+
# BASIC FUNCTIONS
19+
print('Basic Tests')
20+
d.set_colour(255,127,63) # Set to orange
21+
d.set_white_percentage(100.0, 0.0) # 100% brightness, 0% colour temperature
22+
d.set_brightness_percentage(100) # 100% brightness
23+
24+
# MUSIC MODE
25+
print("Music Mode")
26+
d.set_mode('music')
27+
d.set_socketPersistent( True )
28+
# Devices respond with a command ACK, but do not send DP updates.
29+
# Setting the 2 options below causes it to wait for a response but
30+
# return immediately after an ACK.
31+
d.set_sendWait( None )
32+
d.set_retry( False )
33+
for x in range(100):
34+
red = random.randint(0,255)
35+
green = random.randint(0,255)
36+
blue = random.randint(0,255)
37+
if (x % 6 == 0):
38+
# extend every 6 beat
39+
d.set_music_colour( d.MUSIC_TRANSITION_FADE, red, green, blue )
40+
time.sleep(2)
41+
else:
42+
# Jump!
43+
d.set_music_colour( d.MUSIC_TRANSITION_JUMP, red, green, blue )
44+
time.sleep(0.1) # the bulbs seem to get upset if updates are faster than 0.1s (100ms)
45+
46+
# SCENE MODE
47+
if d.bulb_has_capability(d.BULB_FEATURE_SCENE_DATA):
48+
d.set_mode('scene')
49+
print('String based scenes compatible smartbulb detected.')
50+
# Example: Color rotation
51+
print('Switch to Scene 7 - Color Rotation')
52+
d.set_scene( 7, '464602000003e803e800000000464602007803e803e80000000046460200f003e803e800000000464602003d03e803e80000000046460200ae03e803e800000000464602011303e803e800000000')
53+
```
54+
355
## v1.16.3 - Cloud Error Handling
456

557
* Add error handling in Cloud getdevices() function for edge case where old devices.json has corrupt or malformed device entries.

tinytuya/core/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
# Colorama terminal color capability for all platforms
9494
init()
9595

96-
version_tuple = (1, 16, 3) # Major, Minor, Patch
96+
version_tuple = (1, 17, 0) # Major, Minor, Patch
9797
version = __version__ = "%d.%d.%d" % version_tuple
9898
__author__ = "jasonacox"
9999

0 commit comments

Comments
 (0)