I am actively moving my ST environment over to HE. I need advice on how to approach my current bedroom automation that I currently fulfill in WebCORE in HE. I really do not want to use WebCORE as it technically isn't supported and I have already run into support issues with HE and WebCORE compatibility with firmware upgrades. Here is the scenario:
Hardware:
(2) Bosch Motion Sensors (zone motion)
(3) Smart Lamp modules
(1) Smart Outlet switch to control osculating fans
Scenario #1:
If the Smart Outlet for Fans are off and there is motion then turn on Smart Lamps. If no motion after 3 minutes then turn off lights.
Scenario #2:
If the Smart Outlet for Fans turn on then turn off Smart Lamps. Ignore all motion in room.
Scenario #3:
If the Smart Outlet for Fans turns off then turn on Smart Lamps and begin watching for motion. If no motion after 3 minutes then turn off lights.
I too have a scenario where I want motion to turn lights on late at night. And then they go off after 10 minutes.
Interested to see what the community recommends.
I have a hard time understanding how RM is supposed to handle complex situations like this. The Wait function in webCoRE is so critical for stuff like this...
I run a simple one in various rooms. Example as below. Kitchen sensor triggers, sets the dimmers to 100% only between Sunset - 60Mins, and 10pm. After that, I have another which dims to 50% and both turn off after no motion for two mins.
So with the "Time Between" Rule, does that eat up a lot of resources? Or does it only check that time condition if the sensor triggers so it's not that big a hog?
My confusion is because webCoRE at least indicated what the triggers where so I knew where my resource consumption would be.
I'm not sure regarding the resources, but seems to trigger fast and happily. As do my others triggered by motion.
I'm not sure which is the best way around to set the triggers, Whether motion, then time etc. Maybe someone knows better on that front, would be useful to know so we can make them as streamlined as possible.
In my head I think I have it right, so I only want them to be checked if the time frame is correct first etc. Otherwise it may check each time it picked up motion (if you see what I mean).
Hence why I use a fan switch. When ppl are napping or sleeping for the evening the fans are always on. If this is the case then ignore motion and turn off lights.
"a Rule, it evaluates its rule upon any event affecting its Conditions. In the case of a Trigger, it is fired whenever the selected event occurs.
Trigger events are not tested, they just happen. For example, a contact opens, bang --> do the action." -Bruce Ravenel
Part of the problem is the terminology... "Rule Machine." & "Create New Rule" makes one think it's all about Rules.. it's not. It's about events. "Event Machine" & "Detect an Event" would be better name/titles perhaps
Events occur. Door/window sensor, motion, leak, sunrise, Presence, 10:07pm... billions of events (or potential events) occur each day. What do we want the hub to do about an event?? Is the event the "first domino"? or does it need to cause an evaluation of a bunch (1-n) of other conditions?
Make a Trigger if the first, make a Rule if the second.
Yea I've been noticing that. But I saw there was an option to make a rule without a trigger. Which I started doing at first, and realized probably wasn't best.
For @Royski 's example. Is there/should there be a trigger above that for the Kitchen Sensor? For it to be it's best.
You can't detach from the idea there are Events. Events trigger and Events cause evaluations.
Both @Royski and @aaron have "False" needs. When the fan is not on (false) and Sensor is not active.
Therefore a Rule simplifies. Puts it all in one "container." But of course there are two Events in those too. Event of ON/Active and the Event of OFF/Inactive. Two triggers ? No "container." It's not more complicated, it's just looking at it the other way.
Boolean Logic has this as it's core. There are ORs (this OR that.) There are ANDs (a AND b.) But inverting them is absolutely identical. A negative OR is an AND and a Negative AND is an OR.
(a AND b) = true.. but then when one goes away, it goes false.. !! so the go away side is an OR They both have to be there to be true, but only one has to go away to be false.
So it's all ViewPoint centric. And that's been central to many of the things I see that compare RM to WebCoRE. The containerization of WebCoRE is super cool. But the underlying logic really has to be considered identical. Both fire from the same sets of Events.
Many thanks for a great explanation! Do you thinks there's any benefit to be had setting the triggers and then using the Restrictions to control the times of when they should run, versus two conditions, when really the trigger is motion, but only between two times.
Update - Kind of answered my own question, as I lose the option to cancel and turn off.
Since day one (Feb) here on Hubitat, when I first learned RM, I thought WebCoRE'ish. Put them all in one piston.. umm Rule. But, like with WebCoRE, I found the logic didn't work exactly per my imagination.
Motion --> Light on, after sunset, before 10pm. No motion = no light.. super simple.
Except when the motion occurs at 9:58pm and the motion sensor reports every 4 mins. It's 10:02 when the Motion Stopped event occurs. The Light stays ON, all night.
Now, I've split most things into the ON set of Rules, and the OFF set Usually the OFF set has no restrictions.
Cured me of my Fear of Yet Another Rule, I'll tell ya.
Hmmm I get what you mean. I'm finding I need a lot more rules to do what I'd like to do. Also trying to re-train the brain, and a life without webCoRE, although its somewhat difficult (I still love her )
Thanks for the insight @csteele
In an effort to nativize things I've been trying to convert things but have caused a ruckus at home due to my lack of understanding. I'm reverting everything and going to slowly switch to RM.
There should be a Category dedicated to "Rule Help" where people like yourself who understand the way RM works can help people new to it and maybe used to webCoRE like myself can convert things, even if that means break them out into multiple rules.