First Few Pistons Help


#1

I originally put this on the ST forums before I realized this one existed. Figured I would post it here as well.

Hi all. Fairly new to Smartthings and brand new to webCoRE. Took me a bit to my head wrapped around it, but I think I’ve got a decent feel for it now. I’ve come up with a few pistons that I’d appreciate you more seasoned webCoRE folks to take a look like and see if anything looks funky. Basically I want my front porch light to turn on and fade up to 60% 20 minutes before sunset and then fade down to 0% and turn off 15 minutes after sunrise. I’m just not sure if simply adding the command “fade to 60%” or “fade to 0%” is all I need? Do I also need an “off” and “on” command in there somewhere? I also want it to fade up to 100% if either my wife or I’s presence changes to present, and then fade back down to 60% 10 minutes after presence on either phone is present for 10 minutes. But, if say my wife is already home for more than 10 minutes, will my presence fade the light to 100%? Or will her presence nullify that?

Here are the pistons in question.

I also have another piston that is set to turn on my living room and kitchen lights when either of our phones presence changes to present starting at 1 hour before sunset and only if either of our phones presence has not been present for at least 15 minutes. This will keep the lights from coming on if we are already home in the evening and open the front door for whatever reason, but will turn the lights on when either of us are the first to get home in the evening. What do you guys think?


#2

For the first piston i would make it a lot simpler.


Mine is a dimmer also so just change 100% to 60% for your use case.
If you want to use the set piston state then you need disable automatic piston state.
If you are unsure what piston state does, leave it in, run test and then look at your dashboard for you pistons. :wink:
You can import mine if you wish by using the code.
I would think your second piston should work OK. but you might also want to put in a time restriction so that it doesn’t come on during the day.


#3

For the third piston i would try the following.
IF
Time is between sunset and sunrise.
Then the rest of your statements.

ELSE
WITH
Your Lights
Turn Off


#4

Thanks for the response!! I’ll do as you suggested and see how things work when I get home.


#5

So some of these pistons weren’t working quite right last night. After doing some more reading on here I realized I wasn’t paying attention to my “if” statements. I had all sorts of triggers and conditions combined and expecting each of them to subscribe, which obviously didn’t happen. So I reworked them with the goal of making them simpler, and paying close attention to my “if” statements to make sure #1 I didn’t have more than one trigger, and #2 if I had a trigger AND condition(s) I switched the condition option to always subscribe. This seemed to work, but I’ll have to confirm tonight. Here are the re-written pistons.