CoRE - Get peer assistance here with setting up Pistons

That’s correct.

1 Like

I’ll take a crack at it… it’s harder to build a piston on paper lol. See if this makes sense. Also, I think there is probably a more elegant way of fading the level but I have not tried it.

IF PRESENCE-SENSOR changes to PRESENT AND OUTDOOR_LIGHT is ON
  Using OUTDOOR_LIGHTS
    Set Level to 100%
    Wait 5 minutes
    Set Level to 20%


ORIF MOTION_SENSOR changes to active AND OUTDOOR_LIGHT is ON
  Using OUTDOOR_LIGHTS
    Set Level to 100%
    Wait 5 minutes
    Set Level to 20%
    (cancel on piston change)

At the risk of sounding dumb (or being dumb), is there an equivalent in CoRE to “rule actions” in the old RM smart app? I’m overwhelmed… :slight_smile:

I’m pretty sure the follow up piston does that… But honestly, with the way CoRE is designed it seems you could do that within one piston

1 Like

Gotcha – I think you’re right. I need to fundamentally think differently about how I’m setting these up. My set-up in RM was driven by platform instability and headless rules. I should probably change the way I’m approaching this now.

Thanks!

Trying to replace the “Gentle Wake Up” app with a piston. Piston and log entries below. The final color is supposed to be “Warm White”. Any idea why this comes on, but never changes from the initial color?

Also, @ady624, I notice that the “transition to color” duration is limited to 60 seconds. That seems rather arbitrary (and short). Is there a good reason why it’s limited like that?

I could not agree with you more. That has been my biggest frustration. I’ve had trouble changing my logic process from RM to CoRE…

Good luck

@chickwebb.

I’m having the exact same problem with my blooms today. They turn on but absolutely will not change colors.

Here is a sample piston that does very close to what you want. I don’t do the fade-up or fade-down because my switches do that automatically. I have similar piston for my outdoor lights on arrival after sunset. The reason I like this way is if someone changes the lights, switch/level, it returns them to what they were before I arrived.

Fair warning - I’m just getting started with CoRE. I originally posted this question back in October, but CoRE didn’t exist then. I brought it back up this afternoon and CoRE was a suggested possible solution. I looked into it tonight and either I’m missing something or it’s not possible. I’ll try and explain it as simply and yet as detailed as possible.

My kids ask every day what to wear. They also love talking to Alexa and Ubi, so if I can leverage my house to do this for me, I’m all for it. Here’s how I see this working:

  1. Kids ask “Alexa, ask Smartthings what I should wear today” which is parsed through the Ask Alexa skill

  2. This triggers a CoRE piston named “what I should wear today”

  3. Piston does the following:

    3.1) Retrieves the high temperature for the day (this is where I’m stuck currently-all my inputs have a current temp input, not a high temp input)

    3.2) Compares that to approximately 4 temperature buckets
    3.2.1) Above 80 deg
    3.2.2) Between 65 and 80 deg F
    3.2.3) Between 40 and 65 deg F
    3.2.4) Below 40 deg F

    3.3) Depending on where the high for the day falls, return a statement about what the kids should wear to Alexa who plays it.

    3.4) If I can build in a rain/snow capability, that would be great too, but the temperature part is by far the biggest need.

Like I said, the biggest issue I have at the moment is bringing in a forecast and not a current condition. This may be too complicated or beyond the capabilities of CoRE, which I freely admit may be the case. If anyone can help me, I would be greatly appreciative! Thank you!

Brian

First thing that comes to mind is use the web request feature of CoRE, I have no experience with it yet so maybe someone more qualified can give you more tips. You can request the 5 day forecast from openweathermap.org or from other free sources. At first glance, openweathermap is capable of returning data in json format that CoRE then converts into variables.

1 Like

Thank you his worked out perfect

Maybe this would help?

Hope the link works, if not it was a search for high temp.

Your problem will arise at 3.3. AskAlexa and CoRE do not have a synchronous bi-directional communication channel yet, which means CoRE cannot return data to AskAlexa during the same transaction, and AskAlexa won’t be able to make Alexa talk out of the blue…

Copy. I was looking through everything last night and didn’t see anything obvious to report back out to Alexa, so I had a funny feeling this would be an issue. Looks like I’ll switch my focus to an Alexa skill. Thanks all!

I may be able to work something out with @MichaelS

2 Likes

Bring it on :wink: Always up for a challenge.

2 Likes

All of my pistons are working. I have tried opening it on multiple OS’s and devices. I only get a blank page.

I am wondering if something didn’t activate correctly because I attempted to enable oath and initialize the dash board when ST was having problems. (I wasn’t aware they were having problems until it’s too late)

I also see nothing in live logging as far as errors go.

Not sure what you’re getting at, but if you’re implying that it might be a platform issue, I don’t think that’s it. Pretty sure mine is a problem with CoRE or my understanding of it.

The bulb in this case is a Hue unit, BTW.