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

Oops, I’ll fix the descriptive text location. I think you must have an “old” rule, to see it both places. I’ll fix that too.

Those are fixed now. Thanks!

Whoa, I found the bug. Turns out I wasn’t even testing dimmer level when I should have. A dumb mistake, omission, oversight, whatever. It’s fixed now. Please see if your rules work as you expect.

Version 1.6.4d on Github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy

2 Likes

All of my issues have been addressed. Utilizing the dimmer level of a virtual dimmer switch will allow me to eliminate lots of virtual simulated switches, keeping things nice and clean. Thanks again for the quick turnaround!

1 Like

This explains why I couldn’t get what you’re doing to work about a week ago. I was busy and didn’t dig into it. Evidently, dimmer level for a trigger never worked until today.

New to this SmartApp, just checking, as of right now, you can only set two different dim levels for devices? (Set these dimmers; Set these other dimmers).

Example, Set hallway lights to 1%, Kitchen lights to 70%, Bedroom lights to 40%, you would only be able to do 2 of those.

Not a request for the app, just asking for understanding, making sure I’m not missing anything.

1 Like

You are right. There is an easy way to add the third dimmer if you are using a rule to set dimmers (as opposed to a trigger), which is to create a trigger that is fired by rule truth of the dimmer setting rule. That’s a shortcut for copying all of its conditions. Then that trigger can set 2 more dim levels.

If you’re using a trigger to set 2 dimmer levels, you just need to clone its trigger events for 2 more in a second trigger.

1 Like

Bruce and Mike - just wanted to jump in and pile on my thanks. I’ve been following from the beginning and the feature list just keeps growing! Thank you so much!

I am barely scratching the surface but the power of this tool is self evident! Thank you!

5 Likes

I’ve been hearing about Rule Machine and Trigger Happy for a little awhile now but am just getting the chance to check them out. Very impressive, and simultaneously sort of strange/sad that the platform doesn’t support building rules natively. But I digress…

I’m still trying to wrap my head around the models and terminology in Rule Machine, and right now I have a use case that I haven’t been able to figure out how to to build. Hoping someone can help.

I have a set of switches (let’s call them group 1) that I want to turn on with motion from sensor A, and turn off after 5 minutes of no motion. I understand how to set that up in Rule Machine. However, if any of another set of switches (call them group 2) are turned on in the interim, I do NOT want the group 1 switches to turn off – they should remain on until turned off manually.

I’m probably stuck because the way I’m thinking about this…I think I need a subset of conditions for the “False” case (e.g. if the main rule changes to false – motion stopped – run the Actions for False UNLESS this other condition (any group 2 switches are on) is true. But that’s probably not the right way to go about this, so any insight would be appreciated.

IRL, I use this sort of arrangement in a couple spots in the house to provide “path lighting” if someone is just passing through an area (e.g. I’m just running down to the basement to grab a beer, I only need a few lights on to show me the way to the glorious beer fridge) which turn off by themselves. But if I’m going to stay in that area, I’m going to flip on some other lights, and then I do NOT want those few “path lights” to turn off after a few minutes.

I had a custom app that did this specifically (monitored the group 2 switches and canceled the scheduled turnoff event if they were activated), but it lacked the flexibility to mix in so many other conditions like Rule Machine does, so I’d love to find a way to do it here.

There are always many ways to do things, but one comes to my mind first is to use rule disable.

You haven’t fully described what you want, so this may not be it, but this responds to what you did say.

If one of the switches in group 2 will always be turned on when group 2 is on (in your case), then make that a disable switch for the motion-on/off rule. When that switch is turned on, the rule is disabled. That means the timer to turn off the lights will be ignored, and as you say, the lights will stay on until they are turned off ---- with a caveat, that if you turn off the group 2 switch, that would re-enable motion on/off for group 1.

If that’s not what you want, describe further detail… :grinning:

Yet another release of new functionality

Version 1.6.5 introduces the ability to set dimmers to the level of some other dimmers. The dimmers to be tracked must be a trigger or condition of the rule using “Dimmer level”, and any change of dimmer level of those, if for a trigger or if the rule proves true, will cause the selected dimmers to be set to that level that was most recently reported in an event to Rule Machine. For this to work the “Dimmer level” must be a trigger, or a rule condition, but not a triggered-rule condition.

I also brought back the action of “Turn on/off after a delay”, separate from the main delay section. The reason for this is so that your trigger or rule may do a set of actions when triggered, then turn something on/off later. You can use both the delay section to delay all actions, and the “Turn on/off after a delay” action in the same rule. What would happen is that all of the actions are delayed per the delay section, and then the “Turn on/off after a delay” timer would start.

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

4 Likes

Bruce do you ever sleep when your wife does? Or when do you get time to work on this stuff. I can barely keep up with your new functionality. Amazing work!

1 Like

Bobby,

I just poke at it. The track dimmer bit is 7 lines of code, all of which were obvious. I mean, how long does that take? How long would the design meeting to discuss it take?

:grinning:

5 Likes

Ahhh, if you talk about this at design meeting you can cover it quick, but if you talk how to fit v3 hub in a TV with a stick, you probably never get to talk about dimmers at all.

Ya, it’s clear where their energies are focused right now. From my perspective the platform has stabilized a bit from it’s storms recently. Like I’m really counting on that going forward. HaHa. Those guys have tough jobs, but I bet they are having a blast. I wouldn’t want to own load management…

3 Likes

Yes, that’s works great. Thank you so much, that was amazingly quick! Happy New Year!

Thanks again for getting this feature included so quickly, even if it was just 7 lines of code. So I’m trying to test this functionality and I can’t seem figure out how to setup my rule. I’ve tried several different variations and nothing seems to work as I would expect. Below is my latest variation.

Below is a screenshot of what I’m seeing in the logs.

I’m very certain this is a user error so thanks in advance on any guidance.

The problem is that you have the triggered rule, which means that only the trigger event gets a subscription, not the dimmer. Track dimmers will only work if there is a subscription to the dimmer to be tracked. That means it must be a trigger, or a condition of a normal rule, but not a condition of a triggered rule.

The log entries are from something else, not Rule Machine.

Ok, now that makes sense and I’ve got it working. Thanks again!

New version 1.6.6.

Mike Maxwell has extended the Expert Features of Rule Machine to allow multiple custom commands in a rule or trigger. See Mike’s post here:

As usual, on Github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy
Save, but don’t publish.

Also, update Rule Machine itself from here: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy
Save and publish for me.

Ok, so I may have been a little premature in saying that it works. I’ve setup the following two scenarios, 1 trigger and 1 rule.

The test trigger works as expected, if either dimmer changes the other dimmer follows. But the test rule doesn’t work as expected, if either dimmer changes the other dimmer doesn’t follow. But if I go back into the test rule in Rule Machine and hit done the dimmers sync-up.