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.
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?
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.
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:
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ā¦
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.
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?
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.
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.