Trying to stay native in Hubitat with Rule Machine but questions about it's concepts

In the past I have always configured my Home Automation controllers with Modes (Awake, Home, Away, Sleep) and then used Flags for light conditions like Dawn, Dusk, DarkOutside. I did this with My X10-Stargate system, Vera's that I was installing for others, SmartThings w/ WebCORE, and now working on a baseline to move to Hubitat exploring the platform. The scene mapping worked well being driven off the programming of a connect thermostat, Ecobee, etc.

So the concepts in Hubitat that escape me is in Rule Machine are:

  • private Boolean is this a replacement for Boolean variables in WebCORE or public Boolean for a global Boolean variable?
  • The time based triggers that don't need to be "between" times for example seem to be non-existent.
  • Also what is the best way of handling the concept of common "Then" executions like Piston's in WebCORE ?

Is there a Wiki or other write up that provides more details on Rule Machine, examples, flows, and concepts?

The write up here is a good start but darn if I can make heads or tails out of the Boolean definition:

1 Like

I don't know if my attempt at explaining booleans will produce an "ahhha" or not... but here goes...

A RM Boolean exists, one for each Rule. Rules can be Rules or Triggers and has it's own learning hurdle for event vs state. A boolean can be either True or False (or ignored.) Obviously if you never program for it, the state of the boolean is ignored, as far as you're concerned.

If you program for it, then there's at least two ways to manipulate it's state/value. The Rule can alter it's own boolean OR another rule can. And that's where it's big benefit comes, at least for me.

I can build a Rule that says: when this switch is on, that light is on, when this switch is off, that light is off. THEN layer in the boolean... When this switch is ON and the Boolean is True, the light is on. Off otherwise.

Then I can create a Rule or Trigger that only does one thing... sets the Boolean for the other Rule.

My Real World Example: I have a Pool Shower, outside. It has an electric water heater and a "button" to make it go. It's outside, it could run for hours, all night for example and kill me in water and electricity consumption. I have a "Deadman" Rule for it.

There's a TRIGGER: PoolShower AutoOFF: when Private Boolean becomes True, then delay by 20 seconds, turn off the Pool Shower Valve and Reset the Private Boolean.

Then there's the obvious Rule for making the shower work:

And finally, the Deadman:
scap

Two Triggers and a Rule. Rules allow "between these times" (like sunset to 10pm) while a Trigger can fire every 20 mins.

Thanks for the reply...I am going to have to do some "exploration" with Rule Machine. As I stated I would like to stay native in the product before going down the patch of looking at the ported WebCORE or other custom code.