Christmas Lights


#1

I know it’s early to be bringing up Christmas but I don’t want to wait until the last minute. I have three Osram Lightify RGBW Downlights outside of each bay of my three car garage. I would like to have them randomly RGB fade in and out every 20 seconds and not have them the same color. I get by on WebCore, but I don’t even know where to start on this one. Any help would be greatly appreciatedgarage lightsOsram (2)


#2

3 bulbs 3 colors, done from memory, dont take too literally :slight_smile:

define
   int i
   int rotate
   device lights = bulb 1, bulb 2, bulb 3
end define

_set TSP to allow multiple_

every 30 seconds
   set i = 0
   for $device in lights
      async with $device
         set level to 1
         set color to (rotate == i ? 'red' : ((abs(rotate - i) == 1) ? 'green' : 'blue'))
         fade level from 1 to 100% in 10 seconds
         wait 3 seconds
         fade level from 100 to 1% in 10 seconds
         wait 3 seconds
         set i = i+1
      end with
   end for
   set rotate = (rotate == 2 ? 0 : rotate+1)
end every

once its working, adjust the timings so it looks good. hope that gets you started.


#3

If you get this working ok I’d be interested in having a look at the piston.


#4

thought might as well do it myself, since the holidays are coming up :smile:


#5

tagging @Gietlt and @bobbles so they see the example. thanks.


#6

Have it all done except for two lines that I can’t get.

Line 45 has 'for each ($device in {holidaylights}), I tried everything I can think of to get that statement in. I’m lost on that.

On line 47. I have the ‘async with’, but the circle with the N in it I don’t have.


#7

just import the piston here :slight_smile: