Show the errors and other relevant logs. null errors do not always mean a variable is null. Rules DSL will throw a null error if it cannot coerce the types of the arguments to something compatible with a given operation.
If you are moving to Python, I hope you mean HABApp. If you are using the Jython add-on, I strongly recommend not heading down that path. The Jython add-on is stuck on Python version 2.7 with little expectation of ever reaching Python 3. Upstream support is minimal and at some point it’s going to break and OH will be forced to remove it.
It’s not a good choice to get started with right now.
I used to fight with that with Rules DSL too. But I eventually found ways to stop fighting against the language and use it in the ways that the language makes easier. If you have lots of global lambdas and you need more than six arguments to those lambdas, that’s a Rules DSL code smell and there is almost always an alternative way that works better in the language. That’s neither here nor there since you’ve moved on. I only leave the above for future readers.
I think it’s well written and very well supported. If you want to use Python it’s the best way to code Python rules for OH. However, it does run in a separate process and is limited in what it can do by what is exposed in the REST API.
My second choice right now would be the jRuby addon. The Helper Library isn’t yet a part of the openHAB poject so it doesn’t come with the add-on out-of-the-box. However, it can be installed from the UI. And there is ongoing work to make an “official” jRuby Helper Library part of the add-on and part of the OH project itself.
1. That part of that post is talking about ECMAScript 5.1, not ECMAScript 2021
At the time of writing that post I made the admittedly wrong assumption (I knew it was wrong when I made it) that openHAB would stay on Java 11 until it reached end of life. But that is neither reasonable nor practical so 2026 would be the latest but the actual would likely be much sooner.
2. Nashorn is now supported as a separate plugin
However, with Nashorn on the marketplace continued support for it is available beyond when OH moves beyond Java 11 (Java 17 is the current targeted minimum for the future).
I keep hoping someone will take this on. I’m pretty sure it’s possible and a good deal of the work I suspect can be cribbed from the JS Scripting add-on. It’d be great if someone(s) brought in GraalVM Python and created a helper library to go with it.