[Initial Release] Rule Machine Manager (New Rule Machine Interface)

Rule Machine Manager

This app pulls Rule Manager 5.0 rules into the page; and sets them up in a sortable fashion.
New containers can be added, and those can be sorted as well.

Screenshots

Features

  • Easy to use visual interface loaded with features for managing Rule Manager rules.
  • Create new containers to group rules together.
  • Rules are sortable within containers; and containers themselves are sortable.
  • Rules can be moved between containers by dragging/dropping.
  • Rule titles are editable (no need to delete and re-create).
  • Containers can be toggled to expand/collapse.
  • Deleted containers automatically move orphaned rules back to the "Original Rules" container.
  • All states are saved (toggles, sorts, custom containers, etc.).
  • Clicking the icon (on the right) for the rule; opens that rule editing window in a new page.

Available Via Hubitat Package Manager (Recommended)
This app is available via Hubitat Package Manager.
Simply search for "Rule Machine Manager" and install the package.

Local Installation
If local installation is preferred, please follow these steps:

  1. Visit Apps Code -> New App ->, and paste the .groovy code from HERE into the window and save.
  2. Download the required javascipt file from HERE and save it into your hub file manager. The filename should be saved as "rule_machine_manager.js".
  3. Download the required stylesheet file from HERE and save it into your hub file manager. The filename should be saved as "rule_machine_manager.css".
  4. Go to Apps -> Add User App -> and click "Rule Machine Manager".

Feature Requests:

  • Multi select when moving rules.
  • Bring in rules from other "machines".
  • Visually identify rules which have been disabled.
  • Nested Containers

To Do

  • When the .css and .js files are not loaded correctly, notify user more gracefully and provide steps for troubleshooting.
  • Add more logs for more meaningful debugging purposes.

Known Bugs:

  • App does not load correctly when using remote admin.
17 Likes

The idea sounds good. This capability should be present from day number one.

3 Likes

This looks great. There's a live thread at the moment about 'Rule Naming Conventions'. I started my reply yesterday then abandoned it, as it was rather sarcastic and critical about the interface.

My point was going to be that we shouldn't have to invent and follow naming conventions just to make an unwieldy list of rules searchable. All I want is containers so that I can expand/collapse a group of rules. This could be by type - 'lighting', 'notification' etc but will also be very useful where we've split a complicated rule into several smaller ones to simplify it.

I'm looking forward to trying this out - anything to tidy the long rule list is great.

3 Likes

@joshlobe You may want to join the beta. There are some UI changes that may effect your app.

I really like this, looks very close to an idea I wanted to develop, but never got around to, apart from scraping the list of apps. I will try and check it out sometime soon.

Expanding this to other apps and devices would be great, plus the ability (if you can't do it already) to have a rule / app in more than one container.

2 Likes

This looks awesome, great idea.

Curious, the way it is built could you also pull in items from other apps like Button Controller or Room Lighting? That would be really cool, so you could for example make a container for Kitchen and then have all your BC, RL and RM rules below it to click on and go straight into. Maybe a future upgrade once you get the initial version published?

3 Likes

I think a lot of people share your sentiment.

Yes, that very well could have been the thread that prompted this app.

I've thought about that as well. I really should. I want to grab a new C-8; so that I'm not hot coding on a live installation. I'll have to take a look at the live UI changes. Thanks for the heads up!

Awesome. I'll try to get the beta version done today, and loaded onto my github. Then, I'll come back and make a new topic; and link to it from here.

I don't think it'll make it there for the initial release.. but definitely something I will keep in mind. Thank you.

Hmmm... interesting. Like a "Duplicate Rule" button for each rule? I'll kick that logic around and see what I come up with.

Not currently, but definitely something I can look into for future releases. I have not used button controllers or room lighting, so I'll need to get familiar with those first. But I absolutely like where you are going with it.. and I've already added it to my future to-do list.

Thank you, everyone. This helps a lot. I don't anticipate too many more hurdles with coding, so I'm going to try to get this loaded into github later today, and let you guys start testing it real-time.

4 Likes

They are very similar in such that there is a parent app and each "Rule" is a child, so it may be pretty easy to pull those into your app as well depending on how you are doing this exactly.

2 Likes

Nice, Homeseer has something like this (rule folders) but not as sophisticated.

2 Likes

Alright, here is the initial release:
[Rule Machine Manager]
(Please install via the Hubitat Package Manager; or see first post for local install instructions)

A couple things to note before installing:

  • I include jquery and jquery sortable scripts into the page.
  • I include a javascript file; which has to be hosted on my personal website. I'm looking into CDN, but for now github apparently doesn't like direct links (CORS issue).
  • The javascript file can be viewed [HERE]

To install:

  1. Go to "Apps Code" and click "New App" in the upper right.
  2. Copy the code from the github page and paste it into the hubitat page.
  3. Click "Save".
  4. Navigate to "Apps" -> "Add User App".
  5. Find "Rule Machine Manager" and install.

NOTE: This post is outdated. Please install via HPM or see first post for local install instructions.

4 Likes

Great job, very easy to use. I do like the drag and drop feature.

1 Like

A couple of requests:

  • Inclusion in HPM (once you get past the initial release phase, not critical right now)
  • Perhaps you could hide the Original Rules section once there are no Rules left to put in groups? Though, my earlier request for having rules / apps able to be put in multiple group would trump this idea
  • An alphabetical sort option, both for rule groups and the rules within them (unless I am not seeing that option)
  • Perhaps move the Create Rule Group section to the top? Above Original Rules? It gets pushed down a fair way once you have a few Rule Groups setup
3 Likes

My screenshot earlier was from a non-beta hub, but I also installed it on a hub that is running the beta platform and it appears to pick up rules and display them in the app correctly.

3 Likes

Are you kidding me?! :smiley: D&D...oh man, that IS nice.

4 Likes

Could this be stored in the Hub file manager and then called up from there? I think I have seen other apps do this before. I Know it can work for CSS files for the dashboards. There are ways to push a file to the file manager from a bundle, HPM package, or from within the app itself.

2 Likes

Yep, this is definitely possible. HPM would be the easiest way to manage it I expect. I wrote (borrowed) some code to do this in some of my drivers a while back, only to realise smartly had the JS file included in the HPM package definition.

1 Like

This is how Smartly works - I don't know if the functionality needed is similar to this, but the Smartly stuff depends on a locally stored file.

I was referring more so to the fact that smartly was able to get the file onto the hub by including it in the file listing of the HPM package. I would expect the app should be able to utilise a local JS file, but will leave @joshlobe to confirm that.

1 Like

Thank you for the feedback.

  • Yes, I'll look into HPM for sure once I know this is stable enough.
  • I though about hiding; but needed a container the user could not muck up accidentally. You can move the actual containers around using the menu item on the right side of the container.
  • Yes, I could absolutely add sorting functionality.
  • I thought about adding it to the top; but then was concerned about real estate. I will figure something out there. I agree, it should be near the top.

I like the dark mode, btw. Looks good!

Thank you. I figured since almost all of the code is custom; and doesn't rely on anything hubitat other than calling the rules listings, I figured it'd be okay. But thank you for verifying, and thank you @rlithgow1 for thinking ahead.

Good to know. I'd much rather have the js file in the hubitat file manager.

Honestly, I've only tried with css.. and I do know that works. I don't see why it would not with a js file; but I will test to confirm.

2 Likes