Creating a rule to run an AC unit

I want to thank everyone for the replies, I really appreciate it!

1 Like

Here is @jabecker's suggestion modified for your rule:

1 Like

Thanks AndyM, that helps a lot. I think that my main issue is I am not figuring out how to create the trigger event, I'm not seeing Select Trigger Events as an option when I create the rule.

You have to start fresh unfortunately, and when you do you select define a triggered rule.

1 Like

Here is what I am seeing when creating a new rule. I am not sure how to get it to show "changed".

Sorry - feature just came out 4 hours ago...

You would have to update your hub.

Or alternatively for now, you could say if the temperature is greater than 1 degree. Likely (unless you pipes are frozen) everytime the temperature changes it will be greater than 1 degree and always trigger.

For clarification for you or others reading - with a trigger, every time the device attribute changes it will check the trigger condition and run if it matches. As this is a triggered rule, it will then evaluate the conditions and run the appropriate action regardless of the conditions prior state.

A regular rule (versus the triggered rule you are now using) will only fire on truth change... It still checks every time the device attribute changes, but unless it goes from true to false or vice versa it won't fire.

Very hard to get your head around at first, but once you get it, it makes complete sense. And it is exceedingly difficult to explain due to the terminology. We often refer to rules, triggers, and triggered rules all as rules... you have to figure out what the person means by context clues.

1 Like

First, Doh!!! That explains it - I've updated the firmware and created the rule.

Second, great explanation - it's very helpful. Thank you very much for the help!!!

1 Like

@AndyM -- yes, it really should be a rule, vs a triggered rule. I'm relatively new to HE and I was having a hard time wrapping my brain around the different types of rules. I originally had two rules: one for on and one for off. Then I tried to combine them, but not successfully because the fan won't turn off. I think it doesn't really need a trigger... just the evaluation of true or false for the conditions.

I think this will do it:

1 Like

Getting a little late for me to say for sure... but it looks good to me!
If the temp is greater than 78 in home or evening mode it will come on.
If the temp goes below that or you leave those two modes it should go off.

It is definitely tough. Then even after you get it you'll still be 3/4 of the way thru a rule and realize you should have chosen another :slight_smile:

1 Like

Another sample:



Here is what I'm trying now. The simple conditions seemed to have an issue, the outlet would shut off and then on again and I couldn't figure out what was cycling it on so I tried this and so far it seems to be working. The five minute delay is to avoid short cycling the AC unit.

Oh... already been there, done that! :laughing:

I'm not sure why it would do that. I don't know much about ACs but a delay is probably better for the compressor as that is what thermostats do to keep the compressor from quickly switching between on and off too often. Though for compressor protection, you'd want a delay on the on side as well, or something even more complicated so the delay only occurs if the state recently changed. But now I'm way off topic!

There could be something wrong with the rule that I'm not seeing and others will see.

But the first thing I'd probably check is the device page for the Downstairs South Outlet to see what other rules it is involved in, just to be sure another rule isn't also trying to control it.

Then if I didn't find anything, I"d get rid of the delay, try to replicate, and watch the logs. Probably best to unplug the AC from the outlet if you do that type of testing.

You also modified the rule so there is only a 1 degree difference between off and on. I don't know how powerful your AC is for the room it is in (or how close the thermostat is to the AC), but it could have been working fine, just the small gap in temperatures between off and on was causing it to cycle.

I'm not sure what the actions for false are doing? It looks like a dup of the actions for true, except with different temperatures. I'm not sure how it would ever be triggered?

In theory, the rule gets triggered every time the room temperature changes.
Then it will evaluate whether it is between 8AM and 10PM. From there, it will choose whether to set the true or the false temperatures. I'm guessing he likes it about 2 degrees colder while he sleeps.

1 Like

Oh DUH! I wasn't thinking of the condition. Got it! Thanks!

I'll go bang my head against the keyboard now.

1 Like

I don't think this is your issue, as a switch that is already on shouldn't do anything if it gets another "on" command... but it would probably be better in general if you changed your off and on lines to be conditional actions to see whether the outlet needs to be adjusted.
So for the "On: Downstairs South Outlet" it would be a simple condition action of if the outlet is off, then turn it on.

Thanks, I'll try in the morning. It's bed time now. :grinning:

How does this look?