File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments