OH3 Rules — DSL vs Next-Gen

I’ve recently upgraded to openHAB 3 and am finding it a bit confusing what the state of the rules are. The official docs (Rules | openHAB) mention nothing of the next-gen rules. The only way I knew about them was via Google, which pointed me to Next-Gen Rules | openHAB (not in the official documentation navigation menu at all).

In reading through them both, I’m still confused as to if I should be leveraging *.rules files still, or if they’ll be phased out for “next-gen”. Are the rules defined in *.rules files actually next-gen already?

Sorry if my question is a little muddy, but there being two different rules pages has made it very confusing as to what the current actual state is and how one should be going about writing rules.

See reccent post -

The Rule Engine is the part of openHAB that runs the rules. In OH 2.5 there was a Rules DSL Engine and the so called Next Gen Rules Engine. In OH 3 there is now just the Next Gen Rules Engine which is now just called “the rules engine”.

The Rules DSL language has been ported to run on the rules engine in OH 3.

So .rules files will still work as they always have with a few syntactic and minor behavioral changes. There is no plan to remove support for Rules DSL.

Thanks, that makes sense. Hopefully the Next-Gen Rules page will stop showing up in Google results soon, or maybe someone will remove that page from the docs altogether.

The content in that page is still mostly valid. The Next Gen Rules Engine is the rules engine in OH 3.

If you want to move away from the DSL language you could switch to Python. I am carrying on with the Helper Libraries, including updating them to work with openHAB 3.

Maybe we should cut out the old paper ui installation part and put a info box on top of the article, so that it will lead to the generic rules article.
I will prepare something.

Edit:

3 Likes

Sounds great! I’ve a big list of todos and it keeps getting longer instead of shorter. Making a total redo of the rules docs is among them. But that’s going to take awhile. The changes you propose would be a great first step.

I think this will work for now without deleting to much valid information. :slight_smile:

1 Like

Deleting the page altogether probably doesn’t make sense. I do think it’s confusing the page shows up in Google but can’t actually be arrived at via normal navigation within openHAB’s docs (at least from what I found). This is what added to my overall confusion as to what the current state of things was/is.

The sidebar link was removed, because this page needs some love and updates.
Removing the paperui references is only one step, but on long term it shoudl be replaced completely somehow.

Especially since it is the default rules engine starting from openHAB 3 we should get rid of the “next-gen” terms.