Rule Machine® Introduction

They don't have to be full blown rules. The other 6 could be triggered rules. In fact (although it limits their flexibility a bit), the other 6 could have their tigger be the rule truth of the main rule. Then you would actually only need to stop action of those rules, not start them too. They would start when the main rule became true.

webCoRE is a complex rule engine. Rule Machine is more like a bucket of building blocks. You can make just about anything you want, but you have to put the blocks together.

This should be easy to add. Will look into it.

Super easy --> in next release...

2 Likes

Is it possible to get more than 10 SMS a day? Not critical, but helpful when learning and testing stuff. thanks in Advance.

Many of us use https://pushover.net/ for messaging to overcome the 10 per day limit. There is a one time (NOT recurring) $5 cost for a Pushover account, but then you get 7,500 messages per month. There is a built in integration for Pushover in Hubitat.

1 Like

Excellent! Thank you!

The ability to control all of your music players from one Rule is in the latest release: Hub Update 1.1.6

1 Like

HTTP Get was added to Rule Machine in the latest release: Hub Update 1.1.6

As an alternative to the above solutions, if you've ever had SmartThings (and don't mind still using the app), you can also use this community-created Hubitat driver and SmartThings SmartApp together to route notifications to ST from Hubitat: Route Hubitat Notifications to SmartThings (App and Driver)

But in general, as suggested: by using notifications instead of text messages, you won't have to worry about the 10/day SMS limit. :slight_smile:

1 Like

Thanks for that suggestion. Appreciated.

@bravenel. I am curious if there is currently a way to trigger a rm action directly from a driver or app?

@bravenel have you considered allowing parameters to be set/passed to the custom command via rule versus hard coded in the custom command itself? I have a driver function that accepts an integer type input and am having to create duplicate custom commands for the multiple values and it would be nice if I could just pass that parameter from the rule itself.

1 Like

My "elaborate" WebCore rule that I'm looking to port ultimately targets a ceiling fan that takes speed as an integer 0-4. (Off to High, respectively.) The upstairs circulation isn't very good, and temperature differences are a challenge; we combat that with the ceiling fan in the stairwell to help even out temperatures through the house.

I have a WebCore rule that maps the HVAC state (off, fan, heat/cool) and the temperature difference between upstairs/downstairs (< 3 degrees, 3-5 degrees, 5+ degrees) each into the range 0-2, then passes the sum as the instruction to the fan.

Of course, since I can't get to the built-in Nest integration yet and the community-based one doesn't expose the actual running state of the HVAC, I have some antecedent roadblocks to overcome before I'm able to start attempting to compose rules. But to achieve something comparable, I'm not currently seeing anything simpler than the cross-product of all possible states.

Another one I currently have in WebCore controls in-room fans upstairs: The fans will get turned off when the upstairs/downstairs temperature difference is less than three degrees and any fan currently on has been on for at least an hour. I think I could achieve that with three rules:

  • Create an Action to turn off the fans if the difference is small enough (though I don't see that I can do a difference), with a repeat built in to keep checking until it's true. (And then stop running, one presumes.)
  • In a second Trigger, if one of the fans is turned on, pause the Action immediately.
  • In a third trigger, when one of the fans is turned on, wait one hour and un-pause the Action. Reset the pending action if the other fan is turned on

Without seeing your specific pistons details, I'm thinking you could create virtual switches for thermostat operating state that are turned on and off by IFTTT.

Then, create 3 rules, one for each desired fan speed (low, med, high). The rule can be combinations of
conditions that would result in the fan being low, med, etc. It is effectively accounting for the cross-product like you said, but doing it in 3 rules instead of 9.

Example:
If
(
Thermostat Fan Only switch on
AND
Upstairs temp >= Downstairs temp + 5
AND
Upstairs temp <= Downstairs temp +3
)
OR
(
Thermostat off
AND
Upstairs temp > Downstairs temp + 5
)
OR
(
Whatever else, you get the idea
)
When true, set fans to medium (xx%)

Etc

Here's an example to check and see if one temp sensor is within 2 degrees of another. Right now my front door is 68 degrees and office door is 72, so the rule is false.

Post the piston

Slightly broken, since the fan is already moved off SmartThings, but here it is:

That's an interesting idea! Unfortunately, it appears that Nest's IFTTT integration doesn't expose the thermostat operating mode either, only temperature and Home/Away state.

1 Like

Is it possible to do a play track at a specific level when doing an action playing a URI track in ‘Control Music Player’ action? This is on Sonos. Ideally also play for specific duration would be perfect. Reason I ask is I’m copying over my good night piston from WebCoRE. In that I play a track with specific URI, set volume and set the piston to stop music after 2 hours

I'm fairly new to Hubitat and am just now setting up some rules in Rule Machine. I have a very basic question. What is the difference between switches to turn on or off after a delay
and switches to turn on or off after a delay, pending cancellation?

The on/off with cancellation means that if the rule truth changes during the delay period, the delayed action will be cancelled.

Suppose you want to turn off a light 2 minutes after motion stops, but not if motion is still active. Motion sensors may report inactive after 15 seconds. By using turn-off-after-a-delay-with-cancel, should the sensor report active again before the 2 minutes is up, it won't turn the light off. The next time the sensor reports inactive, the timer would start again. Only when it remains inactive for the full 2 minutes would the light turn off.

The other type of delay is just a simple delay. It's going to happen when the timer is up, irrespective.