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



This is a large thread… with many examples posted…

Perhaps you can post a green snapshot of your current piston so we can be more helpful?


@bangali How do I download/import the piston? All I see is an image


It sounds like you have already downloaded & imported the piston…

If you are trying to share your green snapshot here, you can press the pic , and then save the image to your device… Then reply to this thread, and press the highlighted button to upload your image here.



This is my current piston!


You can change line 59:


… by inverting it to this:

IF Time is NOT between 1:00 AM and 7:30 AM


I’ve made the change.I get back to you with feedback.

I thought that the line 117 was the one that stoped the piston earlier than I wanted.



I have never tried that exact code before, but I believe line 117 is only false one minute a day. (the last minute before midnight)


If my hunch is correct, then perhaps changing it to:
is greater than 00:00 might make it work 100% of the time…


Honestly, I would not change line 117 until you have tested my earlier recommendation… If line 59 fails, the entire piston will not do as you want


I am clicking the image in the original post (way above) because all I see is the image. How do I actually get the code and import it? I don’t see that anywhere. I am not referring to the web core dashboard. Thank you for any help


The backup code is found at the top of any green snapshot

Once you import it, you will often have to point to your devices to get the piston to work.

A good habit is to look at the original piston while doing this, so you can verify the right devices go in the right section.


ohhhhhh that’s what the code is for…wow… thank you!!!


What brand of lights is everyone using for this piston.
I would like to utilize this piston for string lights. My plan is to have string lights on my windows and have them change color according the monthly holidays.

Thank you!


Does anyone know how to modify this piston (top post) so that it pauses when none of the holidays are active in the restrictions. I want to resume my normal pistons when there isn’t a holiday.

I tried to add the following lines 103 - 124 (tweaked the original for my needs) but it isn’t working


I’ve recently switched from Smartthings to Hubitat, but it looks like Webcore on Hubitat is no longer happy with this piston

It changes the lights for about ~40 seconds, then the piston terminates.

║executeStatement: Execution time exceeded by 40027ms, Terminating


Looks like it has something to do with this code because when I comment it out, the piston works as expected. I’ll open a github issue:

    long overBy=checkForSlowdown(rtData)
			long delay=(int)getPistonLimits.taskShortDelay
				String mstr="executeStatement: Execution time exceeded by ${overBy}ms, "
				if(repeat && overBy>(int)getPistonLimits.executionTime){
					error "${mstr}Terminating", rtData
					long a=doPause("${mstr}Waiting for ${delay}ms", delay, rtData)


What is your version on HE? Is it up to date?

I ask as that looks like older code.


Whoops, I actually linked the wrong github repo, but I’m up to date, and the correct link is here (relevant code is still in the file)

 * Last update August 25, 2020 for Hubitat

static String version(){ return 'v0.3.110.20191009' }
static String HEversion(){ return 'v0.3.110.20200821_HE' }


Also, (not sure if related to commenting out) but it appears that even after pausing the piston, it continues to execute until I reboot the hub. Seems like pausing it isn’t enough to break the ‘while’ loop


Hi All, sometimes I want to change the colors for a holiday once it’s already running. How do I do that? Hitting the pause button and restarting doesn’t work, as it maintains the existing variable colors. How do I reset those colors to the new const string colors?


If you are using the piston from the first post, the colors are calibrated every day at 30 minutes before sunset.


I am trying to have the colors stop at 23:00 hours and have the lights white from 23:00 to sunrise. I changed line 217. It works except the lights fade from 23:00 to sunrise. Is there a varible I need to chage to stop the fading when the lights are white?