# Probably basic Rule Machine question

When I get to the end of setting up my rule , it takes me to another screen that asks Complex Rule Input? or Not? What does this mean?

A complex rule is one with parenthetical sub-clauses in the rule logic, like this:

(A AND B) OR (C AND D)

If you don't have a complex rule like that, you don't need it.

1 Like

So What I'm trying to do Is have 2 lights (bulbs) turn on at sunset at 25% and turn off at 21:30. Can't seem to get it to fire at sunset.

Try this rule:

Condition: Time between sunset and 21:30
Rule: Time between sunset and 21;30 (autofills)
Action for true: Set dimmers to 25 (under Dimmer actions)
Action for false: Turn off dimmers (under Switch actions)

1 Like

How does this look? It was after sunset by the time I did it so I won't know until tomorrow night..

There's no time component to your rule, weren't you trying to get it to go at a certain time?

Yep. On at sunset and off at 2130. At one point yesterday I was able to get it in, but kept getting hung up on that original question of Complex rule or not. Now tonight, if I have it set to trigger at sunset, after I put in the end time and click done, it won't save the end time. just saves it blank as if I never touched it. If I change to start at a specific time, it will save a specific end time.

Just curious, is there an even more basic article on how to actually write rules, and what parts are needed and what they mean? I've looked at the guide that is linked to in several places, but I think I need something more fundamental.

@bravenel suggested a Rule... and that's followed by a Rule image that's miles from the suggestion -- at the very least because it has no time component.

Did you create and test the rule suggested?

1 Like

Look again at what Bruce wrote.

• The conditions are the known states so they can be defined in a rule.

• The rule is the known states are examined to determine if they are true or false. This might be a single condition, multiple conditions that are joined by the and operator or multiple conditions where any one of them or combination might make the rule true, this would be where the or operator is used.

• Actions for True are the things you want to happen when the conditions as defined in the rule are true.

• Actions for False are the things you want to happen when the conditions as defined in the rule are NOT true

3 Likes

Using @SmartHomePrimer explanation.. the Rule you have pictured won't do much. You're examining the relationship between two dimmer settings. Loft light is +25 above Office light. If it is, set them to be 20%, which will immediately be evaluated and, being they are now equal, will be false, so they turn off.

3 Likes

Yes and what follows is what I came up with. As you stated I was apparently miles from the suggestion, Hence why I asked if there was a more fundamental "primer" so I can try and get a sound foundation rather than trial and error without understanding what I'm trying to do. I don't know why the time wasnt there, I know I selected it. When I tried to redo it last night, I could get sunset as a trigger, but I couldn't get it to accept 2130 as an end time. When I clicked done it cleared that whole part out. No, I didn't test it, because I couldn't get it that far along, hence why I asked for advice and suggestion where to find documentation to read up and better understand what was trying to do.

I have it working doing what I want to do using separate rules in simple lighting, but I would like to better understand how to use rule manager, as I know I will have more complicated things I want to do in the future.

I just discovered part of your problem: There is a bug with time input for 24 hour time. If you temporarily set you time preference to 12 hour, you could enter the time condition.

Ok I was just working on it, using different time so i could see if it works or not, this is what I have come up with. So far it has worked for 3, 2 minute cycles. I figure I can just go back and change the times to my desired times .

Seems to work. Does anyone see anything that could be tweeked, or cleaned up? I really do appreciate all of your advice and helping me figure out what im trying to do!

OK so it worked for about 10, 2 minute cycles, so I went ahead and changed the times to what I actually want. How does it look? Does anyone see any glaring mistakes? Thanks again

Looks good to me. Pretty basic, but that's where you start, right?

1 Like

Yep. Thank you so much for your assistance. Much appreciated.

So, my rule worked fine the first couple days. I modified it to NOT execute on Tuesday and Wednesday. On Tuesday and Wednesday (or I guess really Wednesday and Thursday early morning) the rule executed at 0130 a.m. Here is what I have currently:

And these are my location settings, I edited the GPS coordinates, but I'm in Dallas / Forth Worth, TX

Thanks for any tips!

I'm not sure about the 1:30 thing, but you added a condition without adding it to the rule, so until you add to the rule it will have no effect on anything.

1 Like

Is this better?

Yep that looks right. Now to figure out the 9:30 vs 1:30 thing...