New Rule Machine UI proposal

First I would like to say that I am delighted with my Hubitat Elevation. It's everything I hoped for and much more! Thanks Hubitat guys!!!
Well, I would humbly like to suggest a new UI for the rule machine.
So, instead of this:


I would like to suggest something like this:

The button at the header would add a new statement at the top;
For each row, the buttons would do (from left to right) at the respective statement:
. add new statement after this row
. accept changes in this row
. edit the statement in this row
. delete the statement in this row
. comment the statement in this row
. uncomment the statement in this row
. move up the statement in this row
, move down the statement in this row
Of course some buttons will only appear based on the current context.
With this UI I think we can have a more straightforward editing of the statements of the RM.
What do the community think about that? And Hubitat?
Best wishes for everybody!
Marco

1 Like

This is not doable with our current app UI framework.

Well, worth the try ...
Thanks for the fast response!!
As you said before, you guys are fast !
Best
Marco

I been involved in all phases of software development during my long career and learned one important lesson - documentation is the key to being able to support any software over time.

As such, I am surprised that the Rule Machine UI doesnā€™t permit the insertion of comments. It seems like the simplest thing to add to the UI and would make life a lot easier for those of us who want to better understand code written by others or even code written by ourselves and revisited after our memory of what we were doing fades.

Please consider...

There is a "Notes" section for each Rule. I've used that in the past to document the need for each rule and the logic implemented.

You can use the Log action for this. It has no impact on any device, but shows up in both the list of actions and in the logs -- both of which address the need you've identified. If you think about a comment in code, it will always be preceded by some string of characters. In this case, that string of characters will be the string "Log: " as it appears in the list of actions.

1 Like

I am always impressed by the creativity of HE users and developers - and using the log action is certainly an example of that. However, I suspect it to be a bit of a stretch to use this as a documentation tool in RM.

If it didnā€™t generate a log entry, it would be more useful because I could begin my rules with a few lines of comments and embed some clarification comments within the actions without cluttering the log with entries that have no use.

Just something to consider as refinements continue being made to this excellent product...

As has been pointed out, there is a Notes section of a rule. In the screenshot below, I lifted all of the actions from the top of the Actions page with copy, and have pasted those into Notes. Now, I could add all the comments I might want in those notes.

Please understand that RM is not a programming language. It is an interactive app. What is shown on the main page for Actions is a summary of the actions that have been setup interactively. Due to the complexity of the interactions that create actions, adding a comment mechanism would not be as simple as you might think it would be. No text is being parsed, only interactive steps taken. Use Log action or Notes to add comments to the rule.

2 Likes

I would personally like to see RM moving towards more of a webcore look and feel. As someone who's got some very complex webcore pistons, RM just seems to lack functionality. There's a few things I use regularly in webcore that just can't be done in RM. And the UI is just so clunky. I get through it, but every time I do anything more complex I find I have to force myself away from using webcore and will sometimes just give up.

Why not just try writing your own custom groovy App? With all of the examples that exist in the community, getting started really is not very hard. If you've mastered webCoRE, which is a programming language IMHO, then you can master a little groovy. Plenty of community members that would be willing to lend a hand if you get stuck. :slight_smile:

I've actually been working on learning groovy. I understand the basics of it, but not quite at the point of writing completely from nothing yet. But I'll get there.

1 Like

Given that adding a comment action isnā€™t simple, then using the notes as you describe is the next best thing. An alternative could be to have the log action only make an entry in the log when action logging is enabled. That way the user could use the log action for documenting something without cluttering the log with unnecessary entries. Thanks for your consideration on this suggestion.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.