Skip to content

Commit 842b5f1

Browse files
committed
v1.1.4 Update DPS
1 parent f4352fc commit 842b5f1

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

RELEASE.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,35 @@
44

55
* IPv6 Support - Use socket.getaddrinfo() for AF_INET & AF_INET6
66
* Add socket.shutdown(socket.SHUT_RDWR)
7-
* Automatic IP Address Detection based on Device ID
7+
* Add function to send multiple DPS index updates with one call
8+
9+
## v1.1.4 - Update DPS (Command 18)
10+
11+
* PyPi Version 1.1.4
12+
* Added `updatedps()` command 18 function to request device to update DPS values (Issue #8)
13+
* Added `set_debug()` function to activate debug logging
14+
```python
15+
import tinytuya
16+
import time
17+
18+
tinytuya.set_debug(True)
19+
20+
d = tinytuya.OutletDevice('DEVICEID', 'IP', 'LOCALKEY')
21+
d.set_version(3.3)
22+
23+
print(" > Fetch Status < ")
24+
data = d.status()
25+
time.sleep(5)
26+
27+
print(" > Request Update for DPS indexes 18, 19 and 20 < ")
28+
result = d.updatedps([18, 19, 20])
29+
30+
print(" > Fetch Status Again < ")
31+
data2 = d.status()
32+
33+
print("Before %r" % data)
34+
print("After %r" % data2)
35+
```
836

937
## v1.1.3 - Automatic IP Lookup
1038

0 commit comments

Comments
 (0)