SmartThings Community

CoRE and Piston Rules Engine, first design steps

core

(Daniel) #3536

I am implementing a simple Motion activated light. Basically, if motion is detected OR if the light is Turned on manually, then IF no motion is detected for 5 minutes, then Turn OFF. These two pistons seem to do what I want. Is there a preference for one vs. the other (maybe less demand on the Cloud)?


(Eric) #3537

Having an issue with a piston triggering actions when a global variable it is not subscribed to changes. The global variable is @presenceSakowski , and the piston is only set to act when @timeMode changes. Let me know what you need if further investigation is required.

7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Scheduling actions for condition #-1. State did NOT change. 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Scheduling actions for condition #0. State did NOT change. 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ ♠ Function eval_cond_is for Ashley's presence [not present] is 'present' returned false 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Scheduling actions for condition #3. State did NOT change. 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ ♠ Function eval_cond_is for Home's variable [Daytime] is 'Morning' returned false 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Primary IF block evaluation result is true 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Scheduling actions for condition #2. State did NOT change. 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ ♣ Function eval_cond_is for Eric's presence [present] is 'present' returned true 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ║║░░ Scheduling actions for condition #1. State did NOT change. 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: trace ║╚══ Processing event variable, value @presenceSakowski, generated on Sun Jun 12 15:21:34 UTC 2016, about 90ms ago (v0.0.086.20160611) 7d815687-68df-426a-97ac-00c2be2fbaef 10:21:34 AM: debug ╚═══ Received a primary block device event


(Rick S) #3538

@ady624

Now that most are using the Dashboard to post pics of their Piston, can you add the Piston type to the Dashboard? Maybe put it behind the first If or someplace easily seen

Thanks again for everything you have done, great app :slight_smile:
Rick


(Jason "The Enabler" as deemed so by @Smart) #3539

Rick, It’s already in the dashboard… Look closely :eyeglasses:


(Rick S) #3540

Yes I see that on the main Dashboard, but not once you enter a Piston which is where we grab our screen shots, maybe I am overlooking it

:sunglasses:
Rick


(Jason "The Enabler" as deemed so by @Smart) #3541

Fellow CoRE enthusiasts… Let’s keep this thread to the alpha stage development and for troubleshooting bugs…

For piston questions and programming please post your questions here.

This app has grown exponentially and we must, for sanity’s sake, keep things in some kind of order.

Thank you


(Jason "The Enabler" as deemed so by @Smart) #3542

Gotcha! Yeah, it says simple on the first page and then in the piston it’s if and then…

Oops…sorry bout that


( I hate Mondays) #3543

User modes. Dang it.

Here’s what I’m planning for:

Allow the user to add user modes in CoRE. Unlimited amount of user modes. Each user mode is described by a name and a list of possible values. So you can create a user mode called “Time of day” and give it values “Morning, Noon, Afternoon, Evening, Night”. Then via pistons, you can set your new user mode “Time of day” to any of the listed values. You’ll also be able to place conditions on the mode (restrictions will learn about these user modes too). Triggers will also exist to run a piston when a certain mode changes.

Any suggestions?


(Michael Hess) #3544

More Stuff?!?!?!?


( I hate Mondays) #3545

Yeah. More stuff.

v0.0.08a.20160612 - Alpha test version - Improved loop logic, providing the $index variable for simple loops and ensuring variable value during execution stage. Improved variable triggers during preauthorization.


#3546

XYZ output for drones… I have a couple of drones which I want to start flying in random XYZ positions around my home when ST is set to AWAY mode and when SHM armed. Now all I need is a small replica machine gun to be attached to the drones… :grinning:

With the rate CoRE is progressing, I am confident we will reach 22nd century very soon.


( I hate Mondays) #3547

Life support drones only. Seems legit.


(Brian) #3548

Love the adding of features but please keep a focus on intuitiveness too. Some of the best programmers I’ve seen can go overboard.

I love CoRE, keep rockin it Adrian.


(Jason "The Enabler" as deemed so by @Smart) #3549

Why use a replica?

With a fully armed drone… It is life support…


(Kevin) #3550

Any chance you can move the main “Remove” button to another page.

I had about 10 test pistons to delete and after about the 8th one I hit the wrong Remove button and lost everything. :sob:


( I hate Mondays) #3551

Sorry about that. Already moved it, but not published yet. Working on the … drum roll… three axis.


(Kevin) #3552

I only had a few good ones so it’s not that big of a deal, but thanks for moving it and fixing the looping index.


( I hate Mondays) #3553

v0.0.08b.20160612 - Alpha test version - Added three-axis initial support.

Use the “facet” attribute :slight_smile:


( I hate Mondays) #3554

Hint: to remove a piston, swipe left on the piston in the piston list. A remove button appears… A lot less scrolling…


#3555

@ady624

Wondering if this is intentional…

There is no way to select ‘All’ as the evaluation mode when the comparison is using ‘stays’ with two motion sensors.

And this seems to be always true and doesn’t turn false.