CoRE - Get peer assistance here with setting up Pistons

When “Someone Arrives” I want the garage door to open all the time, when “Someone Arrives” and it is between 9PM and 11PM (for example) I want turn a light one. It can stay on until I turn it off. BTW, you just made post 3000 in this thread.

1 Like

@whoismoses

I would do this.

Using a basic piston

 IF 
 Someone arrives (when true - open garage door)
 And
 Time is between 2100-2300
 Then
  Using light. (tos - cancel on piston state change)
         > turn on
         > wait x minutes
         > turn off

What is an example that you would use the Follow-Up piston in?

This is my outdoors light piston - it combines variables, Switch, and follow up. It didn’t have to, but I tested the Switch this way. I could have simply put all the tasks in each individual ELSE IF condition (when true).

During the months of September and October (well, should be October only - but again, I tested with it), the light gets turned on before sunset, then it changes colors and then follows up with itself to continue the color cycle.

3 Likes

I use it here to create a controllable loop to change the colors of my lights.

1 Like

Hmm, I was following the first one and it made sense. With the new one, I am a little confused as to how to follow it logically.

  1. Its a dimmer but are you suggesting I use a switch instead of a dimmable switch? If I am following correctly, this would mean the switch would have to be all the way off in order for the nightlight to work? I am only saying this because sometimes my family (well most of the time) uses the actual switch plates on the wall and hardly NEVER turns the lights all the way off. (GE 12724)

  2. Using switches instead of dimmable switches eliminates the need to set greater than or equal to values? On is on no matter what level even 5% which is basically off for my family! So if the light is on say 30% and I change it to 70% it will not change that value until it waits 2 minutes and then if it doesn’t sense motion, it turns off.

  3. If 2 is correct then even if family turns down to 3% (thinking that is off) and after the 2 minute wait period, it shuts off if no motion is active then that fixes #1!

  4. The motion sensor is from an alarm system. It’s hardwired and the active periods are very short. So does wait 2 minutes mean, do not evaluate until after 2 minutes or does the 2 minutes reset every time motion is sensed?

  5. I have an iPhone 6+, how do I take a full screenshot like the one you did above?

Thanks a million for your help!!! I would have NEVER figured this out with the route I was going. But just this small experiment is helping me work through the logic. Pretty cool stuff!

The problem I had with the first one is that the light will turn off after 2 minutes, no matter what.
The second one fixed that.
But, the second one doesn’t work for the family.
So, hold on while I make a third one with the new data.

Ok, try this…

Logic flow:

If the dimmer is 30% or less and the motion sensor is active the light will be set to 30%.

But if, the light is on and motion stops it will turn the light off after two minutes.

This means that if the light is above 30% (when you manually change it) then it will not reset to 30% until after it had dropped below 30%. And once motion stops it will turn the light off after 2 minutes no matter what level it is at… unless motion resumes within those 2 minutes, then the light will stay on.

This makes a lot of sense to me. Less than 30% “includes” off right?

Also the “wait” variable means monitor within the 2 minutes? That part is a little confusing. Seems like wait would mean disregard everything in between. (By the way my brain thinks) <----not the best brain by far!

  1. How do you quote? Don’t see it just the reply which excludes quotes.

  2. Any idea how to capture full screen like you did above?

Finally, YOU ROCK!!! Thanks a million. This stuff is soooooooooooo freaking cool!

You quote by highlighting the text and the little box will appear. Sometimes you have to do it more than once.

Yes, less than 30% includes off.

You capture the view I did above by going into settings in CoRE and enabling expert mode. You then enable the dashboard. And you tap on dashboard, choose your piston and it looks like that. Then do a screenshot.

The two minutes is just a timer to turn off the lights. Without it the light go off as soon as motion is inactive.

Cool! This will help me for all of my other lights. Is there a way to “copy over” a piston? Would love to be able to copy this and just switch the lights and sensor for all of my lights and get rid of SmartLights altogether.

Got it!

So to be super duper clear, the timer resets every-time it motions starts again?

Would latching be the best for a basic motion on/off light (dimmable) as well. i.e. 24/7 closet light.

I also want to set up some lights that if, are turned on and no motion for 5-15 minutes turn off. I believe with the knowledge I have gained here, I will be able to do this easily.

Thanks again.

I use the latching piston almost exclusively… probably 90% of my postings are latching.

I haven’t tested this piston, so if something doesn’t work right let me know and we will work it out. [quote=“rontalley, post:3040, topic:50187”]
Thanks again
[/quote]

No problem.

I am really new to this so bare with me…How do I get a WHEN TRUE action? I do have the first part in a group but I don’t know how to incorporate the WHEN TRUE action?

Enable Expert Mode in CoRE’s settings page

I have it enabled but I can’t see this.

When you edit the IF or the BUT IF, you scroll below the conditions and there should be the when true and when false sections. Maybe go all the way out of CoRE and go back in?

OK I think I got that part in but because it is in a group I have the OR and AND already filled. Where do I add another OR for Motion is Active?

You can only have AND or OR, so the group within your first IF group, tap OR and it lets you change it, or in the IF group (not second group) click the AND and it lets you set it to OR.

EDIT: adding another condition at the right group level is all you need to do for another restriction/trigger.

But I have to have the two times have an OR between them which means that the next condition is an AND, right? When I try to add another condition it automatically puts it as an AND and I can’t change it.

You can’t mix OR and AND in a group. So if you need multipe OR or AND validations, you create multiple groups:

If
((Time is between xyz
or
Time is between zyx)
AND
(Hall Motion Sensor is active)
or
(whatever else)
AND
(make it up as you go)
and
(this part too!))

So you have to plan what actions require OR and AND and then group them the best way you can think of to make it all come out right. So this (very poor) example has a primary group of AND’s, then two sub groups of OR’s and one of AND.