My understanding is to get full node support one has to run an instance of Node.js along side of openHAB and start up GraalVM with a different set of flags. That’s not really something we know how to package up and distribute as part of OH and I know of no one who has successfully done it yet. You can find details at GraalVM.
I can’t answer the first question.
Not at this time and I don’t know if ever. See GraalVM. In particular:
Because of the way that rules are run, attempting to do anything with threads results in a “single threaded only” exception because it causes concurrent access to JS objects (namely the script). And there is no internal loop driving things like in Node so if you set a promise the script just exits. There is nothing waking it up to see if the promise has been met.
All of these issues are known and being explored but there is no timeline for when/if they can be addressed.
thanks for your valuable input. I decided to use node.js separately from OpenHAB, additionally run node-RED and have those two communicate via Items. By this, functionality that requires libraries can be placed in and administered by Node-RED, and everything that belongs to OpenHAB will happen in OpenHAB.
Thanks again! The new JS engine makes OH much more powerful!
I´m interested in this solution. How did you manage a separate node.js instance and communication with OpenHAB?
Is it appropriate to set up another linux server with node.js, let my programming run there and “attach” it somehow to OpenHAB?