CoRE and Piston Rules Engine, first design steps

This will be fixed in v0.0.061 (not released yet). Something BIG is coming.

3 Likes

Didnt monitor this afternoon and I am mow able to see the scheduler timers associated with the invoking statement - all I have asked for. Awesome - blown away - donated cheers!!! Keep the good stuff coming.

1 Like

After posting this in the wrong thread, here goes:

Okay, here’s the BIG news. v0.0.061.20160602 - Alpha test version - Minor bug fixes. Introducing the Follow-Up piston. Chain them together, delay them forever, do whatever you need with them :slight_smile:

Follow-Up pistons are just like the Simple pistons. The only differences are:

  • does not support triggers
  • does not subscribe to anything

They can be initiated from other pistons via the Follow up with piston task. This task can be delayed just like any other using the Wait task in front of it, so you can technically say "IF (this) Then (that) Else (wait 5 min, follow up with piston).

Even better, you can follow up with the piston over and over… the follow up piston can follow up with another piston, even itself. Combine that with a global variable counter and you can have a complex solution where something initiates the counter, does things and follows up with a piston that can follow up with itself x times until either your expectations are met, or the counter hits 0, hence giving up… I guess, unlimited possibilities :slight_smile: Enjoy.

5 Likes

Thank you :slight_smile:

Where would one donate? I’d love to show my appreciation…

1 Like

@Kevin_Prefer

When I get to my phone, Ill be donating too!

1 Like

Thanks for adding the dashboard, it works great.

Do you think at some point you might be able to add a formatting option for variables?

Examples:
{someDate:MM/dd/yyyy}
{someDecimal:#}
{anotherDecimal:#,##0.00}

2 Likes

LOL - I’d have to invent God Mode for that… way beyond expert :slight_smile:

UPDATE: I should call this the my-momma-is-an-expert-and-I’m-better-than-her mode.

1 Like

Bam! Done. Use v0.0.061 LOL - I am so happy I decided to go with hexadecimal, or else I’d be running out of numbers 000-999… LOL Chrome and Firefox are eating dust…

1 Like

Follow up to this. When I create a new piston and hit “Done”, it goes back to the CoRE “home” page and not to the SmartApps page. And eventually the new piston shows up in the list, so that appears to function as expected. It’s only when you tap “Done” on an existing piston that it skips back over the “home” page to the SmartApps page.

I gave this a shot and received “You cannot currently add this” I believe it was.

What can’t you add? Hold on, making some changes to the follow up. Will allow any piston, ask for delay, and possibility to return resulting piston state to a variable. Also adding Execute piston which would not have the delay. Also, follow-up pistons should not schedule time events. It does as of now, bug.

[quote=“chickwebb, post:2487, topic:46546”]
When I create a new piston and hit “Done”, it goes back to the CoRE “home” page and not to the SmartApps page.
[/quote]Just to add my $.02… I am certain this was new behavior, beginning roughly 7-10 days ago.

I’ll look into it. Got an Android tablet that acts like that.

Meanwhile, updated the Follow Up to have a delay and a variable too. So if anyone used that, please revisit that task.

Also added Execute piston (which does an immediate execution on the piston and can return the new state)

v0.0.062.20160602 - Alpha test version - Updated Follow Up and added Execute. Not fully tested yet.

1 Like

Hey guys what would be the best way to create a piston that will wait for my lock to be unlocked for at least 5 minutes before triggering any actions?

You can start with a condition…
If lock is locked then
Using devices
Wait 5 minutes
Do stuff
Cancel on piston state change

1 Like

Thanks for the quick fix. Looks good on my end. But my end goal of triggering on global variables may not be necessary with the new “Follow-up” pistons. I’m still playing around with those.

Thank you @ady624 I knew I was missing something!

1 Like

This:

You need to update the code. And it’s probably saying that because it was (at first) only allowing Follow-Up pistons and you haven’t yet created any. The latest version allows you to “execute” any piston. Execute is immediate, whereas Follow Up allows for a time delay (built-in wait). Also, the “Follow-Up” pistons never run on their own, only when executed by other pistons.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.