Help understanding Rule Machine Webcore seems so much easier

I am having a hard time following the logic of rule machine and even harder time finding any good tutorials. I would like to create a rule that when a button is pressed it turns off all the lights in the house, but I need it to check and see if Harmony is set to off before it turns off the movie room lights incase my kids are still up watching tv. Any help would be great. I guess the reason I find WebCore easier is because it is laid out in tree format and I can see where each thing is going. Rule machine uses a lot of terms I dont understand.......if, then, else is so much easier LOL. I have been trying to get a button to work on webcore and have had 0 luck as well because I can't figure out what to have the button compared to so that webcore knows the button was pushed/help/doubletapped.

1 Like

As a previous ST-Wecore user I will admit that Rule Machine seemed pretty limited at first, but with the improvements over the last year especially with version 3.0 I no longer miss it. Above anything else remember that running Webcore on your HE is not only not "supported" it's highly discouraged as it is pretty much guaranteed to bring your HE to it's knees. It's a GIANT piece of code that was never designed to be run a consumer appliance (on smartthings it runs on a cloud server).

So first step, forget about WebCore, embrace Rule Machine or stay with Smartthings (Just my opinion, but many will agree and don't complain if Webcore causes issues and the HE staff/support won't help).

Step 2, assuming you chose to stay with Rule Machine, make sure you have the lastest 2.0.9xx firmware installed (RM 3.0 is part of 2.0.9). The show some screenshots of the WebCore scripts so that someone can show you how to implement it in Rule Machine. Once you wrap your head around RM 3.0 you will find that it is VERY powerful and quite easy to use.

This community and the staff of HE are super supportive we're here to help!

2 Likes

Thanks for the advice. Any advice on how to set up the button like I mentioned in RM? I do have RM 3.0 running

Something like this?

Edited to add link to ogiewon's excellent harmony hub driver which gives you virtual switches for your activities that you can use in RM rules like my example:

You want to use a Trigger.

Trigger Events: button pushed
Actions: If (Harmony Off) Switch off All Lights.

Of course you'd either have to include all of the lights in that off command, or create a Group with all of them in it. I also assume you have someway to test for Harmony Off, perhaps a virtual switch that reflects that state.

1 Like

Ok, I think I am seeing how this works now. I have it setup like this, but it doesn't work. If harmony is set to off it should turn off all the lights, if one of the other activities is active it should do nothing. I am guessing that maybe the harmony doesn't work this way? Does it report a status or is it just a trigger only with not status reported past the button being pressed

Are you using ogieown's driver? If so the power-off device switch is actually ON when all activities are off, it's fine to use that device just remember ON is actually off. In my example I was shutting off all the lights if none of the harmony activities were ON and all but the living room (TV area) if any were on.

In the rule you posted it's going to shut off the lights if all harmony activities are off and do nothing if any of the activities are on.

Not sure what you are asking about here sorry

Duh, yes, I will try that. Thanks

If you wanted what I described your example will do then you can actually do it with a simple condition instead of an IF-Then.

How do you mean? I am so use to if then LOL

I use IF-Then when I want to create multiple actions based on the condition, if I only have one action a "simple-condition" does the same thing.

IF "whatever" is "ON" turn off light

as opposed to

If "whatever" is "ON" then
turn off light

Same thing, but the IF-Then would allow something like I showed in my first example or something more elaborate like:

IF "whatever" is "ON" then
Turn off Light A
Dim Light B to 40%
Set Light C to Red at 40%
Else
Turn OFF LIght A, Light B
Set Light C to Blue at 70%
End-IF

Here is an example of a more complex rule using both IF-Then and Simple Conditions that I use to automate my lighting in my office:

If office motion is active and mode is sleep THEN turn on the office light to 30% but only if the ambient light level of area is less than 10 lux.
Else
Turn on the office lights to levels based on the other modes but only if the ambient light level of the area is less than 80 lux.
END-IF

IF the motion is inactive and the mode is sleep THEN turn off the office lights after 2:00 minutes (unless motion becomes active again).
ELSE
Turn off the lights after 5:00 minutes (unless motion becomes active again).
END-IF

PLEASE NOTE: you cannot "NEST" IF-THEN conditions, that's why I'm using the IF-THEN for mode and then a simple condition (illuminance) to set the level.

I thought you couldn't nest any if's? Your example is the same as what I put up yesterday and although I didn't get a NO I was led to believe it wouldn't work. So does yours work? Ie you can't nest a if then but you can nest a simple IF within a IF then? If so amazing news!

Yes. What you can't nest is IF-THEN. Inside an IF-THEN-ELSEIF-ELSE-ENDIF block, you can have Simple Conditional Actions.

2 Likes

Thanks a lot for all the info. I think I may finally have a grasp on at least the basics of RM. I look forward to doing more!

so what does it do if I convert to a triggered rule?

A trigger fires, causing conditions to be evaluated and then actions taken. Use this when you don't want conditions to be evaluated unless a trigger is fired.

Great, that helps.........Ok trying to take this rule to the next level. it will turn off all the lights in the house and announce it on my google minis, if no one is watching tv, if someone is watching tv it will turn off all the lights except for the movie room lights and announce! that. I want it to then repeat part 1 once an hour until the tv is turned off and then turn off those lights. I think how I have it set up it will repeat the whole thing and will keep announcing that it is shutting off all the other lights. I dont want this. Any idea how to modify this to make that happen?

That is definitely not what you have here. What you have here is a repeat of nothing. And you are only repeating nothing one time. I have one question...instead of checking that the TV is one, why not simply have an action occur after the TV turns off? The next release will have "wait until another event for RM. So, you can either wait until that, or you can do this:

First, remove the repeat from this rule. Second, I would recommend changing the ElseIf to just an Else.

Next, you want to create a trigger that has the trigger of the TV turning off and the action to do whatever you wanted this rule to do when the TV turned off. The last action the trigger should have to set it's own Private Boolean restriction to True.
In the restriction of the trigger, you want to enable Private Boolean.

Then, back in the trigger you posted above, you will add the action of setting the Private Boolean true for the trigger you just created.

What this will do, is that when the Else action of the button press happens, it will enable the other rule so that when the TV turns off, other stuff happens.

Does that make sense?

kind of but it is getting late so my brain is shutting down........I will dive back into it tomorrow when I am more awake and see if I can put your help to work. Thanks again for all the help.

Download the Hubitat app