Closed S-19910 closed 2 months ago
Hi @S-19910 - two suggestions:
updatedps()
function to try to force updates:import tinytuya
import time
d = tinytuya.OutletDevice(DEVICEID, DEVICEIP, DEVICEKEY)
d.set_version(3.1)
data = d.status()
print(data)
print(" > Wait 5 sec < ")
time.sleep(5)
print(" > Request Update < ")
result = d.updatedps()
# some require params that you wish updated
#result = d.updatedps(['18','19','20'])
print(result)
print(" > Fetch Status Again < ")
data2 = d.status()
print(data2)
print("")
print("Before %r" % data)
print("After %r" % data2)
Hi,
thanks for the swift reply. I tried both suggestions.
updatedps() did not bring anything. However : the async read did the trick. Now I get the (near) real time values.
Thanks a million.
Since you got it working I'm going to go ahead and close this. Feel free to re-open if needed.
Hello,
I have two Energy Metering Devices via ZigBee. I do get all the values through TinyTuya local, however, there is quite a big time delay. I mean the data I receive via TinyTuna are the (correct) values from +/- 1 minute old.
If I use the TuyaApp, the values are (within +/- 1 second) Realtime. But via TinyTuna not. Eg. I switch on a heater with 1,25kW : APP kW will increase by 1.25 almost immediately. TinyTuna will keep sending (changing) data, but only after +/- 1 minute the kW-value will increase by 1,25. Same of course when switching off.
Any suggestions? Help appreciated.