Accessing "missing" DPs #373
-
Hello. Bit of an odd one. I have a smart pet feeder. OutletDevice.detect_available_dps() returns the following DPs (which I think is a correct representation of DP_QUERY):
However, cloud.getdps() returns the following:
That is, OutletDevice.detect_available_dps() seems to return a smaller set of DPs than the cloud equivalent. Is there any way to get it to show more DPs? In particular, I would like to (locally) query dp_id=1 ("meal_plan"). Is there any way of doing that? Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Some DPs are not sent in status requests, they're only sent asynchronously when the value changes. Try running this: import time
import tinytuya
d = tinytuya.Device( 'your_device_id_here', persist=True )
print( 'Found:', d )
print( 'Status:', d.status() )
print(" > Begin Monitor Loop <")
pingtime = time.time() + 9
while(True):
if( pingtime <= time.time() ):
payload = d.generate_payload(tinytuya.HEART_BEAT)
data = d.send(payload)
pingtime = time.time() + 9
if data:
print( time.time(), data )
data = d.receive()
if data:
print( time.time(), data ) and while that's running make a change to the schedule in the app. |
Beta Was this translation helpful? Give feedback.
Some DPs are not sent in status requests, they're only sent asynchronously when the value changes. Try running this:
and while that's running make a change to the schedule in the app.