CoRE and Piston Rules Engine, first design steps

I guess “Using” it is. Not sure how 24 voters could vote 80/20 but, hey… it’s there. It appears that 19.2 people voted for “Using” and 4.8 people voted for “With”. If it were only 19 people voting for “Using”, we’d have 79/21. And if 20 people voted for “Using”, we’d have 83/17. But since we have 80/20, it must be that 19.2 people voted for “Using”. Is my logic correct?! :smiley: :smiley: :smiley:

2 Likes

I got the minimote working, pushing the h**l out of it now :slight_smile: Doesn’t seem to do anything though… I click buttons and nothing happens… wait… somebody needs to write code for that :slight_smile: bwahahaha

2 Likes

How’s this working for keeping the light on past 3 minutes if motion still exists? Still in RM mode with the cancel feature.

1 Like

It seems to be a built in feature. Which I like. I’ve never had a time I wanted the lights to go off while there was still motion.

So far, it’s running really good for me.

1 Like

When an action is scheduled to execute tasks, all pending tasks for the same action are unscheduled (deleted) and then the new tasks scheduled. There will be a configuration in the action itself to control this, but for now, default is cancel pending tasks.

NOTE: This is different from “Cancel on truth change”. Future tasks don’t get canceled because the rule was reevaluated as false. That’s another option… :slight_smile:

2 Likes

Thank you so much @Jonpho. I feel like I prefer using separate pistons anyway. Keeps things a little more controllable for me. I’ll give this shot today.

Any idea on the Smart Home Monitor? I’m not saying this is a CoRE thing, because frankly I don’t see the option in any other app either, but just curious if anyone has the answer to why you can’t trigger Security status changes (i.e. Arm Stay, Arm Away, etc.). I could just be missing it, but would love to trigger some of those changes from routines. One button to essentially put the house to sleep but always Smart Home Monitor seems out of the equation.

1 Like

Under actions, have you tried “Control location” and then add a task and then “Set Smart Home Monitor status”?

1 Like

So in RM I had like 5 rules setup to evaluate the outside LUX and adjust my living room lights accordingly. What would be the best approach with CoRE to accomplish this say:

Lux <500
Lux <1000
Lux <1500
Lux <2000
Lux <2500
Lux >2500 everything off

@Mike_Maxwell I do like your auto dimmer app but in my case I want the lights to just automatically come on without having to turn them on first :slight_smile: Thanks everyone for your help with this.

1 Like

A simple piston in Expert Mode with conditions like:

Lux less than 500 -->(when true)--> Using light Set Level ...
OR
Lux between 500 and 1000 -->(when true)--> Using light Set Level ...
OR
Lux between 1000 and 1500 -->(when true)--> Using light Set Level ...
OR
Lux between 1500 and 2000 -->(when true)--> Using light Set Level ...
OR
Lux between 2000 and 2500 -->(when true)--> Using light Set Level ...
OR
Lux greater than 2500  -->(when true)--> Using light Turn off

Seems like the best (easiest) approach.

1 Like

Thank you sir and one last question say no one is home and the home is in away mode do I just put that as a limitation on the device?

1 Like

That’s one way to do it. If no one’s home then what? don’t turn the light on?

You can use a Then-If piston. Primary condition is

Lux changes (trigger!)
AND
Home is not Away

the secondary (THEN IF) condition is the one above.

The reason you want the Lux in the primary condition is because the Then-If secondary does not get evaluated unless the primary is evaluated as true. Therefore, you want the primary evaluated when lux changes.

Excellent thank you.

1 Like

Yeah, I think I saw that, but no way to trigger from a routine button. Sorry, I didn’t explain that well. I see you can actually trigger Smart Home Monitor modes just fine, it’s the initial capability I’m not seeing. Nothing related to Routines.

So If routine “Good Night” (button pushed), also set Smart Home Monitor to Armed (Stay). So routines being the start to the equation, but it’s not treated as a switch, button or any other choice that I can see as of yet. But I never saw this in RM and routines themselves don’t have the option to choose smart home monitor, so that’s why I figured there might be a reason for this not being available.

1 Like

Let me get this straight, do you mean to say you want to push a routine button and CoRE sense that and do something?

Routines can change the Smart Home Monitor to arm/disarm.
CoRE can change the Smart Home Monitor to arm/disarm
CoRE can trigger things on Smart Home Monitor having changed.
Core cannot sense when a Routine executed. Haven’t even looked into this to see if anything can be done about it.

UPDATE: Core will be able to sense when a Routine executed. There is a way to subscribe to routine execution, it will be done.

Yup, that is exactly what I’m trying to do. Something to keep in mind, but like I said, I’ve not seen this done in any other app either, so I assumed there was a reason. I have very sporadic bed times so timing this doesn’t work for me, but I always push Good Night before I go to bed and forget to set Arm (Stay) :wink:

Do you want me to add this to Github as suggestion to check into down the road when you have “free time”? :wink:

1 Like

You can add it to github, no problem. But routines CAN set the SHM mode.

1 Like

@ady624 is there any way to delay the initial evaluation of conditions after a triggering event has happened? I am trying to determine whether our electric car has been plugged in by looking at the energy draw after someone has arrived. Since the arrival will trigger before the car has been plugged in it won’t work (unless I remove the trigger but then the piston will be running much more often than needed…)

1 Like

You discovered the one downside of having the parent app and the child app in the same app :slight_smile: Once you save the piston, all will be good.

any comment on the Philips HUE dimmed turn on/off @ady624?

as well as

1 Like

Will be available with the “Follow-Up” piston. That won’t subscribe to anything but can be executed by another piston. So you’ll be able to say "IF someone presence changes to present Using location > Wait 5 minutes > Follow Up with piston X

That piston will then do its job :slight_smile: and compare what you need to compare.

1 Like