Can we get a "delay" parameter on the "Set Color" cloud api?

I’d love to be able to fire off a request to set color of a bulb that isnt carried out right away. My use-case is a more complex sunrise simulator, which at the moment requires a long running process or a series of processes in a scheduler.

# prime our starting color and brightness
/v1beta1/lights/all/color?color=kelvin2500 brightness:0&duration=0
# ramp up to full brightness hot white over 15 minutes
/v1beta1/lights/all/color?color:brightness:1&duration:1800
# transition to cold white over 15 minutes, starting 15 minutes from now
/v1beta1/lights/all/color?color=kelvin:9000&duration=1800&delay=1800

I can understand not wanting to handle these delays on the api server, but maybe it’s something the bulbs themselves could manage?

edit: markdown code samples work fine in the preview, but get butchered on the forum pages
edit by @daniel_hall: Removed the ‘eg’ before the code block. Not sure why that made it break.

1 Like

Having long running code on the bulb has its own unique challenges. Remember the bulb is a really small computer that has very little compute power. It is also subject to external factors, for example it might get power cycled by the user, or a power outage. We generally focus on reliability so a solution that uses the bulb is unlikely to make the grade.

However our cloud scheduling system handles something similar to this, and it has been built to scale. Provided we put stringent enough controls around limiting its usage (like only 3 delays running at a time), it could be a possibility. Unfortunately the person I would ask to comment on this is currently on holiday. When they return I’ll follow up with more thoughts.