Converting from WebCoRE

I'm pretty new to Hubitat, and I'd like to think I know a bit of what I'm doing, but I'm running into issue trying to translate some of my webCoRE automations to Rule Machine. I'm guessing it's something I'm overlooking, or overthinking, or I'm just not thinking the right way on how to do things. If someone can help set my thinking right, I'd appreciate it.

One particular rule that I use a lot is time-based lighting automation. For the basics, I think I got that down. Right now, I'm making two rules. One for on and one for off. I know with webCoRE, I could combine the two into one rule, and maybe I could here but I don't know how to best do that. What's really tripping me up though, is an exception for Halloween. A few of my rules use a different "on" time based on if it's October 31 or not. What's the cleanest and most understandable way to set that up? I'd include an example, but it seems my account is too new to post images or links.

Have you read the Rule 4.0 docs? I know it sounds boring, but there are a bunch of examples there, including screenshots of what the final product would look like. (There is some explanation of how to convert from Rule 3.0, which you can ignore, but the primary changes in 4.0 were geared to--not in their words but this is effectively what it did--make RM more able to create the type of automations that were once the exclusive domain of webCoRE, custom apps, or complicated chains of old rules.) There's also a thread dedicated to showing off examples of Rule 4.0 rules with some explanation of what they do, generally more complicated than ones you'll see in the docs: RM4 - List of example rules.

I would start the above; beyond that, it's hard to give specific advice without seeing what you're trying. If you still want help with that, you could try typing out your rule trigger and actions (hint: use the "preformatted text" option in the toolbar after typing and selecting your text to preserve spaces used as indentation and generally make the rule, particularly the actions, easier to read). Otherwise, you should be able to post images shortly--I think your account has to be so old and have read so many posts for this to happen. Welcome to Hubitat, by the way!

For the specific question you asked: like some other apps, Rule Machine used to have a feature called "Restrictions." These were removed shortly after the introduction of 4.0 because you're now able to do all of that in your actions with conditionals. See: Rule 4.0: Retirement of Restrictions if you're curious for more here, but you probably don't need to unless you see examples of old rules that had restrictions; you'll see plently of examples of conditionals already in the other two threads I linked to. In any case, the idea behind me mentioning this is that conditionals (IFs) are one way you could achieve the "not on Halloween" thing you're looking for.

But something else to consider: is Rule Machine the best option here? What you're doing here sounds like it could be done with Simple Automation Rules instead. (This app was formerly called Simple Lighting and has always been able to automate any switch-type device but was recently expanded and renamed to suggest that it is capable of more; if you're still on hub firmware 2.1.9 or earlier, this is what you'd see it called instead.) SAR is a lot easier to set up, and it has a "Restrictions" feature built-in. Unfortunately, it does not have a "specific day" restriction, but it does have a "switch to disable" feature, so you could have another automation that turns on a virtual switch on Halloween--or any time you don't want this to run. (You could then have a different SAR that runs on Halloween. The "Simple" part here sometimes means you have to combine multiple rules to get what you want.)

RM could certainly work, too--it just takes a bit of getting used to. :slight_smile: I do think your idea of different rules for "on" and "off" are fine. Simple rules are better than complicated rules (easier to write, easier to modify, easier to troubleshoot), and if your entire set of actions would be different (e.g., on vs. off) depending on what the trigger was (and you also need logic in the actions to figure out which one it was), it's likely it would be better as two separate rules for all of these reasons, in my opinion. I've seen a lot of webCoRE pistons with a bunch of things crammed in there, possibly just for "organizational" purposes, and wouldn't recommend trying to do that here.


Can you post the basic premise your rule would need to follow? i.e if between time X & Y do Z.

To back up @bertabcd1234 point simple automation should be your first point of call and RM really should only be used for multifaceted automatons.
Whilst I never use ST or webcore I did definitely fall into the trap at first of thinking RM was the solution for all my lighting automation at first before realising that there were simpler and easier ways.

1 Like