I'd like to submit this idea for consideration, if it's not too onerous to implement: also allow the use of a (number) variable instead of just a constant as the button number in the "Push button" action.
I developed the desire for something like this while writing an automation to cycle through a closed set of scenes, where I increment a "scene number" to select a new scene, and I need to map that number to the scene in question. A virtual button is a nice way to implement a sort of associative array to perform this mapping, but it's currently not possible to use a variable to select the button number to press.
Fortunately, thanks to @ogiewon, I have a workaround: use a Custom Action to call the virtual button device’s command(s), as it is possible to pass in an argument (variable) to the button push in this context. But it would be cool, and simpler, to be able to use the Button Push action directly for this.
Thanks for Hubitat; I'm really enjoying getting to know it!
Rule Machine's "Run Custom Action" already allows you to select an integer value using a variable
Right, that's why I wrote that I have a workaround, so I don't need this requested feature.
Were you looking for this feature to expand to other contexts?
Exactly; it would be cool (as well as consistent with the interface to many other actions) to allow a variable to be used for the button number in the actual Button Push action.
So you are just looking for Rule Machine to allow button push using a variable directly, instead of using a custom action? Does it make a difference how you get there if it works?
Maybe you should just try using Webcore instead. It already does that directly for button push. I always recommend people just start with Webcore instead of Rule Machine, as I think it has a much better visual way to see your automation rules when you are done, among other advantages, but for some reason people jump right into Rule Machine and then do not want to figure out something new to use Webcore when it actually has the feature they feel is lacking in Rule Machine.
Yes and no. Now that I've found out how to do this, I can do what I need, but it was almost sheer luck that I found a posting on how to do it; I had almost given up. Other people may not be so persistent. It seems to me that to add this functionality would be an improvement to Rule Machine, and would make the Button Push action more consistent with other actions, which allow variables in many places.
When I search the community forum for how to do something, usually the Rule Machine method comes up; presumably it's much older and so has many more postings about it! I had not heard of WebCoRE until just now. I briefly looked into it. Since we are adamant that all functionality be local, it seems that even if we jump through the hoops of adding WebCoRE's web-based editor to one of our in-house web servers, some functions (such as e-mail) will still use cloud servers. If that's still the case, it's a showstopper for us.
As long as Rule Machine is still being actively maintained and improved, for now I don't see the point in switching, though perhaps I will look more closely at WebCoRE to find out what I'm missing.
No, that is not the case. Webcore's cloud editor is simply a cloud service. You do not host anything. All processing takes place locally on the hub, as the pistons are stored on the hub, only the editor uses the cloud, which is very handy when you are not at home. it installs as a normal app without any additional setup.
Webcore started in 2017, and the original Core it was based on was before that, so it actually predates Hubitat, which started in 2016. It has its own community, so you would go there for help with Webcore issues instead of here, though questions here would probably get answered as well considering there are many Webcore users.
Email is a cloud service by definition, so it does not matter where it is sent from.
Edit: Maybe you were talking about installing the editor locally, I can see no reason to do that. For me the cloud editor is bonus, not something to work around with a local solution. Why do you care if the editor is local?
If some people find that handy, great! However, I'm picky about having all of the home automation functions (with the obvious exceptions of updating or installing software) be local to my house and to the equipment under my control.
That turns out not to be the case, at least if you're a retired Unix sysadmin like me. Mail from my Hubitat to anywhere goes first to my local, on-premises mail server, and leaves our house only if, for example, an urgent alert needs to be sent to my cellphone, which requires using the cell service provider's e-mail-to-SMS gateway.