Because you've made it better for all of us! Very Cool!!!
Could someone explain or demo how to use a connector? I want to write a rule that is triggered by a change to a variable. I could do this in RM4 but based on the release notes, I need to use a connector now. I'm not sure what that is or how to use it.
Let me see if I can explain this…
A connector is a device that was created as a variable and is linked to it. Changes to the connector change the variable and vice-versa.
To generate the connector device, in Rule Machine, within the area to create variables, click on “Create” under the “Connector” column and select the device type you want to use (Ex.: Switch)
Once a connector device is created (ex.: a virtual switch). This device can be used by all apps.
Does that help?
Let me suggest you wait a just a few days for Release 2.2.9, where you will be able to do that again.
Woo Hoo - Bruce said "a few days"!!!
I can’t say that it helps a whole lot but I appreciate the help none the less.
So a connector maps 1 to 1 to a variable?
If so, can they be named the same thing so that it’s easy to associate them together?
If they do map 1 to 1, what is the point?
I can wait for the new version.
I can’t wrap my brain around the purpose of connectors. What is the advantage to them vs triggering off of variable changes? Are connectors just a work around until RM5 allows triggering off of variable changes or is there something more to them that I’m not understanding?
A connector gets a name that is the same as the variable name by default:
Above, my variable names are things like
hubVarDateTime1. I've never done this, but it does appear to let you rename them--like you can any device--but it sounds like you don't even want to do that.
If you're not sure what kind of connector to make (it doesn't matter for many cases--just as long as it generates the events you need and in a way the rule can "process"), I'd suggest sharing more about your variable and the ways in which it can be changed.
Connector also allow you to put them in your dashboards. And they provide a way for sharing hub variables via hub mesh.
No advantage, if anything a slight disadvantage because if your using a connector that didn't need to be created the hub has to do some extra work (that would be tiny BTW). The reason for a connector is to be able to use that variable in other apps that don't support hub variables yet. They also allow you to change the variable outside of the app i.e. dashboard
@bravenel, curious if you have any thoughts on this... For the new Button Controllers app, I'm using Lutron Picos for controlling Hue downlights. I'm using the Advanced Hue Bridge Integration app so I can pull in Hue scenes too (which show up in HE as switches). I'd like to use the middle button "3" on the picos to cycle between imported scenes for each push of the button. Do you have any ideas what I can do on the programming end within Button Controllers to achieve that? Kind of like how you can do "Random color" when setting a color - a "random switch" from a list of a few pre-selected switch options?
Not sure about random but you can easily cycle through scenes with each push... might be easier to do in RM though.
Button Controller 5.1 creates Button Rule 5.1 apps for each button-action. That IS RM!!
Will the wonders never cease!
@nathaniel.knautz one way to approach this would be to use a variable as a counter and each time you hit the center button it increments the counter by one. You could then use a series of IF statements to activate a particular scene based on the counter. You could have another conditional that reset the counter when it reached the max number of scenes. There might be a better / cleaner way but pretty sure this would work.
@bertabcd1234 has an app that can do this cycling between scenes, similar to what @brad5 describes. I'll need to find it later, but if you have a hunt around you should find his button controller app.
@sburke781, I actually initially found that app and looked into it. I can't recall what I wanted it to do that it wasn't going to be able to do... but I decided to give Button Controller a try, since I knew it was based in RM and powerful with it's options. Thanks @brad5 for the idea! I set it up that way, and it works beautifully! Now to recreate for all my other picos/Hue lights... See below if anyone wants to see what I did to get this running how I wanted:
I'm not finding this option anywhere in the Rules Machine.
"Predicate Conditions" is old terminology that was used with a previous version of Rule Machine. The current equivalent is now "Required Expression"
I'm not finding this option anywhere in the Rules Machine.
Please be aware that you have replied to a thread for an older version of Rule Machine (version 5.0). For latest documentation on the Rule Machine, please check out this document: Rule-5.1 - Hubitat Documentation
Also, there are a few newer threads that cover the recent Rule Machine changes:
Release 2.2.9 features some significant developments for Apps. These include Variable events, a new major release of Rule: Rule 5.1 (and Button Rule 5.1), and expanded app Export/Import/Clone capabilities for all apps. Variable Events In this release, whenever a Hub Variable or RM Local Variable changes value a Location Event is generated. This means that RM rules can now be triggered directly from variable events, and Predicate conditions may be based on variables. Previously, only variabl…
Basic Rule and Simple Automation Rule In the 2.3.1 release there is a new option in each of the two automation apps having to do with Restrictions. As they have worked prior, if a Restriction is in effect, the app would not do any actions. This causes a problem for automations that start prior to a restriction going into effect, but not finishing until after. For example, if an app is restricted to only turn on lights from motion in Day mode, and they are turned on just before leaving, and i…