See command list as a script All questions

Is it possible to import a list of commands as a script?

I want to use my tuya bulb as a wake-up light with it gradually getting brighter over a number of seconds, but to get a smooth transition, this requires several hundred steps... I need to be able to input the hsv values each followed by a one second pause, but to manually do this will take me forever!!

Here's an example of the list of commands:

Asked by Tim on January 4 at 10:56pm

Hi Tim, sorry I missed your chat earlier. It looks like the commands didn't copy correctly into your post either...maybe you can try adding them as a screenshot?

Anyway, I think I get the idea of what you're trying to achieve. To gradually change the lights you're going to need a lot of steps in your sequence which is taking a long time to create via the UI. 

At the moment there's no simple way for you to upload a set of steps or scripts but I could try via the backend. I'll send you an email to get some more details and we'll go from there.

Something else you could try is a Tuya scene. Is it possible within the Tuya app to set up a scene which will gradually adjust your lights? If so, you could then use SEQUEmatic to trigger the scene instead of making multiple calls to adjust the device itself.

I am also using one of my Tuya bulbs as a wake-up light unfortunately in the App you also need to enter each step individually, at least in the Smart Life clone of the Tuya App.

I'm currently using a 10 step Sequence to approximate this behaviour with SEQUEmatic but this problem could be easily solved if we were able to use a while loop. For example for a white bulb something like:

Set bright to 0

Set control_data of your_bulb to {"change_mode":"gradient", "bright": [bright], "temperature": 200, "h":0, "s":0, "v":0}

Turn on the Tuya device your_bulb

While bright is below 1000

     Increase bright by 10

     Pause for 1 seconds

     Set control_data of your_bulb to {"change_mode":"gradient", "bright": [bright], "temperature": 200, "h":0, "s":0, "v":0}

EndWhile

would take 100s to run and make 1% Steps in brightness. Temperature or color of the bulb would only be a question of using the appropriate variables.

Hi Thomas, thanks for the feedback - I've added this to my backlog as something to consider in a future update.  There would be a few scenarios where some sort of loop would be useful.  Thanks!

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.