Why can't Rules be saved copied and shared like cooking recipes

Wow! Thatā€™s both huge and awesome!

4 Likes

WOW this is awesome. This afternoon it was an idea and in a few hours you made it a reality.
Kudo's sir....

1 Like

Ha, it's a better way to clone a rule too. You can name it and change devices.

When importing a rule onto some different hub (like when sharing rules), it will by default create virtual devices when real ones are not selected. These could be swapped out later. Of course, the rule probably wouldn't do much without real devices.

There are probably some problematic corner cases of things in a rule for which this won't work. As these are discovered, we'll work at filling in any gaps. I have tested local variables, and these work as expected. This will be somewhat a beta feature at first.

6 Likes

Sounds great.

The only thing that caught me was that it will be in 2.2.4. I thought that was in testing already so it would have a code freeze on it.

Or maybe you are just showing off the agility of a small company. I miss those days.

2 Likes

Code freeze? We do that once in a blue moon (not all blue moons, since today is one). Besides, what fun is a rule if it can't be broken?

11 Likes

Absolutely awesome, Bruce - thank you! :+1:

2 Likes

I'm so thrilled!!!

2 Likes

Did you allow us to change the URL endpoint on the copy? When a trigger is a URL endpoint, you'd want to have a different endpoint on a copy.

Not yet. This is a very low level tool without any real smarts about what the rule does. You'd have to redo things like endpoints, at least at the beginning.

I just tested this, and it did work. It fixed the endpoint automatically.

5 Likes

This new tool is so powerful it can only cause great joy or great harm. :wink:

Joy: Hundreds of new RM users who share in the power of rules far beyond their own ability to understand/create.

Harm: Hundreds of posts from "borrowers" about rules they have imported and now have no idea why they aren't working.

:wink:

Don't get me wrong, I love this new feature, and know it will help a lot of people. I already exported all of my rules just to have a quick and easy way to restore them if I bork one badly, like I did a while back when I absent mindedly removed a device w/out remembering to prepare a rule for the device's demise.

But...[warning - glass half-full ahead] there will be (some) blood. :smiley:

6 Likes

Ah, you must be a beta tester. Iā€™m jealous.

Yeah you're right. This may end up getting someone in over their head with RM in a hurry. But really not a lot more than someone posting a rule and somebody punching it in the regular way. Many people post rules that donā€™t work and ask for assistance. We deal with it.

Aside from some of my little rules that auto restart things after a time out, I canā€™t imaging anyone wanting any of my rules because they are so specific to my situation. As you have done, I want it primarily for backing up and it gives an easy way to move a rule from one hub to the other. This is the greatest part. I still have a couple rules that I want to transition from my remote hub to my server hub and have only procrastinated because they are some of the largest rules I have.

It is what it is. An awesome new capability for RM. kinda link a large leap for mankind. (I could resist adding that).

6 Likes

Didn't think of this use case :ok_hand: I do have like 50 though :laughing:. Maybe a export all rules option :thinking:

3 Likes

Definitely think that would be useful and similar to Node-RED. Import/export individual rules or a whole bunch of them.

Seconded. I used to work as a system integrator for automated manufacturing equipment with a standard platform running a recipe builder, and a bulk export of the recipes (akin to HA rules) was one of the most oft requested missing features.

2 Likes

The ability to export/import multiple rules is coming...

12 Likes

Soooo disappointed that this was NOT included in the latest release... :frowning_face:

Well It looks like its only on the Create Rule page... I would have expected that exporting a rule would be in the rule you are wanting to export. I hope the exporting option will be also within the rule itself instead.

Why would it be there? Why would you want it there? It's in the parent so you can export it and import it (or clone it). You couldn't very well do those things from within a rule.

Say what?

It's just intuitive to look in the rule for the export... at least for me that's where I went first for the export. But... in the parent its probably better as you can export all the rules in 1 shot.

Try this:

Use Hub Mesh to put some devices used in Rule, Motion Lighting, or Button Controller on another hub. Then export the rule(s), and disable them on origin hub. Import to other hub, and replace device selections with the Hub Mesh linked devices of the same name. Presto!

3 Likes

I have to redo all my hubs as I was using hubconnect... hub mesh does looks neat