Piston settings for timed actions

I am trying to get a piston to detect presence change to PRESENT, during times between sundown and sunup, turn on a connected bulb (my porch), keep it on for some N minutes and then shut off. For some reason, it doesn’t seem to be working.

I know that I’ve not got any clue on how to disable the device after a period of time, so I need some assistance there, as well as why it’s not working when presence changes.

New photo by Sam Roza

You just need to add "Wait X minutes after your “Turn on” task, and then add a “Turn off”

Turn on
Wait X minutes
Turn off

1 Like

That’s embarassing, I didn’t see the ‘wait’ item in the list of options. There are so many options in that list. It’s nice and thorough. I’ve set that.

Does anyone else have such a scenario working with the “any of X or Y presence changes” option? It doesn’t seem to trigger upon arrival, even though I look on the things list and I see the presence indicators show as ‘Present’ on arrival.

So, for best practices:

IF Presence changes
      IF Time is Between X and Y
      DO this
      AND this (or whatever)

Would that be more best-practicish?

Presence is working just fine for the thermostat, so I know presence detection is working fairly well.

I have disabled command optimizations and will report back if there are any other issues.

I went in to create a piston as suggested, and I don’t see a way to put an IF statement concerning a range of time. In the primary IF section, it’s called date/time, but I don’t see that or the equivalent of that in the THEN section. I’m probably just missing something very obvious, but I’ve gone at this a few different ways/times and don’t have it solved for yet.

Oh man, that shoul dhave been obvious. I missed that.

Also, I think I know why the piston doesn’t work: there is a simple rule in the ST software to turn on the porch light at sundown. My guess is that you are correct, Robin, and ST thinks the light is ON, even if I’ve turned it off.

I have a light turns on when someone arrives and shut off 10 minutes later but I have it tied to a routine so it activates when house changes from away to I’m home

1 Like

That’s what mine looks like, now. Thanks!