SAR Not Working Help - Humidity Sensor -> Switch -> Humidifier Between Times

Hi. I have a setup in which I want to humidify a grow tent, (believe it or not) full of hydroponic strawberries for my kids. Unfortunately, I woke up this morning and the humidifier was still on and the leaves were all wet which can lead to mold and other diseases.

Technical strawberry speak: Itā€™s best to have HIGH humidity only 3 days a week for only 3 hours because it causes the strawberry leaves to absorb much-needed calcium to their leaf tips as it ceases transpiration. Anyways.

Aqara Humidity Sensor -> Iris Plug -> Mechanical Humidifier.
Restrictions:

  1. if < 60% humidity turn on and turn off above 95%
  2. Only between 8 pm to 11 pm on Mondays, Wednesdays, and Fridays.

Hereā€™s how my rules look, but why did it just keep running?I donā€™t quite understand the restrictions toggle even after reading about it.

Restrictions keep the rule from being triggered in the first place. They do nothing after the rule is triggered. So, if the outlet goes on because the humidity is below the threshold between 8-11, then it will just run until humidity gets to 95% (or should).

This would probably be better for rule machine since you really have two conditions for the turn off. Something like:

"Required expression":
Day of week is Monday, Wednesday, Friday
Humidity is <= 60%

"Trigger":
Time is 8 PM

"Actions":
Turn on humidifier switch
Wait for event: time is 11 PM or humidity is >= 95%
Turn off switch
1 Like

Restrict trigger means that if any time between 11PM and 8PM (next day) on Monday, Wednesday and Friday, the trigger will be ignored ( humidity > 60 for on and > 95 for off) but if there were any actions scheduled (pending), the app will take those actions.

Restrict trigger and pending actions, both the trigger and subsequent actions will be ignored, if any were pending at the time the restrictions become active.

I would do this with 2 Basic Rules. One to turn on with restrictions, and a separate one to turn off without any restrictions. Or you can do it with only one rule like this (restrict only the trigger and not the actions):

1 Like

Thank you everyone. I have to be honest that these expressions are not very clear to me. Either I'm not that bright when it comes to this, or they're complicated for many people who don't tinker with these regularly. That's why I've stuck mostly with SAR instead of RM for so many years now.

But I do appreciate you all taking your time to help out. @FriedCheese2006 I just set this up. Does it look right? Reading "False, true, required expression false" is like me trying to do my own taxes (ie. do I declare myself as a dependent since I depend on myself???)

@bobbyD Thanks as well. I'll try setting it up again but my SAR screen looked nothing like what you are showing here.

That's because I am suggesting recreating the rule using Basic Rules.

1 Like

Has "Basic Rules" always been there? Never noticed it before until I just added it to my apps just now. I have most things working the way I need them to, so I rarely ever have to edit or make rules.

Basic Rules now comes pre-loaded on every hub, you must have had the hub for a while. It is my go to app for 90% of use cases. I think you'll like it better than SAR, its flow is more natural: If this happens, I'd like the hub to do this, then do this other thing, or wait for something else to happen before doing more stuff.

1 Like

Thanks again for the tech lesson. I suppose I'm an older user (when Wink first announced it was going to be acquired by the Black Eyed Peas.) I keep things regularly updated but don't tinker unless I need to or something appears to be broken.

Just followed what you did - SO MUCH EASIER on my brain than either RM or SAR ever was. The logic just flows. I'd almost label SAR deprecated in the SAR section.

RM can be confusing to read for occasional people. But honestly, does RM really do much more than what Basic Rules can accomplish or can everything be done the same way?

1 Like

No worries we did that for you :slight_smile: Just joking, We retired SAR for new users in our latest release. Existing SAR rules will continue to work and your SAR rule could have been adjusted, but I thought it would be easier if you made the transition to Basic Rules. I am glad you like it better, that was our goal.

1 Like

haha. Yeah I complained out of frustration in the past mostly about RM and I don't think the original author took too kindly to me asking if he could simplify it lol.

But I'm not looking forward to having to rewrite 20+ lutron pico switches with custom buttons and another dozen rules. My various employers are going to kill me if I don't get back to work work....

1 Like

Rule Machine can be quite powerful. It shines when there is more than one trigger (or set of events that must occur) in order for the rule to run. It also has more capabilities and actions that can be executed. When you have time, the best way to explore Rule Machine is to import a Basic Rule and see how Rule Machine translates the if-this-then-that format of Basic Rule into a Rule Machine flow.

1 Like

Typo? I don't see SAR listed in the retirement list for 2.3.3.xxx release notes.

3 Likes

I have no doubt it's pretty powerful (esp. over SAR) and figured that's probably why you keep it around. I still have a few RMs set up, but admittedly often with the help of pros and support here after things went haywire and sometimes human error. However the way it flows just trips me up almost every time.

Ha, ha, ha... It's in my mind, alright. Oops...

3 Likes

I see you got this figured out but still wanted to explain. The invidual "T" and "F" is for the invidual conditions. In this case, Tuesday is not in your day list, so that condition is false. The humidity is below 60 so that is true. Since one condition is false, then the required expression as a whole is false.

I threw some comments in to help understand the flow:

"Required expression":
// Don't run the rule unless it's one of these days and the humidity sensor reads below 60
Day of week is Monday, Wednesday, Friday
Humidity is <= 60%

"Trigger":
// This is how we want the rule to be started. In this case, a specific time.
Time is 8 PM

"Actions":
// Self explanatory
Turn on humidifier switch
// Wait until the time is 11 PM or the humidity sensor reads 95% or more. Whichever comes first.
Wait for event: time is 11 PM or humidity is >= 95%
// Turn off the switch after the wait event has been fulfilled.
Turn off switch
2 Likes

Wow @danabw is someone no one should mess with when it comes to release notes. :grinning: :laughing:

1 Like

Thanks for the explanation. I just find it an added layer of unnecessary confusion when writing a RM to include the current state as I am writing it. Since I don't do it that often, I'm often like "what was that again???"

I am not someone anyone should ever mess with.

Mess w/me, mess w/my wife. You do not want to mess w/my wife. Tiny, but very, very fierce. :wink:

2 Likes

There's a toggle to turn off current values. I find it bothersome at times as well. I think it's handy to look at after you've finished the rule to verify everything looks right.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.