setting a timer for a lamp #316
Unanswered
Pietschnitzel
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Are you referring to a recurring timer, or the 1-shot countdown timer? Very few devices can do recurring timers on-device, for most of them the timer is actually in the cloud and won't function without internet. 1-shot countdown timers should be on-device though and can be set if you know the right DP. If you start a persistent monitoring loop and change the timer with the app, do you see a DP update? import time
import tinytuya
d = tinytuya.Device( ..., persist=True )
print( d.status() )
print(" > Begin Monitor Loop <")
pingtime = time.time() + 9
polltime = time.time() + 300
while(True):
if( pingtime <= time.time() ):
payload = d.generate_payload(tinytuya.HEART_BEAT)
data = d.send(payload)
pingtime = time.time() + 9
if data:
print( data )
data = d.receive()
if data:
print( data ) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
when using the app, you have the ability to set a schedule, in the device logs it shows up as shown here

i would want to add that scheduling ability to my Programm, but i cannot find out how the function works, especially the dps_id parameter
Any help is appreciated
Beta Was this translation helpful? Give feedback.
All reactions