Rule Machine Version 1.7 Released


(Bruce) #1

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


Rule Machine Feature Requests
Keen Smart Home Vents
Control 3-speed Ceiling Fan and Light Kit?
I can connect only 1 Lifx bulb to Color Smart Apps
Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
Link Cree LED bulbs
Multi Sensor Temp Feature / Thermostats and 240 Volt Heaters
Custom switch, turn off after ten minutes
Newbee Question: restricting motion sensor alerts to a specific time period?
[OBSOLETE 1.1.6 5/25/16] Big Talker - Talk when events occur
What are top uses for ST and it's automation?
Text-to-Speech is back!
(Bob) #2

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


(Tim) #3

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!


(Tim Slagle) #4

(James K) #5

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!


(Bruce) #6

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy. Save and Publish for me.

Rule github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


(Bruce) #7

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


Maybe I don't need Rule Machine after all
(Bruce) #8

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy. Save and Publish for me.

Rule github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.

Example

Here is an example of using dimmers per mode:


[UPDATED] Rule Machine with Triggers
Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
SmartThings Publication of Apps to Run Locally
(Sean Kendall Schneyer) #9

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.


(LJ) #10

Awesome the dimmer levels per mode!

LJ


#11

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…


#12

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

I’m using this Nest Device type - https://github.com/desertblade/device-type.nest/blob/master/nest.devicetype.groovy

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.


(Bruce) #13

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


(Bruce) #14

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…


#15

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?


(Bruce) #16

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
(Benji) #17

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.

#18

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.


(Bruce) #19

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!


(Benji) #20

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.