There have been some very cool automations created by people using Rule Machine. Rather than people search 1750 posts in the original Rule Machine topic to find these gems, you should show your Rules and Triggers here. Upload a screen shot of your rule main page, and explain what it does. I’ve seen very cool automations, be they simple or complex!!
This will help people see what they can do with Rule Machine, how they can solve their automation needs.
To kick this topic off, here is a simple automation similar to one everyone uses, motion on/off lights. This rule turns on a garage light when motion is detected or vibration (acceleration) of the garage door is detected, and then turns the light off after 2 minutes of no motion/vibration.
Here’s one that is superficially quite simple, but touches a number of different areas. The setup for this is as follows: temperature readings are taken from a Nest thermostat that has a night setback of 65 degrees (we have electric blankets). When the temp gets within 1 degree of setback, it turns the ceiling fan on in circulate mode, to push the warm air down, thus delaying turning on the furnace while we’re asleep. It’s important to note the Night mode restriction, as without it, it would override any settings (even manual) during the day, since the action would always be false.
I’ll throw one in. This is my alarm clock. It triggers at a specific time, but then uses the conditions to essentially figure out if my wife is already up. Since she gets up before me to get ready for work, she’ll either be a) in the bathroom b) have used another rule to shut down the upstairs lights which will turn on the stairway and kitchen lights (along with others downstairs). When she heads downstairs, she turns off the stairway lights so as not to wake me (so considerate), then heads down for coffee so c) the kitchen lights will still be on.
If ANY of those are true, then she’s up and the rule will turn on the Master Bathroom lights, the music in there, the master bedroom overhead lights as well as my hue colored bedside lamp.
If NONE of those are true, then she’s still asleep, then the rule just fires up the bathroom lights and music and my dim colored bedside lamp, but leaves off the overhead lights…so as not to awaken her.
Pretty much works like a charm…
Here’s another one that I enjoy.
When we turn in for the night, a little part of our Bedtime Routine is to turn on my bedside lamp with a colored hue bulb. Once we’re tucked in, we turn on our Sleepy Time Routine (which essentially shuts down the whole house, usually via minimote) which triggers a virtual switch to gradually dim my bedside lamp.
Given the conditions listed (meaning, I’m home and not at work and the lamp is dimmed above 0) the rule starts a reduction in the dimmer level of the bedside lamp, by 4% every two minutes. As the lamp starts at 80%, it takes 40 minutes to reach 0. As a strange side effect that I don’t totally understand, the dimmer will continue to fall into the negative if I let it go, so when it hits 0% the rule goes false and shuts the lamp off. OR, if I’m not home, the bedside lamp automatically turns off when my wife activates Sleepy Time (which she prefers, as she doesn’t use the lamp).
Garage Door Open Alert w/speech.
I like to keep things as simple as possible and will use multiple rules to make things happen. But this is my most complex, as it uses sub rules.
If the garage door is open and the motion sensor is inactive and either myself or wife are not home it sends a push message and speaks in the house.
(My wife likes this because if the door is open while I’m at work it tells her) (it also tells us if we are both away from home) (but if my dad is here working in the garage it doesn’t tell us, until he leaves and forgets to close the door)
It also does this…
If the garage door is open and the motion is inactive it sends the push message and speaks in the house.
(This is for those times that we are both at home and I forgot to close the door)
I didn’t put a time constraint on this so if the door is open late at night it also alerts us.
Oh yeah, and the alert comes only after the door has been open for ten minutes, but if the motion goes active it cancels and resets.
This is another rule that isn’t used that often, but is very handy when it is…
Living room lights.
I have two floor lamps in the living room with Phillips bulbs. I also have the ceiling fan light controlled by a GE switch. The only time the ceiling fan light is used is when we want the room extra bright. But the two floor lamps tend to be dimmed to around the 40-60% range most of the time.
When the ceiling fan light is turned on the rule sets the lamps to 100%, unless they are already there.
When the ceiling fan light goes of, the two lamps go to 60 & 40% respectively.
I originally had this set up to only occur when the switch is physically pressed, but found that we tell Alexa to turn on the light way more often.
This one works great.
Note using rule machine allows you to use the physical press of a switch to run a scene separate from using the app or voice control**
Example - Minimote button turns of my bedside light… Just the light goes off. But if I press the switch to turn it off then the bathroom lights go off and the bedside fan comes on.
I have a Smartthings Multi-Sensor on my front door to detect knocks. There is a separate contact sensor in the door. There is also a motion sensor outside that detects motion on the front porch.
I use this to convert a knock to ring the doorbell - an Aeon Doorbell, which then cascades the ring to two other Aeon Doorbell units - in my basement workshops and in the Masterbed.
The challenge here is that you can predict that door closing/opening can/will vibrate and I don’t want door opening / closing events to be converted to doorbell rings, as that would be chaotic.
Three Rules to Execute. A Trigger, An Action, and a Door Status Tracker. As built it also requires two virtual switches - “Virtual Stay Knock Trigger” and “Virtual Stay Knock Door Contact Tracker”.
EDIT: I am also very interested in way to simplify, make it more eloquent. It works great, just very interested in learning new tricks that aren’t obvious (at least to me).
Limited to “Home/Night” Modes as “Away” actions are different and I don’t have to track the door status when away.
Leads to Action evaluator:
And finally the Rule Logic to track the door status:
Great idea Bruce! Here are several rule names that I have setup with your app:
but I want to share my two favorite ones that I have setup to date:
Mini Fridge - I have a 2 year old who loves to open the mini fridge to get a juice box (or a dad who comes over and grabs a drink) and they don’t always shut the down correctly. Using a simple Open/Close contact:
Crawlspace - I have a semi encapsulated crawlspace (live in the South) and I have a dehumidifier that I use to keep the humidity in line. Previously I was using a programmable timer to turn on the equipment during evening hours (I am on a time of use utility rate). I noticed after our last power outage the time was out of sync since the timer lost power and this method turned it on every night despite the humidity level (the humidity sensor in the dehumidifier is not very accurate). I now have a Rule to help me out:
I find that my kids are terrible about turning on the bathroom fan when showering. This rule automates the lights and fan to avoid the dreaded fogged up mirror!
Motion sensor is oriented just right to trigger the lights on when someone is coming through the bathroom door, I got it exactly where it would turn on the light the same instant you would normally flip the switch, the timing was actually throwing off the family, if it came on a second too early everyone seemed confused subconsciously and still flipped the switch, and if it turned on a half second too late, everyone would flip the switch thinking it was broken.
As long as there is motion the light stays on, after a certain duration (5 minutes was a bit too short for the kids) the fan will kick on assuming someone’s showering, or doing their nails…
The fan will kick off after a set time regardless of the light or motion status.
I will share another I find, somewhat, interesting.
There are two motion detectors on the underside of my deck, above my patio. Any activity on the patio which spans the breadth of the house with windows on it as well as the stairs to ascend to the deck at that level, are covered by these motion detectors.
If either goes off, there is an audio announcement of a pre-recorded message saying “Motion Back Patio” in various rooms of the house.This logic tracks if the door is opened when the motion is detected that way it won’t announce if someone opens the patio door from the inside to go outside in order to reduce annoyances.
Night mode does something slightly different and away announce only in the masterbed, also get those there no matter the door status. Away modes have separate triggers as well, to notify me by phone - separate logic rules.
I have one similar for the front door that tracks the opening closing of the front door for a period of time which suppresses the announcements while there is front door activity using a virtual button.
Lastly, these have virtual buttons that disable them - so just as my door chimes have disable switches I can also disable outside motion announcements - for example if you are having guests / party you likely don’t want these things triggering.
Good indicators of intruders! Or packages being delivered, back in the real world, as the majority of these deliveries don’t ring / knock in my neighborhood anymore.
And this is my simple® solution to my bedroom lighting problem.
We have two lamps and a ceiling fan/light. I want the fan light to turn on when motion happens during the day, but if either lamp OR the fan light is turned on manually, stop motion. Ended up with two rules and one virtual switch. Still attempting to get the single rule version of this working, if I can, I’ll update this.
Bedroom Light is the virtual device that turns on/off both smart bulbs in the fan light. I lack dimming control but have bravenel’s Motion Lighting setup to pair the bulbs and have a set dimmer value for Home and Night modes that works well at 50% and 1%.
First a simple Motion Off rule:
Then an almost as simple Motion On or Disable rule:
What I like about Rule Machine is its simplicity to streamline rather complex scenarios.
This simple rule eliminated 1 mode, two routines and one custom app. In the nutshell, the rule says:
**turn lights on with motion if lux level is less than 1000 AND off when motion stops, BUT don’t turn the lights on when the kids are asleep. **
I used to put my home in “Quiet Time” mode when kids were sleeping based on activity of several sensors and then change the mode again when kids got up. Now I just flip a switch, which was on anyway while the kids are in their bedrooms.
don’t turn lights on with motion if the switch is on:
bloody hell, my living rooms sensors dont even reach that level with all the lights on out of curiosity is the sensor in direct sunlight?
I should have looked into the Rule Machine a long time ago…
if this is a multisensor 6 Gen 5 then i also had the same issue, i used an excellent device type created by @Robert_Vandervoort which enabled me to get good lux readings for my environment. aeon-multisensor6-v2.2
Here is another example of a extremely simple solution with big effect. Synchronizing Harmony remote with ST is a PIA. With rule machine it takes one simple rule to take care of that. Rule says: if last Harmony activity turns off (or the Harmony off button is clicked), then turn off the TV outlet.
Note: VS Activity is a virtual switch that gets turned off when the last Harmony Activity ends
How do you turn your TV outlet on? I have this exact setup but Harmony won’t allow me to turn an outlet on first. Harmony insists the TV needs to turn on first.
Different activity, different rule I have a dedicated activity to turn on the outlet and then when the outlet is turned off in ST, I have a rule that turns off the Harmony activity (to keep them both in sync). We can continue this discussion on a new thread if you need more details.
Before ST I bought the 30 minute and 1 hour timers at Lowes/Home Depot and replaced the standard fan switch. It does require someone to actually turn it on but once it is it will count down and turn itself off. This allows the fan to run after the shower to remove the excess humidity that is present. I like this idea should I ever need to replace my switches for more automation.