Assistance with Piston- lights/motion


#1

Hi everyone
I am Looking for some help on my piston,
What I am trying to achieve is as follows:
if
motion is detected in lounge and the 2 x lounge lights are off, then set level and colour to the 2 x lights in lounge;
Then
If no motion for 15 minutes
turn off.

This will allow me to let Plex adjust lights on events ( once in the room) and the motion sensor then wont keep turning the lights up

I have finally got the lights to turn on and to the right level and colour, and they do not change once on, with any additional motion, I just cant get them to turn off after 15-minutes on no motion. I had some assistance from Bobbles in the old forum, thank you that suggested I change the IF statement TCP to never.

i did this and it made no difference. I can find quite a few examples of shutting down lights on a timer, but that is what I dont need. I have also tried the smart lights app, but it does not have the functionality of the above piston statement.

I attached my piston, please feel free to let me know where i have gone astray.
Thank you


#2

I’ve answered in your other post. :smile:


#3

Thank you Bob
I have had another relook
replied to post in original forum


#4

Hi folks, would one of you please drop a link here to the other post for the benefit of anyone facing a similar problem?


#5

I suggested that the piston be split into an if and else-if statements.
One for active and one for inactive.
This did the trick.See ryley199’s piston below.


#6

Thanks everyone for the input
enough to start fleshing something out.

rather than rely on “away” mode as i have a system that monitors for this
that apparently i cant tie into smart things ( uk version of digital ilfe)
and knowing either me or my wife will forget to set this, hence i was looking to try and input the dates/times

apologies, but really appreciate the input so far


#7

Hi @Ryley199
I’m a bit confused about your dates and times statement and away mode.
What are you trying to actually achieve.
There is nothing about dates and times in your original piston.


#8

Hi Bob i posted to the wrong post apologies, ignore the post


#9

No worries.