[Released] Rule Machine 3.0

It would be great (maybe in a future release: like 3.1 :wink:) to have a way to know which device triggered a rule when using multiple triggering devices as condition

Let say I define 3 sensors in a rule condition and in the action section I put:
If sensor 1 detected motion, do something, if sensor 2 detected motion do something else...
(Something similar to "$currentEventDevice" in WebCore)

That way, instead of having to create 3 rules, we would need to create just one :slight_smile:

And at the same time, implementing something similar to WebCore "$currentEventValue" would also be incredibly useful.

Keep up the good work.

These values do exist and you can put them into a variable. You reference them as %device% and %value%. So you will be able to do this in 3.0.

2 Likes

You just made my day :smiley:

Let's hope we'll get 3.0 very soon...

This looks fantastic! Thanks @bravenel - a lot of consolidation will be taking place!

Can you trigger it today please?

1 Like

I am the only one who, while reading this, found themselves going:
yes.....Yes....YES....YES!!!.....YES!!!!.....YES!!!!!!

I felt like Meg Ryan over here!
tenor%20(1)

@bravenel, I did have one question about timers:

Does this mean that if I have 3 actions, each with 1 second timer, that the actions will be separated by 1 second (1 second delay between each action) or that all actions will execute after after 1 second? Visually this would like like

A) Separated:
1 second
Action A
1 second
Action B
1 second
Action C

or

B) Common Start:
1 second
Action A, Action B, Action C

Amazing job. Looks like a huge leap forward for the platform. Congrats. I'm sure it's been a lot of work.

UPDATE: Answered my own question thanks to theHubitat Live event, which I missed because of work (stupid job). The delay on the action is independent of the other actions and each start on their own (basically B). But there are Delay actions, so you can also get A too!!! Just like picking a switch to control, you can select a delay of a specific duration. So, you don't have to choose which you get, you can do either one! Mind blown!

Can't wait for 3.0! Nice job doing it live with that speed as well. Finally I can get rid of that grumpy old man image of @bravenel. He was super cheerful on the show :grin:

8 Likes

Yeah he needs to turn the grumpy up a bit when on camera :grin:

Oh, and nice coffee mug @mike.maxwell :rofl::rofl::rofl:

5 Likes

I'm sure you are right, and I'm missing something.

But I still don't get this, though... Because they also emphasized that the actions are now performed "in the order listed" (a change from previous releases).

How are they performed in order, if they all start at the same time like your B? How are they in the order listed if each action delay timer starts at the same time?

If the delay on action 1 is longer than the delay on action 2, does that mean action 2 actually executes before action 1???

And how would putting a delay action in between put them back in order / delay between if each action start 'timer' begins at the same time?

According to @bravenel the script is executed in order no matter the action. The part that is most interesting is that in the live video he mentions that a delay can be an action. So this brings additional flexibility to your rules.

So think about it this way....your conditions (T/F) will execute an a-sync script that you design. Each action in that script will be initiated in order. If an action has a delay to execute 10 mins after the script starts then 10mins from now that action will begin. The second action will execute immediately after the first action has been called even though it may not be completed.

Now the fun part right? Add a delay in the action list and that delay prevents the next action to occur until that delay is finished.

So example:
Condition: garage door opens
True:

  • Turn on abc lights with a delay of 2 min
  • Unlock interior door with a conditional delay of 3 min
  • Delay for 5 min
  • Play TTS welcome on Sonos Speaker
    False:
  • Turn off abc lights with delay of 30 secs
  • Lock interior door
  • If (garage door open)
    Close garage door
    While (garage door open)
    Delay 30 secs
    If(garage door open)
    PushOver (garage door open)
    Endif
    Endwhile
    Else PushOver(garage door closed)

In essence RM 3.0 has the opportunity to be very robust and yet also very complex.

This will be cool!!

1 Like

You may be right (and that is the way I think it should work), but that is not what Bruce said earlier... He specifically said:

That is not the same as what you said...

No big deal in the end. I'll thoroughly test it out when it is released + 1 week (have to wait for the inevitable hot fixes that come out every release before upgrading :slight_smile: ).

I never truly stated one way or another on actions with timers and execution timeline. Also the post is older than what he said in the live video feed last night. So there is a conflict of information or lack thereof.

I haven’t been blessed with fooling around with the new version as I don’t have a dev box and am not on the beta. But based on what he showed and said in the video represents what I wrote above in my example of how it might work. Watch the video and let me know if you think otherwise.

He posted that AFTER the Live session to the question I asked AFTER the Live session. The Live session was Thursday night, not last night.

Again, no big deal. It will all be known soon enough, and we won't need to speculate. :smile:

No matter what, the changes and improvements are going to be AWESOME!

1 Like

Yes, but in addition to the individual delays you can assign to actions, there are also Delay Actions you can select. So, if you wanted to open the garage door and then arm HSM then wait 10 seconds and then turn the lights off you could do this:

  1. Open garage door
  2. Arm away HSM
  3. Delay 10 seconds
  4. Turn off lights.

Because the delay is another action you can pick from the list you could have delays built into the order of the actions.

Yes I have my dates wrong. I thought it was yesterday as I watched it last evening before bed. Then idk what to make of it yet.

@bravenel does RM3 do what I outlined above or is there a special quirk we need to be aware of?

I get that. But if the timers for delays on actions all start at the same time, what does that mean in a scenario like:

  1. Action 1, delay 30s
  2. Delay action 2 minutes
  3. Action 3, delay 10s

If the delay timers on 1 and 3 "start at the same time" wouldn't timer on #3 expire before the delay in #1 or #2 completes? Thus making no delay on #3?

It is Bruce's comment that the action delay timers all start at the same time that is throwing me off.

I don't believe that is a valid combination. Why would you have a delay on the action and an action delay in the same sequence?

I think that is a perfectly valid scenario that the rule would let you build. But to get off that point, here is the same scenario:

  1. Action 1, delay 30s
  2. Action 2, delay 10s

If the delay timers on 1 and 2 "start at the same time" wouldn't timer on #2 expire before the delay in #1 completes? Thus making no delay on #2?

No...in this scenario, action 2 would happen 10 seconds after the trigger and action 1 would happen 30 seconds after the trigger.

1 Like

Yes it is. That is exactly what he said. He said all the timers start at the same time.