CoRE - Get peer assistance here with setting up Pistons

Yes there is. Replace the Wait 2 minutes with Wait for state false. And you just did it again: you said “motion reports inactive”. Your piston is not really looking for that, is it? Then, the more complicated stuff you add, the harder it will be to grasp it…

This isn’t complicated. It’s actually very simple.

Motion starts, turn on lights.
Motion stops, cancelleable 2 minutes later lights go off.

Trust me, I grasp it.

Motion is active does not turn on the lights.

Is active IS broken.

@ady624

Please help me grasp it.

Please give me a detailed example (piston type, everything) to do this, using these devices…

Using 3 motion sensors (internal timeout 20 seconds), one contact sensors, and a light. The light will be at different levels depending on the mode.

I want to do this…

Walk in the room, motion is detected, lights come on. (The motion sensors can not see each other). I want the lights to stay on until motion has not been detected by any sensor for two minutes.

The contact sensor is an override device that triggers other activities.

Thank you

Latching piston:

IF
  Any of motion sensors is active
THEN
  Using light
    > Turn on

BUT IF
  Each of motion sensors is inactive
THEN
   Using light
     > Wait 2 minutes
     > Turn off

What about the modes?

For that use the mode restriction per task. Each task has a Only for these modes parameter as the last prameter. Add several set level tasks and assign each to one mode:

Using light
  > Set level to 100% (only during Home)
  > Set level to 50% (only during Evening)
etc.

Ok, what about the override switch?

Well, ehat do you want it to do?

I want it to turn this piston off

Piston restriction - only when switch is on or off, your pick.

Ok. I’m going to build this and post it here when I’m done. Thank you.

2 Likes

You’re most welcome :wink:

1 Like

@ady624

Ok, here it is. It took four pistons. My goal was one piston. But I suppose simplicity is best.

1 Like

You should be able to combine them into one if you wanted to, but you need the conditions for on and off there. Maybe a basic piston with everything OR’d. The piston type is relevant when you plan on using the piston state to cancel stuff. You are okay without it. But building this latching piston made the logic flow easier, didn’t it? :wink:

1 Like

I had it all in in one using a then-If piston. But nothing worked with the motion sensors set for “is active”. It only worked with “changes to active”.

And what’s really strange is I have the same build structure in another room and it works perfectly… And has been for weeks. The only problem with the older piston is there used a big lag quite often.

So, I’m fining to see which way is faster… The then-if or the multiple latching pistons.

Yes, the flow was much easier, but that’s because I separated it into four.

I’ve had two pistons now that were “right” but didn’t work correctly. I recreated from scratch and they mysteriously worked. I don’t think it’s a CoRE thing but a UI thing where it’s not setting everything correctly. I’ve started hitting done twice when I get the error after entering a condition, and I haven’t seen the issue again. One of them was similar to yours were even though it was a latching (all of mine are) the IS for a motion sensor either didn’t work at all or reported the reverse of the truth.

2 Likes

Thanks. I’ll work on that aspect.

Wanted my garage door close if open longer than 3 minutes, but I found another smartapp to do it.

Wow. I was just getting the hang of RM.
Thanks to all the devs/peers for working on this.

I’ve installed CoRE and created a basic piston- Motion at X turns on Y. Yay.
It looks like I have a pretty big learning curve now.
Anyone care to help me build my first functional piston? Figuring out the piston type needed is my first hurdle. I don’t see how to have multiple if/else statements in one.

I want to change modes based on presence and time of day, like this:

IF presence is false,
THEN switch mode to AWAY
-OR-
IF presence is True
AND time is between 5AM and Sunset
THEN mode switches to Home Day

ELSE IF time between Sunset and 10PM
THEN mode switches to Home Evening

ELSE IF time is between 10PM and 5AM
THEN Mode switches to Home NIght

Once I wrapped my head around it, yeah. I think a lot of people that were using RM are having some difficulty making the transition. While the two apps are similar in terms of what they’re trying to achieve, the way in which they do it is pretty different. CoRE’s approach takes some getting used to.

4 Likes