CoRE - Get peer assistance here with setting up Pistons

I just got home from work. I’m gong to mess with this and I’ll post what I find out.

Why doesn’t the repeat stop when the piston is no longer true?

It would seem that the first should be for the entire piston instead of the action.

Yeah, but that repeats a whole action, not the condition, so it never checks any conditions. I am not yet sure why I added that, someone needed it… But there is currently now way to stop that repeat action unless you use another action on the same device somewhere else in the piston. That would cancel all. Wait, cancel on piston state change doesn’t interrupt it? That is perhaps a bug…

Ady and bamarayne, this is what I did and it works as expected. Thanks ady for the hint about the follow up piston.

3 Likes

Cool, you’ve got nice 4th of July lights :wink:

1 Like

I have 3 Lightify Garden Spots and 3 Blue Spruce in my front yard. I have one installed around the base of each tree, and this is what I do with them.

I did this, and it still doesn’t stop it.

It turns than if and they come back on after 30 seconds


Ok,
I’m confused… What is this piston you posted? Is it the follow up? Did you make only a follow up?

@eric182 thanks! This works perfect!

@ady624. Feature request… Please remove the retreat task function and this method can be used instead.

My opinion… While in beta, start weeding out the things that are causing problems and get rid of the stuff that can be easily programmed by the user. I believe CoRE is awesome, but I also feel it is bloated and should be streamlined a little bit.

@bamarayne: actually, it is a simple piston. Here’s the full screenshot. Sorry you couldn’t see the last screenshot. It’s my fault. Anyhow, it sounds like you got it working that’s great.



2 Likes

Does this IF - ELSE block look correct? I’ve never used them before, so odds are I’m doing something incorrect here.

Adrian- thanks for looking at this I used an ELSE-IF piston because I didn’t want to evaluate the second set of conditions unless the first set failed because one of the presence sensors was false (the AND “Each of Pres1 or Pres2 is present” condition).

Using a latching piston, illustrated below, the BUT-IF conditions evaluate if just one presence sensor leaves, so both WAIT actions begin and race to the 180s mark whereupon, they both execute their respective and contradictory Set Mode actions.

The ELSE-IF mostly executed the way I wanted, except the TCP did not cancel the piston when the presence returned, i.e. the WAIT continued and executed a no-longer-valid action. I expected the TCP to cancel the action if Pres1 returned during the wait period.

If any of Pres1 or Pres2 changes to present (trigger) 
AND 
Each of Pres1 or Pres2 is present (condition) 
AND 
      Time is Day --> set mode to day 
     OR 
      Time is night --> set mode to night
BUT-IF 
Pres1 is present --> Wait 180s, set mode Pres2Away (cancel on piston change) 
OR 
Pres2 is present --> Wait 180s, set mode Pres1Away (cancel on piston change)
OR 
Each of Pres1 or Pres2 is not present --> set mode AllAway

Having “each” in the primary if is what would cause the tcp not to work as it won’t evaluate the if as true unless that condition is meet, so only one presence coming/going wouldn’t trigger an evaluation.

Do multiple or groups in the if, one for each presence scenario you want to be true.

Anyone having luck with setting hue bulbs to different colors via automation? I’ve tried hue/sat/level, Color selection, and hue then sat then level. Usually I can get it to work as advertised the first time, but the second time it fails. Either doesn’t turn on at all, or comes on with the previous colors. I’m getting super frustrated. Ideas?

Yeah, I’ve got mine working great. What exactly are you trying to do? And which bulbs are you using? Are they connected to a hue bridge or directly to ST?

I’m using the Color A19s, connected to the Hue bridge and then to ST via Hue (connect).

Ideally, I’d like three lights (two on the driveway and one on the porch) to be warm white (4000K) every night…except on specific holidays, then I’d like them to light up in a pattern. Red, White and Blue for July 4th, all green for St. patty’s etc.

Ideas?

Need some help with global variables. I have been using local variables in most of my Pistons, but now I have tried using global variables for some of the cross Piston automation that I need to accomplish. I tried setting a device attribute to a global variable that I created, but it does not seem to be working. I also tried to load a value into the global variable but that didn’t work either.

At this point, I am not sure what I am doing wrong. Can someone help me set up a global variable that executes successfully, or show me an example of a working global variable so I can see if I am setting it up correctly.

This is what I set up for my blooms, but I tested it with my A19 bulbs to. It works great!

I haven’t had any issues. Global vars work just like local for me. I do recall there might be an issue with having to initialize global variables. I’d try that for each one and see if that fixes things.