Rule Machine - Order of Execution

This is possible now. Use Evaluate Rule, it offers a delay option. This works to run an Action or the actions of a Trigger.

Didn't see the option until I selected a rule... It's true you learn something new every day!

Thanks Bruce!

Is there a general scheme to the order of execusion at a high level? I would assume, just from anecdotal observation:

Notification Events
Switches/Dimmers
Scenes
Doors/Locks
HSM
Mode
Custom Commands/Other rules

But that is just a wild guess from my observations. Also, I'm not looking for super-granular detail. Just a 30,000 foot/Reader's Digest version. Trying to figure out if something will cause a conflict. Thanks!

Here you go:

capture devices
switch on
refresh device
poll device
z-wave poller dimmer
z-wave poller switch
stop z-wave poller dimmer
stop z-wave poller switch
toggle
flash
delay off
delay off cancel
switch per mode
delay per mode
push button
button per mode
track dimmer
set dimmer
set other dimmer
toggle dimmer
adjust dimmer
dimmer per mode
fade dimmer over time
activate scene
scene per mode
set color temp
color temp per mode
set color
garage open
garage close
lock
unlock
adjust fan
raise shade
lower shade
stop shade
adjust shade
open valve
close valve
thermostat
hsm setArm
set mode
player
toner
http get
resume rule
private Boolean true
private Boolean false
evaluate rule
rule actions
stop rule actions
pause rule
camera
notify
send sms
speak
media
switch off
restore devices
repeat seconds
repeat minutes
repeat hours
execute custom commands

1 Like

Wow....thanks!! It's interesting to see some of the noticeable differences with ST. Nothing bad, just different that's all. However, since I'm so used to the old way every time I THINK there's something wrong until I remember. It's that two seconds of "oh craa...nevermind" that happens every time. Thanks for the detail though.

Like what? Switch off moved, lots of additions.

In routines on ST my garage door always opened first in my goodbye routine...now it's much further down (almost last). SHM would be first or second and HSM is further down the list. Like I said, just little things you notice when you're watching it like a hawk (since i'm still debugging). In the grand scheme it makes no big difference.

Thank you for this list.
My issue, Vertual Switch "ODLLAuto" (Out Door Lighting Levels Automated) needs to evaluate prior to setting an unknown number of OutDoorLights to a level, often relating to the level of outdoor light.
I live rural, if it is dark, I need almost no light outside. When the day/night is transitioning, areas of my yard are darker than others, and it is helpfull to allow my eyes to adapt to the increasing/decreasing light levels. The same applies to the inside lights. Often coming from the wife's desire to just light up the night, with no requard to my eyes ability and need to adapt to the areas that are not lit. Minor issue, there are work arounds, and this is just presented as an example, not so much a request...
(this is the longest thing that I have typed since I switched to tablest. OTG for USB dongles and wireless mouse/keyboard combos!)

That order was for actions. Any conditions or trigger events by definition happen before actions. So if you had a rule with something about the level of ODLLAuto as a condition, that is going to be evaluated before any actions happen.

That explained why it works! Sweet.

1 Like

Can I extrapolate that Restrictions come before conditions and triggers? Private boolean being false, for example, means conditions or triggers are "ignored" (not evaluated) ?

Correct, Restrictions are the very first thing looked at, and if they are in effect, nothing else happens. Minor exceptions for resuming a pause, or changing Private Boolean, when those are in effect.

I have a GE zigbee dimmer switch (model ZB3001), in rule machine it does the following:
from off, if I dim to 100% it turns the light on.
from off, if I dim to any other % it pre-stages the light, but does not turn it on. if I then turn it on it will turn on to the correct %.
If I use rule machine to both turn the light on and set the dimmer (to a level lower than previous) in a single rule, the lights will briefly go full brightness and then dim back down.

It may be that this is best addressed in the generic zigbee switch driver, but would it be better if rule machine adjusted dimmers before turning on switches?

thanks

Set level will turn the light on if it's off, so there's no need to ever turn it on if you want the level adjusted to something different.

I guess I'm reporting a bug then.

When the light is off if I set level 100, it turns on.
if its off and I set level to any other level it sets the level, but doesn't turn it on. if I then manually turn it on, it will turn on to the correct level. thats what I meant by pre-staging.

What driver is this device using?

Generic Zigbee dimmer

is there a different device driver that I should be using? all my GE zigbee dimmers behave this way.

no thats the correct driver, I'll have a look at the one I have and see if I see the same issue.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.