Experimental Next-Gen Rules Engine Documentation 1 of : Introduction

Tags: #<Tag:0x00007f51dafaca70>

(Angelos) #21

really ???

(Greg) #22

I assumed I could take what is there and modify it and put it in default.rules.

(Angelos) #23

I assumed that you spend 2-5 minutes reading the info that others spend hours to make

(Greg) #24

Reading is one thing. Comprehending is another.

(Angelos) #25

The text is very clear and precise
You didn’t ask a clarification on the answer. You asked a question that had been already answered in the text.
Drop it :stuck_out_tongue:

(Rich Koshak) #26

The NGRE is completely separate and different from Rules DSL. There is pretty much nothing in common between the two. You cannot just copy the code from NGRE into a .rules file. The code is written in a completely different language.

NGRE isn’t just a new way to write old style Rules DSL Rules, it is a wholly new and separate way to write Rules.

(Mick Smothers) #27

Has anyone else had their NGRE (via Paper UI) rules stop working with the last two snapshots? Just curious before I start digging around to see if I broke something. I haven’t changed the rules, just updated my Docker image to the latest snapshots.


Update: I “edited” each rule (changed nothing) and re-saved it and it seems to be working now. I’ll keep an eye on it and make sure things are working correctly over the next day or two.

(Scott Rushworth) #28

Hey @rlkoshak, good news… I’ve got Jython and Groovy scripted actions and conditions working! I’m holding up putting in the PR until ESH is migrated.

(Rich Koshak) #29

Great news. Will the PR also contain what ever is requires so we can select the other languages when creating the Action through PaperUI? Right now the drop down list only has JavaScript.

Presumably Jython and Groovy will need to be installed before those languages can work, or will the PR also include that? It seems reasonable to me that they ship with OH by default from an NGRE perspective. But I don’t know the full implications of doing that. I suspect the reason JavaScript “ships” is because Nashorn is part of the JRE by default.

I’m sorry I missed this comment earlier.

If you have a “before” of the JSONDB file and an “after” of the JSONDB file you should see some difference in the files (format, different entries, something like that). That should tell you what changed.

It’s the fun of using an experimental project. :slight_smile:

(Scott Rushworth) #30

Like this :wink:

Ignore Xtend… that’s a WIP.

They will need to be manually installed. There is not any way, currently, to restrict the list to languages supported by the system.

I stongly agree. Automating installation of the languages will come in another PR. If I do it, it may take a while, but I think JSR223 bundles are important to have.

You got it… it’s already in there!

(Mick Smothers) #31

Yep - good point, Rick. However I’ve found that I need to do this on every OpenHAB restart, even when I don’t update the code, so I suspect more it is something on initialization that is not working right. If I get some time I’ll try turning up logging and see if I can determine what is going on.

Thanks for the hints!