Slowly response #250
-
Hi all. Because that, if the load is powered on for a period less than 20 seconds (for example, in little intervals of 10 seconds), we have an accumulated current consumption of '0'. Is it possible to accelerate the response time? Is any way to obtain the current values immediatly? Thanks! Update: if we enter in SmartLife app to see the values, the API refresh immediately. Any refresh on app provoke an immediately refresh of the values read from the API. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi @EnricGarrigo - it sounds like your device needs to the UPDATEDPS command to cause it to update the power metrics: 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) |
Beta Was this translation helpful? Give feedback.
Hi @EnricGarrigo - it sounds like your device needs to the UPDATEDPS command to cause it to update the power metrics: