Skip to content

Slowly response #250

Answered by jasonacox
EnricGarrigo asked this question in Q&A
Jan 12, 2023 · 1 comments · 10 replies
Discussion options

You must be logged in to vote

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)

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@jasonacox
Comment options

@EnricGarrigo
Comment options

@jasonacox
Comment options

@EnricGarrigo
Comment options

@jasonacox
Comment options

Answer selected by EnricGarrigo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants