[OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)

Yrs, I got it to work. I finally figured out that it was my dth causing all of my problems. Once I received the device and added the such dth it worked great.

2 Likes

So when using TOS Local, and Execute on Piston Change Only, I should not need TCP of Cancel on Piston State Change correct?

They don’t mutually exclude each other.

TCP is a way to cancel an already existing task
OEPSC is a way to prevent a new task from being scheduled
TOS is a way to cancel an already existing task WHEN a new task is added

2 Likes

Can you explain to me in words what you’re trying to do? And I’ll explain the piston you need with the reasons and all.

@bamarayne there was also an error in the “enters/exits” triggers where the old value was not properly cast to the right type, causing that JavaCast error. The numerical triggers need the previous value in order to work correctly (i.e. detect the entering or the exiting or the drop or the raise, etc.)

Ok, well hold on. I’ll try this with another meter that I did not reset the dth on.

That would be awesome!

My office has a motion sensor, smart light, a virtual “disable motion switch” and an Aeon power strip with virtual power outlets for each outlet I monitor.

I want my light to come on when there’s motion obviously, but because I have a workbench out of view of my motion sensor I don’t want the light to turn off if power is above a certain threshold which means I’m actually working in the room. Once power drops below 120w and there is no motion, it’s safe to assume I’m not in there doing anything, so turn off the lights.

I originally tried with two outlets, one specific to my workbench, so there would be two that need to be under a certain limit to turn off, workbench<40w and computer<120w.

I have a second piston, called Game Time that will dim my light to 1% when the computer is using over 165w and the disable motion switch is off.

Everything validates If and Then against the disable motion switch so if I flick that, nothing will turn on or turn off.

What I’ve got so far:

Mike’s Office:

Game Time:

I just changed the piston I posted above to a different power meter and it works with no errors.

I guess it wasn’t just the dth…

1 Like

oops :slight_smile: he he, me again!

Quick question: I’m trying to set up a GOODBYE piston that should activate when the last presence sensor leaves (becomes not present), or routine ‘goodbye’ executes. But when I write it, if I set all the presence sensors leaving as a trigger, they aren’t all executing at the same time…so I write them as a condition…no biggie. But, if I use the routine execution (only available as a trigger) in an OR statement for the first IF action, the conditions (presence) won’t be reviewed until the trigger (routine change) fires…correct? How do I write it so that when the last person leave OR the goodbye routine executes, the piston fires?

@Rigging65, try this:

(
  Any of presence changes 
  AND
  Each of presence is not present
)
OR
Routine executed

This way you get the presence to trigger as well. The condition makes sure you have a true result only if all are away. You can use “changes” or “changes to not present”, it doesn’t really matter. The condition is the one that does the magic.

Also, if you plan on running the routine and then leave the house, you may want to enable the Execute on piston state change only… this way you don’t run the THEN statement twice.

So you have a motion sensor and a power meter. Use OR between them, then AND them against the override switch:

IF
(
    Motion is active
    OR
    Power is greater than 120W
)
AND
Override switch is off

THEN
{your three commands here}

BUT IF
Motion is inactive
AND
Power is less than 120W
AND
Override switch is off

THEN
  Using light
   > Wait 2 minutes
   > Turn off
1 Like

So I don’t need the TCP or state change only toggled?

You should not because you’re using actions on the same device on both the IF and the BUT IF, TOS will take care of it. Experiment…

1 Like

Thanks. That makes sense.

This seems to work exactly as expected. Will update if I find any issues with it. Modified my watt values a bit to fine tune the delay’s. Verified all If conditions trigger the lights on and prevent the light from turning off if any are true. Once all But If statements become true, light turns off per the Then, and cancellation works perfectly.

2 Likes

Sorry bumping this for possible help. I’ve tried additional set ups for pistons and can’t get this to work.

1 Like

If you use the full dots (triggers), you shouldn’t use AND between them, as those are only true one at a time, as events happen. Where is the motion sensor? Outside of the door or inside? If someone goes to the toilet, what is the normal sequence of events you are seeing? Motion Active, Door opens, Door closes?

I have a simple task I want to accomplish. Run the Home Mode Routine when anyone of my monitored presence sensors arrives home or is home and the time is between 5am-1130pm. Or Run Home Mode when the garage door opens. That way SHM disarms when in Away Mode. I am also hoping this will work to change from Night Mode to Home Mode in the morning when anyone is present and that 5am condition occurs.
Here is what I am trying. Any thoughts would be appreciated.

Or If:

If anyone is present
and
Time is between 5am and 1130pm
then
execute home mode

Or if the garage door opens
then
execute home mode.

Well, now, there’s one to add to the FAQ!