SmartThings Community

Show your Rule Machine automations


(Dale C) #72

Here is my first shot at using Rule Machine for controlling a 3-speed ceiling fan based on room temperature thanks to @bravenel for some direction. I installed GE 12730 Z-Wave Smart Fan Control and use the device type by @ChadCK [Z-Wave Smart Fan Control Custom Device Type] I used my ecobee3 temperature reading for my input as well as the ecobee3 motion sensor to determine room occupancy.

I setup three rules, one for each speed of Low, Medium, High that only execute if the ecobee3 senses motion in the room AND the Virtual Switch “Fan Auto Enable” is ON.

If temp is >=73 and <75 Run custom command to enable lowSpeed() on Fan controller
If temp is >=75 and <77 Run custom command to enable medSpeed() on Fan controller
If temp is >=77 Run custom command to enable highSpeed() on Fan controller

I could have done it just using “Set these dimmers” for each speed setting but I was learning about some of the advanced features of Rule Machine and wanted to try it out since ChadCK had exposed the binary speed control in his device type.


Control 3-speed Ceiling Fan and Light Kit?
(Fast, Good, Cheap...pick two.) #73

Very cool idea…pardon that pun.

Does your ceiling fan have lights on it was well? I wanted to use that switch but with mine having lights integrated it didn’t seem like a good idea.


(LJ) #74

I really like the visual!! Would you like to share your code?

LJ


multiAttributeTile example for Nest thermostat
(Ryan Ray) #75

Do you mind posting the modifications you’ve made? I’ve been wanting to attempt using the multiAttributeTile but I’m completely new at this stuff.


(Ryan) #76

I fought with this one for a while: my wife and I get up at different times from each other, with a varying schedule. So, there’s no telling who’s awake and whose asleep in the morning. I’ve built rules to essentially shut down the master bathroom and closet while at the same time turning on the downstairs, such that one switch makes transitioning from upstairs to downstairs seamless. The issue is that, if one of us or the other is in the bathroom while the other one is trying to head downstairs, flipping the switch shuts down the bathroom and leaves one of us showering in the dark!

I laid out a bunch of possible rules on paper so that I could tie down the different options, and his is what came to the surface: we needed one specific items to let RM know if someone was still in bed or not. I ended up using the master bedroom overhead lights, which seems so obvious now :wink: Especially given that my RM alarm to get out of bed toggles the overhead lights on only if she’s already up.

So what the rule does is check for the state of the overhead lights and thusly decide whether or not to shut down the bathroom. I wrote a second rule, using a virtual switch to turn on the downstairs lights (or not) based on a lux value outside using the CoopBoss integration. (Thanks Jon!).

Lastly, I wrote a rule that, if the bathroom lights DO stay on (since the overhead lights are on meaning were both us), when the last one out turns off the overhead bedroom lights it shuts down the bathroom. Hope the expanded logic helps someone!


(Dale C) #77

The fan has integrated lights. It is not easy to see in the photo due to the angle plus I had to remove the glass but its the Hunter Regalia 60-in with Light kit that I got at my local Lowe’s Store. I removed the two pull chains and use Rule Machine to be the fan auto control with an Aeon Minimote on the corner table to increase the wife-acceptance-factor for override of the fan and turning on lights.


(Kevin) #78

Aeon Siren - Door Entry Beep and Siren

When SHM is Armed(away) and a specific door is opened, it uses the Aeon Siren to play a beeping sound. If after 60 seconds SHM is still Armed(away) it turns the siren on.



Aeon Siren - Door Exit Beep and Arm

When a specific button is pressed, the Aeon Siren plays a beeping sound for 60 seconds and then changes SHM to Armed(away). I had to use 2 Rules, but there’s probably a better way of doing this that only requires one.

  


The Aeon Siren is using the Aeon Labs Multifunction Siren device handler.


Linear Z-wave Siren device type needed
(Dale C) #79

Curious what smartapp you use for your security? I like what you did here. I didn’t know beeping was available to the Aeon Siren… I like the audible notification. I was thinking of doing something similar but instead of audible doing it with some kind of blinking light so we had some kind of feedback before the Siren triggers. I don’t have the Aeon Siren so I don’t think I can beep mine.


(Kevin) #80

[quote=“dalec, post:79, topic:34817”]
Curious what smartapp you use for your security?
[/quote]I think these Rules would work fine with SHM as long as you excluded the entry door from the open/close sensors being monitored.

I’m actually using a SmartApp I wrote to handle my security because it uses the Aeon Doorbell to play mp3s that say things like “front door opened”, “motion detected in basement”, etc. This can be done with Rule Machine, but it was a lot easier to write something custom.

The Aeon Siren doesn’t have the beeping functionality, but I created a new device handler for it over the weekend that adds it along with some other features like duration so it turns off automatically. I wanted to split the siren from the strobe functionality, but the device isn’t capable of doing that.

I’ve noticed a lot of posts from people wanting to know how to handle entry/exit with SHM so I figured it would be a good example to show how the new features in the device handler can be used with Rule Machine.

Which device handler are you using for your siren?


(Dale C) #81

I bought a GoControl Z-Wave Siren & Strobe - WA105DBZ-1, and it uses a Z-Wave Switch Device type. Although it has both Siren and Lights , SmartThings cannot control each one separately like I was hoping. I was thinking to blink the light before actually triggering the siren so it was a reminder in the house to disarm when entering.


(Kevin) #83

I looked at the device specs and it looks like the z-wave siren device type won’t work, but this one should:


(Dale C) #84

Thanks @krlaframboise ! I swapped out to the @miketx modified device handler and will give it a go around. :grinning:

UPDATE: That did it! Thanks for the help. Now I am looking at what you did with Rule Machine for my use. :grin:


(Ed) #85

Thank you for sharing.

Putting my thoughts on ‘paper’ (or xls) helps in formulating the rules as well as a means of backing up the thought process / logic.


(Bruce) #87

That’s not in the actions you showed above. Also, just a suggestion, use 1 minute instead of 45 seconds, or even remove the delay for now, until you get it working.


(Jason "The Enabler" as deemed so by @Smart) #88

Justin,
For the sake of trying to keep things organized (please don’t laugh) copy this over to the thread in this link and then delete this posts.

Thanks


(Kevin) #89

Here one I love to let me know when it’s time for battery replacement. It’s only one Rule with one Triiger. It only fires when my Batt is below 35, during the daytime when I’m home. And it shuts off when above 35% or after 5min of blinking.




(Pizzinini) #90

I used rule machine to have fun and automate some parenting duties and make it easier to get the kids to go to bed at night:

  • I created a scene in Homekit (via Homebridge) called “Is is time to go to bed” that turns on an on/off button tile “Siri Bedtime Button”. (I did not use Alexa because “Turn on the bedtime switch” would sound strange to the kids…)
  • Before 7.45 pm the spoken response is that the kids can still stay up a little longer
  • After 7.45 pm the house will tell the kids to go to bed.


(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #91

[quote=“bamarayne, post:54, topic:34817, full:true”]
I know a lot of folks have asked about a backup of their RM rules and such… nothing feasible has happened inside of the ST environment… So, I created a spreadsheet…[/quote]

Thanks so much for sharing this!

For some reason, it’s easier and more enjoyable for me to look at to learn somebody’s rule logic than the screenshot method.

I will look at any others that I see posted as well.
If nothing else, I will study it, and perhaps learn a thing or two about good rule-making. :slight_smile:


(Jason "The Enabler" as deemed so by @Smart) #92

I tried doing the screenshots, but I kept getting mixed up and getting lost trying to build something. Lol.

I hope you can figure out my logic… Sometimes it takes me a few minutes to figure out what I was thinking!


(Erwenger) #93

The dog has a habit of sneaking off to commit some mischief. I put a motion detector at her height that triggers an Aeon alarm. But then I started getting complaints from humans who triggered the same alarm.

I put a second motion sensor at human height. And I used Rule Machine to trigger the alarm only when the puppy height, but not the human height motion sensor is triggered.

Problem solved!

(Works best if there is a significant height difference between your dogs and your humans!)