Other than being able to share an APP,can RM and an APP do the same things? I am not very good at coding, and wondering for my own purposes whether I should stick with RM or try and learn Groovy. I have several projects that will entail, using temperature devices and switches from my Arduino. Mostly turning on and off heating pumps and a valve or two according to time of day, temperature, etc..
You should learn Groovy (Not because it's required, but it does allow for some things that just cannot be accomplished in the existing apps).
With that said, so long as the devices are connected to your HE, RM should be able to handle things in 90% of all cases. For the 10% that RM can't handle (or if you are adverse to having a lot of rules), then you could code your own app to encapsulate all the rules that you want to have in one package.
That's kinda what I thought. I really don't know how convoluted I am going to get with all my automation. But who does??
EXACTLY! Every one of my projects starts as "I just wanna do this ONE thing" and then cascades out to doing fifty different things.
Rule Machine can definitely handle that. But the other answer is good--Groovy isn't super-hard to learn, but the way Hubitat uses parts of it may be a bit odd. The SmartApp-writing tutorial from ST is probably where most people learned (Hubitat's runtime environment was inspired by ST's), and most will translate easily to Hubitat. For example, the app's UI and metadata are created by special function calls, definition
and preferences
, traditionally placed at the beginning of the app. In terms of Groovy, these are functions, but for Hubitat (and ST and, I suspect, the eyes of many developers who just copy and paste these as a template from other apps), they're just a means to an end: providing information about the app or getting information from the user (creating the UI that typically involves choosing devices and other settings). Hubitat also technically has documentation on methods and whatnot it supports, though some of it is sparse at the moment and the ST docs are pretty close.
To the best of my ability to tell, drivers and apps are instances of some parent class that provide additional methods you don't find in "standard" Groovy, which is nice because they are quite helpful and necessary in ST/Hubitat (one common example: runIn
). I assume they also implement some template/interface that requires methods like the ones mentioned above. In any case, that's not much you have to worry about.
Rule Machine itself is just an app written in Groovy. If you can do it with RM, you can certainly do it yourself. RM is quite capable, but you may need multiple rules or "advanced" features (e.g., private boolean) to help it work the way you want, and some things are still simply not possible. Even if they are, writing your own app might be the easier option at some point. So to answer your original question, yes, RM and an app can do the same thing, but a custom app could do more. RM itself is just an app (one intended to help you create things that prevent you from needing to write your own app for arbitrary automations).
Thanks for the in depth response
There's a @Cobra app for that.
He HAS to make that his catchphrase AND put it up on his site. I demand these things. LOL