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

4thofjuly
diwali
halloween
christmas
holiday

#121

yes and yes


#122

the issue is the edits. you are checking for ALL in one place and ANY in the other for the presence sensors which is breaking the repeat do loop.


#123

the only any i can find is outside the loop does that make a difference?

Edit: sorry just noticed it how do i fix it? as it has true and false in the loop as well

Edit: hopefully may have worked it out just testing


#124

@bangali could you explain the last IF part of the piston to me please, to me it seems contradictory.

So it would only stop if the @pauseHLCRaFp is false ?


#125

no. that if only runs once after 11:00pm when the while loop exits. in normal looping when it changing lights and playing sound that if is not evaluated.


#126

so I shouldn’t need my presence in that IF? i cant get it to work correctly yet, do i need to create a variable for the presence so if one of us is there its true and if both are not there it would be false? would that work better?


#127

i would recommend doing this:


#128

But when you pause this piston, then resume it again it doesn’t run again till the next day? So ie if we left at 7pm then came back at 9 we would want it to continue but it wouldnt?


#129

dont pause the piston. set the flag to true when all away and false when anyone comes back. and go back to using the honj5 piston code version.


#130

@bangali can the new piston be used without sound, ie for those who don’t have a sound device. I’m looking through the posts and whilst the answer may be there, I may just not have seen it yet.


#131

sorry of course that’s what you meant! i got confused


#132

yes it can, just set soundEnabled to false and save the piston.


#133

ehh, no worries.


#134

you ment like this :+1: its also so simple when you know how :grin:


#135

also updated top post to make it easier to disable sound.


#136

@bangali, super stuff, I didn’t think of looking at the piston itself for that. DOH :slight_smile:

This is a great piston, many thanks for your work on it and indeed sharing it.


#137

you are welcome.


#138

@bangali is there a reason why i get

Piston waited at a semaphore for 4814ms on this piston? and why does it happen, because it happens on some of my other pistons?


#139

no idea. it does not even subscribe to any device events. just uses timer.


#140

is everything else correct? its supposed to be your piston without the global variable and speakers