Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support

Thanks @bravenel for the quick reply. That’s what I had before but I think yesterday had me guessing about whether my rules were screwy or the cloud - I’ll make sure everything is back to delayed off - cancelable any give it another test.

@bravenel I just want to thank you for writing this app. You have single handedly solved about 99% of my programing issues and problems. ST just became exponentially more useful with this single app.

Do you have a donating page? I would really like to compensate you for making my life easier.

1 Like

OK, Github integration is now live. Here are the links for Rule Machine (save and publish for me) and Rule (save, but don’t publish)

https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy


https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy

4 Likes

Could you explain what github integration is? The way I currently update every rule machine update is how Bruce has told us which is copy and overwite over the old code and save. With github integration is that done automatially? If so, how do you set that up?

I could be wrong here (I’m still coming up to speed on all things Github too), but, unless you do a pull request back to the SmartThingsPublic master, you’re code won’t be included with everyone else’s, and since Github integration in the IDE relies on a single repo (in my case, guywmartin/SmartThingsPublic), I can’t have your code in the github integration unless I fork your copy of SmartThingsPublic - whereas, I think we’d all prefer to fork the SmartThings/SmartThingsPublic so we have access to the whole community’s code as well as yours.

@slagle - is this an accurate assessment?

Thanks.

1 Like

I believe that one thing you could do is in the STs IDE with Github integration already setup, click “Settings”, then “Add new repository” and type “bravenel” as owner “SmartThingsPublic” as Name and “master” as Branch.

I hope this helps out.

2 Likes

Quick question @bravenel

In the beginning you had mentioned support for opening/closing garage doors. Is that feature still being planned?
I’ve add support for it myself in previous versions but having to manually create it prevents me from updating right away when you release your new versions.

Thanks again for all the great work!

Thank you so much for this. It was exactly the kind of logic-based programming that I wanted for Smarttthings. thank you thank you thank you

HaHa, you’re very welcome, my pleasure!! You should share some of the automations you come up with. :grinning:

Yup… I didn’t see the ‘add extra repositories’ originally, and since I’d followed the original directions that ST provided, I’d forked the SmartThingsCommunity/SmartThingsPublic repo, which hasn’t integrated @bravenel’s pull request yet to put his stuff in.

So, I created SmartThingsPublic as a fork of Bruce’s fork, and all is good. Not exactly elegant, but it does the job. :slight_smile:

I have been thinking about this, and I think it is possible. I can see how to do it in the UI, so it’s just a matter of a working it out in the code. I will look at it further. Stay tuned. BTW, good idea!

A question for anyone, @bravenel is too busy creating magic :smile:
In this screenshot it want to confirm that the presence rule is an implied OR. When I come home the rule opens my door etc. but when my wife comes home the TRUE is never triggered. The logs show her fob arrival and everything looks good with ST; her status changes to “present”.

Yes, any present is an OR

That’s not good, Houston I have a problem :wink:
Condition isn’t very complicated so maybe I will have to create a separate rule for her temporarily until I puzzle this out.

I think your problem is that once one of you comes home, the rule is true, and it doesn’t change state again. If you want the same action to take place when either of you comes home, even if the other is already home, you need two rules, one for each of you.

And, oh by the way @daven, you can do this with a Trigger (see Trigger Happy) instead of a rule. You only need one Trigger for both of you, using Any as you did in the rule. When either of you arrive, it will trigger the action. It won’t care if one of you is already home.

1 Like

So that makes OR a useless boolean for collections in a lot of instances? I would expect RM (or ST?) to see a state change and then evaluate the rule and take the appropriate path to TRUE or FALSE. You indicate its operation outcome is predicated on the pre-existing state and won’t evaluate the rule due to the retention of the rules previous logical outcome? In object oriented situations the event is eventuated against a set of rules (procedure and functions) no matter what the pre-existing state, at least in VB anyway. I shall try to think a little differently when creating rules if this thinking is correct.
I’d use Trigger but I have lights that come on and delay off as well so I think that mess is handled better by RM.
Thanks for your input and skills!

You are misunderstanding what I said, and by inference, how Rule Machine works. Rule Machine only takes the selected actions when the state of the rule truth changes, by design. Rule Machine looks at the state of all of its conditions every time one of those conditions experiences any event. That means, many times when the rule is evaluated, it will be seeing the same truth as before, because many devices report things over and over (e.g. temperature, power, energy). So Rule Machine takes action when the rule truth state changes. To do otherwise would make no sense.

Trigger Happy has both the lights-on and delayed-off, just like Rule Machine.

If you have a Rule that has only 1 condition, and that only has Action for True, that Rule is actually just a trigger based on the state change of the condition. That’s what Trigger Happy does, is fire off actions based on state changes of devices, for example, presence arrives, or presence leaves. Incidentally, Trigger Happy offers many more actions than Rule Machine, because those extra actions would make no sense for a rule evaluation to cause.

Actually, I have a rule very similar to this. Me, or my wife not present, and after dark. Truth is empty. False is turn on porch lights.

While I am at work my wife will leave and come home. The lights do their thing. They also do it when I come home later.

1 Like

Ah, the negation of the rule logic. Nice!

You could still do it with a trigger. :grinning: Of course, then you’d have to invert the condition for it to work.