Rule Machine Version 1.7 Released

Rule Machine Version 1.7.0 released

This update is primarily to add thermostat operating state functionality and to fix bugs related to thermostats. It is now possible to use thermostat operating state as a trigger or condition, in addition to thermostat mode.

Certain bugs were identified in the previous versions with respect to thermostat modes and fan operation. These have been fixed.

Due to limitations of my setup, I am not able to fully test these features. Feedback is greatly appreciated, and I shall respond to any bugs reported promptly.

Rule github: Save and Publish for me.


Yup, thermostat mode detection is now working. :ok_hand:

1 Like

Great job Bruce! Love Rule Machine and its made my recent purchase of a smartthings hub worth it! You should be working for them and they need to implement rule machine by default. Keep up the great work!


This is my first shot at upgrading Rule Machine, and I don’t want to mess up all the rules I’ve put in place. When upgrading RM do I simply replace the code and republish? Does the code for the child ‘Rule’ also need upgraded/republished? If the upgrade process is already documented somewhere and I missed it can you link me to it?

Thanks, Rule Machine definitely rocks!

You should get the latest source from Github for both Rule Machine and Rule. Yes, simply overwrite your source now in the IDE. Your existing rules should be fine after the update.

Rule Machine github: Save and Publish for me.

Rule github: Save and Publish for me.

1 Like

Rule Machine Version 1.7.1 Released

This new release allows for button devices with up to 20 buttons, 4 is the default. I need someone to test this with a ZWN-SC7.

Rule github: Save and Publish for me.

1 Like

Rule Machine Version 1.7.2 Released

Up to my old tricks a bit with some new features for Rule Machine.

I’ve been using my own custom lighting app for a long time, called Motion Lighting. The key features of this are motion controlled lighting with dimmer levels for each mode. I’d like to replace this with Rule Machine, but I needed these new features:

New Actions

Set dimmer levels per mode. This action allows you to specify dimmer levels for a group of dimmers, with a different level for each mode. You can select which modes these levels apply to. By combining this with a motion based rule, your lights will come on to these different levels.

Run rule’s actions. This allows you to cause the Actions for True of another Rule to be run, without regard to the Conditions/Rule of that other Rule. This is useful if you need a Rule (as opposed to a triggered rule), but you’d like to have additional triggers or rules that can cause its actions.

Action Only Rule. It is now possible to have a Rule that only has Actions; it would have no Triggers and no Conditions. Such a Rule can be run by other rules using the new Run Rule Actions feature.

Update Instructions

For this update, you must update both Rule Machine and Rule:

Rule Machine github: Save and Publish for me.

Rule github: Save and Publish for me.


Here is an example of using dimmers per mode:


Thanks for working with me on getting the first batch of issues resolved so quickly!

I will let you know if I discover anything else.

Awesome the dimmer levels per mode!


1 Like

Awesome Bruce. I can reduce my rules by 2 per motion area now. I was building a rule for every mode that was triggered by motion. It was starting to get hard to keep track of the list…

This is awesome! Thermostat state was exactly what I have been waiting for.

I’m using this Nest Device type -

I have a rule set up to turn on a ceiling fan when the thermostat state is heating or cooling, but it seems that the only way the thermostat state gets updated is when I actually open the nest device in the app or when I press refresh within the nest device on the app.

I assume that this is because the device type doesnt automatically push the current state of the thermostat to ST? Is there a way to have the Nest device status / state automatically refresh with ST? Or is it just a limitation of this Nest device type.

Version 1.7.3 Released

This version fixes a bug that prevented ZWN-SC7 button controller from working correctly. This button controller now works with Rule Machine!

Rule github: Save and Publish for me.

I’m not familiar with Nest. If it doesn’t throw events for thermostat operating state when it begins heating, that’s a problem. In fact, that would mean that you can’t use thermostat operating state as a Trigger. But, you may be able to use it as a Condition. You could determine that by giving yourself a Rule that you trigger somehow, that uses Thermostat operating state heating as a condition. If that works, then you’d know that Rule Machine can query to find out the operating state. Conjure up a test…

Did some experimenting the nest seems to only throw events and update its operating state when you physically press the refresh button within the Nest Device in the app. I confirmed this with live logging. It executed poll when I pressed refresh.

The only time I was able to get the rule to execute was with the following condition:

(Note before the rule executed, I had to press refresh in the nest device screen on the app in order to update the operating state.)

There was an oddity when I was testing though. I added a physical switch as a trigger and the thermostat operating state evaluated to true but the rule still didn’t execute, i’m not sure why.

I did explore the expert features and Nest has “poll” ability which is what I need to update the thermostat operating status. Is there some kind of rule that I can create to run that poll command run every 10 minutes?

Version 1.7.4 released

This update rearranges the UI a bit. There is a new first page, where you decide what you want to setup. There are three choices:

  • Define a Trigger
  • Define a Rule
  • Define just Actions

Your existing Rules will show up as one of these, depending on what you created.

I want users to distinguish between a Trigger (even one with Conditions and a Rule) and a Rule, which has no Triggers at all. These are fundamentally different. Hopefully, this will help maintain that distinction as you think through your automations.

If you have an existing Rule that you want to change into a Trigger or just actions, my suggestion would be to remove it and start over.

Rule github: Save and Publish for me.

Can Rule Machine do something like:

  1. Motion detection.
  2. Set colour/dim level of a specific bulb.
  3. Motion stops.
  4. Return bulb back to its previous state.

Yes it can. It would look like this. Assume color is blue @ 50% to start.

Conditions: motion active
Rule: motion active
Action for true: set color white @100%
Action for false: set color blue @50%

Of course I don’t know what light or controller you are using so you will have to decide what the actual actions are but that should be easy to set through your available options.

HaHa, no it can’t. Rule Machine lacks context. So there is no way to capture ‘previous state’ as it’s implemented. @twack wrote an app a long time ago that captures the state of all of the devices it controls whenever it’s triggered, and then could restore them later. I’ll have to think about that, if it would be possible to capture state and then have restoring it available in an action. Sort of a cool idea!


This is one of the biggest features missing from Smart Lighting and for me, would drastically reduce the amount of Smart Lighting child apps I need.

With Rule Machine, it would literally RULE ALL SMARTAPPS. Seriously being able to return anything to its previous state would be so incredibly powerful and help reduce complexity of rules at the same time.

One of the reasons I’m hanging on to Smart Lighting instead of switching to rule machine is because I am mostly in the local domain so there’s very little automation for me that depends on the cloud but to me, if you had the ability to return to a previous state, it would be more useful than local control to me.

1 Like