A question about Rule Machine

I understand how to use Rule Machine to test if a door is closed before locking it. What I'm unsure of is if there is a way to write the condition once and use it many times. I use a few different scene controllers and key fobs to lock the doors. How would I go about making a "lock door" program that includes the check, and then point all those devices to the program. Instead of, including the door state check on each button device I want to lock the door with.

it is really more a question of Rule Machine etiquette and using efficiently.

Not entirely sure what you are asking, but would this rule work:

Triggers:
Scene Controller #1 Pressed
or
Keyfob #1 Pressed
or
Scene Controller #3 Pressed
or
etc...

Actions:
IF Front door is closed Then
Lock Front Door.
End-IF

I should have included that I'm using the Button Controller app for scene controllers. I guess what I'm thinking of is more like "robots" in wink.

thx

Create a "lock door" Rule doing whatever you want, with no Triggers.

In the Actions of each Rule you want to call it from, select "Run Rule Actions" and choose the "lock door" Rule.

2 Likes

Is there a way to "run rule actions" from the actions in the Button Controller app?

No, but there is a full featured version of Button Controller built into Rule Machine. Create a new rule, and select a Trigger Event of "Button device". That will give you the same UI as Button Controller, but the full functionality of RM actions.

4 Likes

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