Holiday Lights: 4th of July / Diwali / Halloween / Christmas - Your Pick

4thofjuly
diwali
halloween
christmas
holiday

#21

Do’h!

I knew i’d seen some numbers at the ends of the lines but could not get them back ! turn the trace on! tough school day today!


#22

Thanks for sharing this!

Question - while using Hue bulbs, the piston seems to rotate through the lights fading them individually one at a time instead of simultaneously. So one light will fade a bit, then another light will, then another, then back to the first light to fade slightly more etc. Is that the intended result, or is there an issue with my setup/hub?


#23

you are welcome.

the lights should all be fading simultaneously each with different colors based on the colors selected from the scheduler piston in calling the second piston. thought other users here have used the same with hue bulbs without any issues.


#24

Figured that was the idea. I wonder if it has to do with using the older v1 Hue bridge.

Edit - changed hub to Hue Bridge for clarification.

I may try upgrading to the newer v2 bridge to see if that helps. Will report back if I do.


#25

OK i figured it out. i had added an extra restriction in the final if statement when trying to get piston states to work. removed and it works fine. now i’m messing around with the colour scrolling the fade steps were a bit choppy on mine even with the frequency at 240.

I did manage to make the piston state change with the different holidays though (“Holiday Mode: :jack_o_lantern: Halloween :jack_o_lantern:” “Holiday Mode: :christmas_tree: Christmas :christmas_tree:”) before returning to “Holiday Mode: Normal”

@sinjed i have a v2 bridge but i have only used the piston on one Hue lamp in my office so far. I’ll change the lights in the piston today to add a few more and let you know what happens.


#26

Hi all, thanks for these Pistons! I just added them last night so I’m excited to see how they work when it gets closer to Halloween. I made a few adjustments to fit what I wanted better but I’m having a problem.

First, I changed the trigger to be any time a certain light turns on, and the trigger to pause the second piston when that light turns off. Second, I wanted just a single random color on any date not included in the holiday dates so I added an “else” statement after the dates to just set color to random.

The problem I’m facing is that light won’t turn off now. Any time I try to turn it off it turns right back on (to a random color so that works). I know it’s this piston because when I pause the Piston, the light will turn off and stay off when told to turn off.

Thanks again!


#27

since you are triggering the second piston on light on and off, when the light is turned on it will keep receiving a continuous stream of commands to change colors which is probably keeping it from turning off.

create a virtual switch. in the scheduler piston turn on the virtual switch when the light turns on. in the second piston only do the tasks for changing color if the virtual switch is on otherwise turn light off. when you want light to turn off, turn off the virtual switch.


#28

I think I’m more confused now. Why would the light continue to get commands if the date is not one of the predetermined dates?

I’m also confused about how a virtual switch would work. Sorry, but thanks for the help.


#29

if the date matches and you have resumed the second piston then it will continue to get commands to change colors almost continuously.

please post a green snapshot of the pistons and i will point to the changes required to fix the problem you are having.


#30

This is the only piston I altered, except for adding the light I wanted to the second.

Edit: looking at a macro view of the piston I think I have the ELSE statement on the wrong level. Does that seem right? If I actually formatted it correctly would it work like this?


#31

try this:


#32

Ok so it looks like you changed the {fadeColors} variable to random if the above dates are not met, then runs the other piston either with random as the color sequence or one of the holiday color sequences? Smart. But will this cause the light to cycle random colors? Because I only want 1 random color each time the light is turned on.


#33

since only one color is specified each time it should not cycle the color and only use that one color.


#34

Hi @bangali
This also won’t let me click and zoom in on the pistons, just like my thread? Is did you find out why this is happening?


#35

sorry dont believe thats been resolved yet. for now please right click on the image and open in a new tab.


#36

I am still new to this but just worked on getting my first piston working with my outdoor Halloween blowups…

I am trying to get this working with my ring doorbell that has a motion sensor so want this to run if there is no motion or in other words if motion starts to stop and hopefully run my Smart Lighting automation. (I have a Smart Lighting automation to turn the porch lights on if motion starts)


#37

Question how hard would it be to add more holidays and where would I add it?


#38

super easy. add them in the first i.e. the scheduler piston. one variable with string of colors and corresponding with block with the right date restriction.

so, one more holiday color string here if not reusing one of the existing color strings:

and one more with block like this for the new holiday anywhere before the with block that resumes and executes the piston. remember to change not only the date in this new with block but also set the fadecolors variable to the new holiday color string you defined above.


#39

How do you stop this and then start it running again? If you pause it and un-pause will it start again if its past sunset?


#40

the first piston i.e. the scheduler piston controls pausing and resuming this piston at the dates and times specified.

but in context of your previous question, what you could do is create a virtual switch in ST. lets call it vColorsOff for this example. In the Smart Lighting automation rule to turn on porch lights also turn on vColorsOff when motion starts and turn off vColorsOff after motion stops. you should be able to do this in the same Smart Lightning rule that you have for the porch lights.

then in the second piston here which changes the colors change this if:

if countColors = 0
   exit false
end if

to this:

if countColors = 0
   or
   vColorsOff switch is on
   exit false
end if

lets try this first. i have a small concern on what will happen when the fade is running and the same lights are turned on with Smart Lighting, but lets see how it goes.