CoRE - Get peer assistance here with setting up Pistons

I have an ELSE-IF piston that is not working quite the way I expect. It sets home mode based upon two presence detectors; however, since I occasionally get false negatives, I want the departure piston to wait 3 minutes cancellable on piston state change before changing the mode to away.

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
ELSE-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

My logic is that if anyone comes home, and both are now home, the Set Mode To day or night. If the ā€œsomeone arrivesā€ trigger occurs, but the other person is away, then go into the ELSE logic. At that point, the piston knows that if one person is home then one is not.

The problem I noticed was that when Pres1 erroneously signaled ā€œnot presentā€ the second ELSE-IF correctly began the wait but, 60 seconds into the wait Pres1 returned, but the piston did not cancel. At the end of the 180 seconds, the piston executed the ā€œSet Mode To Pres1Awayā€. I want it to recognize it was a false exit because Pres1 returned so quickly. How would I force the piston to stop executing on state change? Thanks!

@Keo that is strange, youā€™re still battling that dashboard. Your pistons are working, right? Have you tried opening the dashboard URL on a computer or another tablet?

Fourth Of July!

Iā€™ve got two blooms and an iris to set up a scenario.
For some reason I canā€™t get it to work.

I want to control the scenario with a virtual switch.
At turn on -
Bloom one - red
Bloom two - white
Iris - blue

Wait 30 seconds, change colors

Bloom one - white
Bloom two - blue
Iris - red

Wait 30 seconds, change colors

Bloom one - blue
Bloom two - red
Iris - white

Repeat entire action

If virtual switch turns off, lights turn off, break loop

I canā€™t get any of it to workā€¦ Help!

@ady624 @SBDOBRESCU

I think you just picked the wrong time, you may need to wait for the next fourth of July to do that. I havenā€™t had one multischedule piston complete its run in 3 days. I think #Ticker is pooped out.

1 Like

That sucks! All of my scheduled have been working greatā€¦ Nothing has been missed.

But the only thing I have on a programmed schedule are my mode changes, everything else is on the fly and based on motion.

I donā€™t have the devices or simulated devices to play with but hereā€™s an idea. How about preloading your color patterns in a variable, then load it every 30 secs in a loop and one of the conditions in your loop is to check the virtual switch so it will break out of it.

1 Like

Iā€™m trying to load a global variable - @lracSetpoint - into the coolingSetpoint attribute of my A/C thermostat. I checked my logs, and it doesnā€™t seem to work.

Yes, if someone physically changes the fan speed at the switch I would like to pause the pistons. I will try this when I get home tonight. Can you elaborate on this though, because Iā€™m looking at CoRE right now and I canā€™t see how it differentiates between the physical switch or the piston changing modes on the switch.

In the condition or trigger, when you pick the switch, the last option is Interaction. This can be Any, Programatic or Physical.

Wondering if you guys can help me out Iā€™ve been trying to figure out the best way to use CoRE to do something and although it isnā€™t or shouldnā€™t be all that complicated I canā€™t seem to figure it outā€¦

I have some outdoor lights that I turn on at sunset at 20 percent (using Smart Lighting)

I would like to be able to fade the brightness up to max when one of two circumstancesā€¦ and then shortly after return the brightness back to 20 percent.

I would like the brightness to be increased when any of a group of presences sensors returns to the house and than return it to the base level after a set time (say 5 minutes at 100 percent).

I donā€™t have a problem with the first step however Iā€™m not sure how to best figure out how to return it to the base level.

I also want to increase the brightness when a motion occurs at one of two sensors and subsequently return it to the base level sometime after motions stops.

Once again I can figure out how to turn it up but canā€™t figure out how to return it to base.

Iā€™m controlling the time period of any action by using execution restriction of Sunset to Sunrise.

Thoughts?

Iā€™m doing something similar using a combination of Routines, Smart Lighting app and CoRE. I have a hallway light that turns on to 40% when someone comes home, using the ā€œIā€™m Backā€ routine or another duplicate one I created called ā€˜Second home arrivalā€™ (only difference is Second Home Arrival does not call a mode change). Smart Lighting tells this light to dim to 10% after sunset, only when mode is Home. Then I have a Basic CoRE piston that says If Routine ā€˜Second Home Arrivalā€™ was executed OR Routine ā€˜Iā€™m Backā€™ was executed, then using ā€˜Hallway Lightā€™, wait 5 minutes then set level to 10%. Only execute in Home mode, and only execute between sunset and sunrise. This has been working fine for me.

Are your Smart Lighting instances running local? I have similar set up but currently is broken. Was wondering if local sunset/sunrise is broken for everyone or just some ā€¦

How do I tell if itā€™s running locally?

Is it on this list?

https://graph.api.smartthings.com/localInstalledSmartApp/list

3 Likes

Yes, itā€™s on that list. I have 11 Smart Lighting automations set up, and it looks like 10 of them run locally. Thatā€™s interesting, what determines if itā€™s local or cloud?

Type of devices (only zwave/zigbee with stock handlers) and certain restrictions (using lux restriction eliminates the instance). Anyhow, so do you use only run between sunset/sunrise in any of these local instances? If you do, can you test one and see if it doesnā€™t happen to fire now?

I have two that turn something on at sunset (hallway light mentioned above and backyard landscape and pool lights). Iā€™ll check them tonight to see if they run. They ran last night.

Yup same here, I was asking you, if there is any way to check now. All of my Smart Lighting instances tied to sunset/sunrise run as if the restriction doesnā€™t exist. So I have lots of double instances one that runs before sunset and one that runs after sunset, and they both fire at the same time. Those that should be running only after sunset are firing now.

If Iā€™m understanding right, youā€™re looking for an action that triggers on an event but is restricted so that it only happens between sunset and sunrise, rather than something that triggers directly off of the time of sunset? Is this correct?

I have an action that turns on my landscape lights when mode changes to Home between sunset and midnight. I just manually changed my mode to Home, and the landscape lights did not come on.

Yup, thatā€™s what I needed to hear. Thank you. And thatā€™s a local instance, right?