Rule Machine extreme basics

Good afternoon all,

I'm an extreme novice when it comes to Rule Machine, but I want to try creating some stuff. I'm wondering if there is a document, book, online tutorial that really starts from the very beginning of creating rules in RM 4. And I do mean the VERY beginning! Like- to create this rule you click this, then click that, then click here, etc

Does something like that exist?

In particular, I would like a rule that says:
If it's sunset AND either garage door A, B, C or D is open AND there's no motion in the garage
THEN flash a light inside to remind me to close the door. I'm sure that can be done pretty easily
by someone that knows what they're doing, but not so much for me!

Thanks for your help
Stan

This link takes you to the app section of the documentation.
Scroll down for the various iterations of RM.

https://docs.hubitat.com/index.php?title=Hubitat_Elevation_Documentation#App_Documentation

Well you certainly have a nice home with four garage doors! I don't even have a garage! :wink:

There isn't step by step doc on RM in the same way that there are for other apps at this point. RM has been evolving rapidly as the platform has grown in leap and bounds. This is likely the reason the majority of RM documentation has been via posts and community help.

Here's the initial post on the Rule Machine 4 release

What you want to do isn't difficult, but to be honest, I'm not sure about the flash lights part. I know that not all lights support flash, and that is your first challenge. Second, in RM 4, I'm not positive about how to stop the lights flashing when the condition is false. It would probably be

Condition Sunset
IF contact sensor(s) open and motion sensors(s) inactive -> Then Resume Rule and Flash light(s), ELSE Pause Rule -> End IF

You stop flashing by turning the lights off. Pausing the rule is not a good plan, and can't be done by a rule to itself.

1 Like

So if he wants the lights that were already on, then they must be turned off and then turned on again in the rule? What is they were off and he wants to return them to their last state? Is that possible

Trigger Event:  Certain Time Sunset
Actions:
   IF (Garage Open Any of A, B, C, D AND Garage motion active) THEN
      Flash lights
   END-IF
   WAIT for Condition Garage Closed All of A, B, C, D
   Off lights

First set your Trigger Event. This means the rule will run at sunset every day.

The first action tests your two conditions of any door open and there being motion in the garage. If true, flash the lights. Next, the rule will Wait for all of the doors to be closed, then it will turn off the lights, which should stop the lights flashing.

There is the issue of whether or not your lights will flash given the flash command. If not, the rule would get a little more complicated to manually flash them on / off every few seconds. That would look like this:

  Repeat every 00:00:03 Stop
     Toggle lights
  END-REP
   Wait for Condition Garage Closed All of A, B, C, D
   Stop Repeating

This could be done with Capture and Restore.

1 Like

Didn't there used to be a FLASH button in the drivers of lights that supported flash? I know I used flash long ago on my Sengled Element Plus bulbs, but I don't see the option in the Generic Zigbee CT Bulb (dev) driver now. Did @mike.maxwell remove that option?

It's never been an option for zigbee devices, though it should be since they support a form of this in hardware, not sure why I didn't roll it.

1 Like

I have a "bright mode" virtual switch for some of my rooms that have CT bulbs that change temperature throughout the day. If I drop something and can't see, or need bright light for any other reason, I turn on "bright mode" using a switch or button, which sets the temperature to 5500K and level to 100%. It's especially handy in the bedroom when I'm doing laundry - I can easily tell Google: "Hey Google, turn on the bright mode".

Anyway, here's the rule, which restores the bulb after the bright mode is turned off:

bright_mode

1 Like

Thanks. @ct.dodge Welcome to the Hubitat Community! You ask one question, we answer our own questions reply :rofl::joy:

1 Like

3 days and 500 replies later...

3 Likes

I know - that's why this is such a great community.

Thanks all for the help - now I've got to start playing with RM!!

1 Like

I would definitely love that option in the HueBridgeBulb driver too :smile:

Sorry,
Actions :
If (Garage … AND Garage motion active ) then …
Is that correct ?

Yes.

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